Re: Regression caught by replay_kernel.py:ReplayKernelNormal.test_aarch64_virt

2021-07-26 Thread Pavel Dovgalyuk
On 27.07.2021 03:39, Cleber Rosa wrote: Hi everyone, tests/acceptance/replay_kernel.py:ReplayKernelNormal.test_aarch64_virt is currently failing consistently (first found that in [1]). I've bisected it down to the following commit: Thanks for bisecting. I didn't try to understand why the

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Guenter Roeck
On 7/26/21 9:45 PM, Michael S. Tsirkin wrote: On Mon, Jul 26, 2021 at 06:00:57PM +0200, Ard Biesheuvel wrote: (cc Bjorn) On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé wrote: On 7/26/21 12:56 AM, Guenter Roeck wrote: On 7/25/21 3:14 PM, Michael S. Tsirkin wrote: On Sat, Jul 24, 2021

[PATCH] hw/i386/ich9: add comment explaining an argument to acpi_pcihp_reset call

2021-07-26 Thread Ani Sinha
acpi_pcihp_reset() call from ich9/pm_reset() passes an unconditional truth value as the second argument. Added a commnet here to explain the reason why the argument is being passed unconditionally. Signed-off-by: Ani Sinha --- hw/acpi/ich9.c | 5 + 1 file changed, 5 insertions(+) diff

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Michael S. Tsirkin
On Mon, Jul 26, 2021 at 06:00:57PM +0200, Ard Biesheuvel wrote: > (cc Bjorn) > > On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé > wrote: > > > > On 7/26/21 12:56 AM, Guenter Roeck wrote: > > > On 7/25/21 3:14 PM, Michael S. Tsirkin wrote: > > >> On Sat, Jul 24, 2021 at 11:52:34AM -0700,

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Guenter Roeck
On 7/26/21 2:31 PM, Bjorn Helgaas wrote: [+cc linux-pci] On Mon, Jul 26, 2021 at 04:16:29PM -0500, Bjorn Helgaas wrote: On Mon, Jul 26, 2021 at 06:00:57PM +0200, Ard Biesheuvel wrote: On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé wrote: On 7/26/21 12:56 AM, Guenter Roeck wrote: On

[PATCH] hw/char/virtio-serial-bus: fix: Unpop throttled VirtQueueElement to queue before discard vq data

2021-07-26 Thread AIERPATIJIANG1 [艾尔帕提江·阿布都赛买提]
Ports enter a "throttled" state when writing to the chardev would block. The current output VirtQueueElement is kept around until the chardev becomes writable again.   Because closing the virtio serial device does not reset the queue, we cannot directly discard this element,  otherwise the control

Re: [PATCH v2 07/22] target/loongarch: Add fixed point arithmetic instruction translation

2021-07-26 Thread Song Gao
Hi, Richard. On 07/26/2021 11:53 PM, Richard Henderson wrote: > On 7/26/21 1:56 AM, Song Gao wrote: >> Hi, Richard. >> >> On 07/23/2021 08:46 AM, Richard Henderson wrote: >>> On 7/20/21 11:53 PM, Song Gao wrote: +/* Fixed point arithmetic operation instruction translation */ +static

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation

2021-07-26 Thread Song Gao
Hi, Richard. On 07/27/2021 12:42 AM, Richard Henderson wrote: > On 7/26/21 2:57 AM, Song Gao wrote: >> >> Hi, Richard. >> >> On 07/23/2021 01:12 PM, Richard Henderson wrote: >>> On 7/20/21 11:53 PM, Song Gao wrote: +target_ulong helper_cpucfg(CPULoongArchState *env, target_ulong rj) +{

Regression caught by replay_kernel.py:ReplayKernelNormal.test_aarch64_virt

2021-07-26 Thread Cleber Rosa
Hi everyone, tests/acceptance/replay_kernel.py:ReplayKernelNormal.test_aarch64_virt is currently failing consistently (first found that in [1]). I've bisected it down to the following commit: --- 78ff82bb1b67c0d79113688e4b3427fc99cab9d4 is the first bad commit commit

Re: [PATCH for-6.1 00/10] docs: Format literals correctly in rST

2021-07-26 Thread Richard Henderson
On 7/26/21 4:23 AM, Peter Maydell wrote: Peter Maydell (10): docs/devel/build-system.rst: Format literals correctly docs/devel/build-system.rst: Correct typo in example code docs/devel/ebpf_rss.rst: Format literals correctly docs/devel/migration.rst: Format literals correctly

Re: [PATCH for-6.1] hw/arm/boot: Report error if there is no fw_cfg device in the machine

2021-07-26 Thread Richard Henderson
On 7/26/21 6:33 AM, Peter Maydell wrote: If the user provides both a BIOS/firmware image and also a guest kernel filename, arm_setup_firmware_boot() will pass the kernel image to the firmware via the fw_cfg device. However we weren't checking whether there really was a fw_cfg device present, and

[PATCH 3/3] virtio-gpu: call dpy_gl_frame_counter at every guest scanout flush

2021-07-26 Thread Dongwon Kim
dpy_gl_frame_counter needs to be called for guest scanout frame count to calculate and display the performance figure - ups, the guest FB update per seconds. Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/virtio-gpu.c

[PATCH 2/3] ui/gtk: calling gd_gl_frame_counter at every draw/swap

2021-07-26 Thread Dongwon Kim
For FPS calculation, gd_gl_frame_counter is called at every draw(gtk-gl-area) or swap(gtk-egl) activity. Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 2 ++ ui/gtk-gl-area.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 2a2e6d3a17..ac56f5b9f4 100644

[PATCH 1/3] ui/gtk: adds status bar for expressing ups and fps

2021-07-26 Thread Dongwon Kim
With a display option, "show-fps=on", qemu adds a status bar and print following performance numbers on the bar, ups = update per seconds - the rate the guest scanout is updated. fps = frame per seconds - the frame rate of VC's GL drawing area One function, gd_gl_count_frame is added to count #

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Bjorn Helgaas
[+cc linux-pci] On Mon, Jul 26, 2021 at 04:16:29PM -0500, Bjorn Helgaas wrote: > On Mon, Jul 26, 2021 at 06:00:57PM +0200, Ard Biesheuvel wrote: > > On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé > > wrote: > > > On 7/26/21 12:56 AM, Guenter Roeck wrote: > > > > On 7/25/21 3:14 PM,

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Bjorn Helgaas
On Mon, Jul 26, 2021 at 06:00:57PM +0200, Ard Biesheuvel wrote: > (cc Bjorn) > > On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé > wrote: > > On 7/26/21 12:56 AM, Guenter Roeck wrote: > > > On 7/25/21 3:14 PM, Michael S. Tsirkin wrote: > > >> On Sat, Jul 24, 2021 at 11:52:34AM -0700,

[PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-07-26 Thread Dongwon Kim
When guest is running Linux/X11 with extended multiple displays mode enabled, the guest shares one scanout resource each time containing whole surface rather than sharing individual display output separately. This extended frame is properly splited and rendered on the corresponding scanout

[PATCH v2 2/2] ui/gtk-egl: blitting partial guest fb to the proper scanout surface

2021-07-26 Thread Dongwon Kim
eb_fb_blit should be able to blit partial image that represent a specific guest display in case there are multiple displays connected to the guest (One guest scanout FB contains all display outputs in a single dmabuf (blob- resource).). v2: egl_fb includes dmabuf info then make egl_fb_blit

[PULL for-6.1 11/12] linux-user/syscall: Remove unused variable from execve

2021-07-26 Thread Richard Henderson
>From clang-13: linux-user/syscall.c:8503:17: error: variable 'total_size' set but not used \ [-Werror,-Wunused-but-set-variable] Acked-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/syscall.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/linux-user/syscall.c

[PATCH v2 1/2] ui/gtk: detach_all option for making all VCs detached upon starting

2021-07-26 Thread Dongwon Kim
With "detach-all=on" for display, all VCs are detached from the beginning. This is useful when there are multiple displays assigned to a guest OS. v2: Move "detach-all" option to under DisplayGTK as it's GTK specific (Thomas Huth) Signed-off-by: Dongwon Kim Signed-off-by: Khairul Anuar

[PULL for-6.1 08/12] hw/audio/adlib: Remove unused variable in adlib_callback

2021-07-26 Thread Richard Henderson
>From clang-13: hw/audio/adlib.c:189:18: error: variable 'net' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- hw/audio/adlib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PULL for-6.1 12/12] tests/unit: Remove unused variable from test_io

2021-07-26 Thread Richard Henderson
>From clang-13: tests/unit/test-iov.c:161:26: error: variable 't' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/unit/test-iov.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PULL for-6.1 10/12] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write

2021-07-26 Thread Richard Henderson
>From clang-13: hw/pci-host/pnv_phb4.c:375:18: error: variable 'v' set but not used \ [-Werror,-Wunused-but-set-variable] It's pretty clear that we meant to write back 'v' after all that computation and not 'val'. Acked-by: David Gibson Acked-by: Benjamin Herrenschmidt Reviewed-by: Cédric

[PULL for-6.1 06/12] util/selfmap: Discard mapping on error

2021-07-26 Thread Richard Henderson
>From clang-13: util/selfmap.c:26:21: error: variable 'errors' set but not used \ [-Werror,-Wunused-but-set-variable] Quite right of course, but there's no reason not to check errors. First, incrementing errors is incorrect, because qemu_strtoul returns an errno not a count -- just or them

[PULL for-6.1 09/12] hw/ppc/spapr_events: Remove unused variable from check_exception

2021-07-26 Thread Richard Henderson
>From clang-13: hw/ppc/spapr_events.c:937:14: error: variable 'xinfo' set but not used \ [-Werror,-Wunused-but-set-variable] Acked-by: David Gibson Signed-off-by: Richard Henderson --- hw/ppc/spapr_events.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/ppc/spapr_events.c

[PULL for-6.1 07/12] net/checksum: Remove unused variable in net_checksum_add_iov

2021-07-26 Thread Richard Henderson
>From clang-13: ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Eric Blake Signed-off-by: Richard Henderson --- net/checksum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/checksum.c

[PULL for-6.1 02/12] accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb()

2021-07-26 Thread Richard Henderson
From: Peter Maydell In cpu_loop_exec_tb(), we decide whether to look for a TB with exactly insns_left instructions in it using the condition (!cpu->icount_extra && insns_left > 0 && insns_left < tb->icount) The check for icount_extra == 0 is unnecessary, because we just set insns_left =

[PULL for-6.1 04/12] nbd/server: Mark variable unused in nbd_negotiate_meta_queries

2021-07-26 Thread Richard Henderson
>From clang-13: nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ [-Werror,-Wunused-but-set-variable] which is incorrect; see //bugs.llvm.org/show_bug.cgi?id=3888. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson ---

[PULL for-6.1 05/12] accel/tcg: Remove unused variable in cpu_exec

2021-07-26 Thread Richard Henderson
>From clang-13: accel/tcg/cpu-exec.c:783:15: error: variable 'cc' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff

[PULL for-6.1 03/12] bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation")

2021-07-26 Thread Richard Henderson
From: Mark Cave-Ayland Commit db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") introduced a bitrev8() function to reverse the bit ordering required for storing the MAC address in the q800 PROM. This function is not required since QEMU implements its own revbit8() function which does

[PULL for-6.1 01/12] accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low

2021-07-26 Thread Richard Henderson
From: Peter Maydell In cpu_loop_exec_tb() we were bounding the number of insns we might try to execute in a TB using CF_COUNT_MASK. This is incorrect, because we can validly put up to 0x into icount_decr.u16.low. In particular, since commit 78ff82bb1b67c0d7 reduced CF_COUNT_MASK to 511

[PULL for-6.1 00/12] tcg and misc patch queue

2021-07-26 Thread Richard Henderson
-20210726 for you to fetch changes up to 2bf07e788eb69bee843be274386fb20f4ab6b0f6: tests/unit: Remove unused variable from test_io (2021-07-26 07:07:28 -1000) Fix icount accounting. Replace bitrev8 with revbit8. Fixes for set

Re: [PATCH for-6.1? v2 4/7] jobs: Give Job.force_cancel more meaning

2021-07-26 Thread Eric Blake
On Mon, Jul 26, 2021 at 04:46:10PM +0200, Max Reitz wrote: > We largely have two cancel modes for jobs: > > First, there is actual cancelling. The job is terminated as soon as > possible, without trying to reach a consistent result. > > Second, we have mirror in the READY state. Technically,

Re: [PATCH] Fix CPUID_Fn8000001E_EBX for AMD

2021-07-26 Thread Eduardo Habkost
CCing the original author of that code (Babu Moger). On Wed, Jun 30, 2021 at 04:25:51PM +0800, Jade Cheng wrote: > According to AMD64 Arch Programmer's Manual Appendix D, > bits 7:0 in Fn8000_001E_EBX should be physical core(s) per logical processor, > not per die. Do you mean physical cores

Re: [PATCH] fixup! target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 21:11, Richard Henderson wrote: > > --- > docs/system/arm/cpu-features.rst | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/docs/system/arm/cpu-features.rst > b/docs/system/arm/cpu-features.rst > index 79b87f7c5f..67847a5cc1 100644 > ---

[PATCH] fixup! target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Richard Henderson
--- docs/system/arm/cpu-features.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst index 79b87f7c5f..67847a5cc1 100644 --- a/docs/system/arm/cpu-features.rst +++ b/docs/system/arm/cpu-features.rst @@

Re: [PATCH v5 09/10] ACPI ERST: qtest for ERST

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:45 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:18:44 -0500 Eric DeVolder wrote: On 7/20/21 8:38 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:20 -0400 Eric DeVolder wrote: This change provides a qtest that locates and then does a simple interrogation of the

Re: [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:00 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:12:41 -0500 Eric DeVolder wrote: On 7/20/21 8:16 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:17 -0400 Eric DeVolder wrote: This code is called from the machine code (if ACPI supported) to generate the ACPI ERST

Re: [PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines.

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:30 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:16:42 -0500 Eric DeVolder wrote: On 7/20/21 8:19 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:19 -0400 Eric DeVolder wrote: This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder

Re: [PATCH v5 07/10] ACPI ERST: trace support

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:08 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:14:37 -0500 Eric DeVolder wrote: On 7/20/21 8:15 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:18 -0400 Eric DeVolder wrote: Provide the definitions needed to support tracing in ACPI ERST. trace points should be

Re: [PATCH v5 05/10] ACPI ERST: support for ACPI ERST feature

2021-07-26 Thread Eric DeVolder
On 7/26/21 5:42 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:07:40 -0500 Eric DeVolder wrote: On 7/20/21 7:17 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:16 -0400 Eric DeVolder wrote: This change implements the support for the ACPI ERST feature. Drop this Done

Re: [PATCH v5 02/10] ACPI ERST: specification for ERST support

2021-07-26 Thread Eric DeVolder
On 7/26/21 5:06 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 10:42:33 -0500 Eric DeVolder wrote: On 7/19/21 10:02 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 19:26:39 + Eric DeVolder wrote: Oops, at the end of the 4th paragraph, I meant to state that "Linux does not support

[PULL for-6.1 11/11] tests/qtest/nvme-test: add mmio read test

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Add a regression test for mmio read on big-endian hosts. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu --- tests/qtest/nvme-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c

Re: [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template

2021-07-26 Thread Willian Rampazzo
On Mon, Jul 26, 2021 at 12:06 PM Philippe Mathieu-Daudé wrote: > > Jobs depending on another should not use the 'when: always' > condition, because if a dependency failed we should not keep > running jobs depending on it. The correct condition is > 'when: on_success'. > > Fixes: f56bf4caf71

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 19:34, Richard Henderson wrote: > > On 7/26/21 4:59 AM, Andrew Jones wrote: > >> +SVE User-mode Default Vector Length Property > >> + > >> + > >> +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is > >> +defined

[PULL for-6.1 09/11] hw/nvme: fix out-of-bounds reads

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Peter noticed that mmio access may read into the NvmeParams member in the NvmeCtrl struct. Fix the bounds check. Reported-by: Peter Maydell Signed-off-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell --- hw/nvme/ctrl.c | 27

Re: [PULL for-6.1 0/1] Block patches

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 09:53, Stefan Hajnoczi wrote: > > The following changes since commit a2376507f615495b1d16685449ce0ea78c2caf9d: > > Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' > into staging (2021-07-24 11:04:57 +0100) > > are available in the Git repository

Re: [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs

2021-07-26 Thread Willian Rampazzo
On Mon, Jul 26, 2021 at 12:07 PM Philippe Mathieu-Daudé wrote: > > Jobs depending on another should not use the 'when: always' > condition, because if a dependency failed we should not keep > running jobs depending on it. The correct condition is > 'when: on_success'. > > Fixes: 71920809cea

Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables

2021-07-26 Thread Willian Rampazzo
On Mon, Jul 26, 2021 at 12:08 PM Philippe Mathieu-Daudé wrote: > > We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf > ("gitlab: Run Avocado tests manually (except mainstream CI)"), but > forgot to document it properly. Do it now. > > Suggested-by: Thomas Huth > Reviewed-by:

[PULL for-6.1 10/11] hw/nvme: fix mmio read

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen The new PMR test unearthed a long-standing issue with MMIO reads on big-endian hosts. Fix this by unconditionally storing all controller registers in little endian. Cc: Gollu Appalanaidu Reported-by: Peter Maydell Signed-off-by: Klaus Jensen Reviewed-by: Peter Maydell

[PULL for-6.1 08/11] hw/nvme: use symbolic names for registers

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Add the NvmeBarRegs enum and use these instead of explicit register offsets. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- include/block/nvme.h | 29 -

[PULL for-6.1 06/11] hw/nvme: fix controller hot unplugging

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch the nvme-ns devices are always children of the NvmeBus owned by the NvmeCtrl. This causes the namespaces to be unrealized when the parent device is removed. However, when subsystems are involved, this is not what we want since the namespaces may be attached

[PULL for-6.1 07/11] hw/nvme: split pmrmsc register into upper and lower

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to make up the 64 bit logical PMRMSC register. Make it so. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- include/block/nvme.h | 31 --- hw/nvme/ctrl.c | 10

[PULL for-6.1 04/11] hw/nvme: error handling for too many mappings

2021-07-26 Thread Klaus Jensen
From: Padmakar Kalghatgi If the number of PRP/SGL mappings exceed 1024, reads and writes will fail because of an internal QEMU limitation of max 1024 vectors. Signed-off-by: Padmakar Kalghatgi Reviewed-by: Klaus Jensen [k.jensen: changed the error message to be more generic] Signed-off-by:

[PULL for-6.1 05/11] tests/qtest/nvme-test: add persistent memory region test

2021-07-26 Thread Klaus Jensen
From: Gollu Appalanaidu This will test the PMR functionality. Signed-off-by: Gollu Appalanaidu Reviewed-by: Klaus Jensen [k.jensen: replaced memory-backend-file with memory-backend-ram] Signed-off-by: Klaus Jensen --- tests/qtest/nvme-test.c | 61 - 1

[PULL for-6.1 01/11] hw/nvme: remove NvmeCtrl parameter from ns setup/check functions

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen The nvme_ns_setup and nvme_ns_check_constraints should not depend on the controller state. Refactor and remove it. Reviewed-by: Hannes Reinecke Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 2 +- hw/nvme/ctrl.c | 2 +- hw/nvme/ns.c | 37

[PULL for-6.1 03/11] hw/nvme: unregister controller with subsystem at exit

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Make sure the controller is unregistered from the subsystem when device is removed. Reviewed-by: Hannes Reinecke Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 1 + hw/nvme/ctrl.c | 4 hw/nvme/subsys.c | 5 + 3 files changed, 10 insertions(+) diff --git

[PULL for-6.1 02/11] hw/nvme: mark nvme-subsys non-hotpluggable

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen We currently lack the infrastructure to handle subsystem hotplugging, so disable it. Reviewed-by: Hannes Reinecke Signed-off-by: Klaus Jensen --- hw/nvme/subsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c index

[PULL for-6.1 00/11] hw/nvme fixes

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Hi Peter, The following changes since commit 1d6f147f043bece029a795c6eb9d43c1abd909b6: Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20210725' into staging (2021-07-26 13:36:51 +0100) are available in the Git repository at:

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Andrew Jones
On Mon, Jul 26, 2021 at 08:33:52AM -1000, Richard Henderson wrote: > On 7/26/21 4:59 AM, Andrew Jones wrote: > > > +SVE User-mode Default Vector Length Property > > > + > > > + > > > +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is >

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Richard Henderson
On 7/26/21 4:59 AM, Andrew Jones wrote: +SVE User-mode Default Vector Length Property + + +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is +defined to mirror the Linux kernel parameter file

Re: [PULL v2 0/2] Hexagon (target/hexagon) remove put_user_*/get_user_*

2021-07-26 Thread Peter Maydell
On Sun, 25 Jul 2021 at 22:42, Taylor Simpson wrote: > > The following changes since commit 7457b407edd6e8555e4b46488aab2f13959fccf8: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging (2021-07-19 > 11:34:08 +0100) > > are available in the git

Re: [PATCH] hw/arm/nseries: Display hexadecimal value with '0x' prefix

2021-07-26 Thread Richard Henderson
On 7/26/21 5:09 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH for-6.1? v2 0/9] Fixes for clang-13

2021-07-26 Thread Richard Henderson
On 7/25/21 2:24 AM, Richard Henderson wrote: Richard Henderson (9): nbd/server: Mark variable unused in nbd_negotiate_meta_queries accel/tcg: Remove unused variable in cpu_exec util/selfmap: Discard mapping on error net/checksum: Remove unused variable in net_checksum_add_iov

Re: [PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-26 Thread David Hildenbrand
On 26.07.21 18:57, Peter Xu wrote: On Mon, Jul 26, 2021 at 06:03:43PM +0200, David Hildenbrand wrote: We might not start at the beginning of the memory region. Let's calculate the offset into the memory region via the difference in the host addresses. Acked-by: Stefan Berger Fixes:

[PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-07-26 Thread Ani Sinha
All existing code using acpi_get_i386_pci_host() checks for a non-null return value from this function call. Instead of returning early when the value returned is NULL, assert instead. Since there are only two possible host buses for i386 - q35 and i440fx, a null value return from the function

Re: [PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-26 Thread Peter Xu
On Mon, Jul 26, 2021 at 06:03:43PM +0200, David Hildenbrand wrote: > We might not start at the beginning of the memory region. Let's > calculate the offset into the memory region via the difference in the > host addresses. > > Acked-by: Stefan Berger > Fixes: ffab1be70692 ("tpm: clear RAM when

Re: [PATCH for-6.1?] bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation")

2021-07-26 Thread Richard Henderson
On 7/25/21 1:05 AM, Mark Cave-Ayland wrote: Commit db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") introduced a bitrev8() function to reverse the bit ordering required for storing the MAC address in the q800 PROM. This function is not required since QEMU implements its own revbit8()

Re: [PATCH for-6.1 0/2] accel/tcg: Fix hang when running in icount mode

2021-07-26 Thread Richard Henderson
On 7/25/21 8:11 AM, Richard Henderson wrote: On 7/25/21 7:44 AM, Peter Maydell wrote: This patchset fixes the intermittent hang seen when running a guest in icount mode, as reported in    https://gitlab.com/qemu-project/qemu/-/issues/499 . The underlying cause of the hang is that code in

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation

2021-07-26 Thread Richard Henderson
On 7/26/21 2:57 AM, Song Gao wrote: Hi, Richard. On 07/23/2021 01:12 PM, Richard Henderson wrote: On 7/20/21 11:53 PM, Song Gao wrote: +target_ulong helper_cpucfg(CPULoongArchState *env, target_ulong rj) +{ +    target_ulong r = 0; + +    switch (rj) { +    case 0: +    r =

Re: [PATCH v2 09/22] target/loongarch: Add fixed point bit instruction translation

2021-07-26 Thread Richard Henderson
On 7/26/21 2:22 AM, Song Gao wrote: Hi, Richard. On 07/23/2021 09:29 AM, Richard Henderson wrote: On 7/20/21 11:53 PM, Song Gao wrote: This patch implement fixed point bit instruction translation. This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} -

Re: [PATCH v2 3/3] qemu-ga/msi: fix w32 libgcc name

2021-07-26 Thread Marc-André Lureau
Hi On Mon, Jul 26, 2021 at 7:56 PM Gerd Hoffmann wrote: > This is what I find on my Fedora 34 mingw install. > > Signed-off-by: Gerd Hoffmann > --- > qga/installer/qemu-ga.wxs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qga/installer/qemu-ga.wxs

[PATCH for-6.1] hw/arm/boot: Report error if there is no fw_cfg device in the machine

2021-07-26 Thread Peter Maydell
If the user provides both a BIOS/firmware image and also a guest kernel filename, arm_setup_firmware_boot() will pass the kernel image to the firmware via the fw_cfg device. However we weren't checking whether there really was a fw_cfg device present, and if there wasn't we would crash. This

[PATCH] hw/net/can: sja1000 fix buff2frame_bas for dlc out of std CAN 8 bytes

2021-07-26 Thread Pavel Pisa
Problem reported by openEuler fuzz-sig group. The buff2frame_bas function (hw\net\can\can_sja1000.c) infoleak(qemu5.x~qemu6.x) or stack-overflow(qemu 4.x). Reported-by: Qiang Ning Signed-off-by: Pavel Pisa --- hw/net/can/can_sja1000.c | 4 1 file changed, 4 insertions(+) diff --git

Re: [PATCH v6 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-07-26 Thread Ilya Leoshkevich
On Mon, 2021-07-05 at 23:04 +0200, Ilya Leoshkevich wrote: > Verify that s390x-specific uc_mcontext.psw.addr is reported correctly > and that signal handling interacts properly with debugging. > > Signed-off-by: Ilya Leoshkevich > --- >  tests/tcg/s390x/Makefile.target   |  18 +- >  

[PATCH v3 4/4] softmmu/memory_mapping: optimize for RamDiscardManager sections

2021-07-26 Thread David Hildenbrand
virtio-mem logically plugs/unplugs memory within a sparse memory region and notifies via the RamDiscardManager interface when parts become plugged (populated) or unplugged (discarded). Currently, we end up (via the two users) 1) zeroing all logically unplugged/discarded memory during TPM resets.

[PATCH v3 2/4] softmmu/memory_mapping: never merge ranges accross memory regions

2021-07-26 Thread David Hildenbrand
Let's make sure to not merge when different memory regions are involved. Unlikely, but theoretically possible. Acked-by: Stefan Berger Reviewed-by: Peter Xu Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Alex Williamson Cc: Dr. David Alan Gilbert

[PATCH v3 3/4] softmmu/memory_mapping: factor out adding physical memory ranges

2021-07-26 Thread David Hildenbrand
Let's factor out adding a MemoryRegionSection to the list, to be reused in RamDiscardManager context next. Reviewed-by: Stefan Berger Reviewed-by: Peter Xu Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Alex Williamson Cc: Dr. David Alan Gilbert

[PATCH v3 0/4] softmmu/memory_mapping: optimize dump/tpm for virtio-mem

2021-07-26 Thread David Hildenbrand
Minor fixes and cleanups, followed by an optimization for virtio-mem regarding guest dumps and tpm. virtio-mem logically plugs/unplugs memory within a sparse memory region and notifies via the RamDiscardMgr interface when parts become plugged (populated) or unplugged (discarded). Currently,

[PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-26 Thread David Hildenbrand
We might not start at the beginning of the memory region. Let's calculate the offset into the memory region via the difference in the host addresses. Acked-by: Stefan Berger Fixes: ffab1be70692 ("tpm: clear RAM when "memory overwrite" requested") Cc: Marc-André Lureau Cc: Paolo Bonzini Cc:

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Ard Biesheuvel
(cc Bjorn) On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé wrote: > > On 7/26/21 12:56 AM, Guenter Roeck wrote: > > On 7/25/21 3:14 PM, Michael S. Tsirkin wrote: > >> On Sat, Jul 24, 2021 at 11:52:34AM -0700, Guenter Roeck wrote: > >>> Hi all, > >>> > >>> starting with qemu v6.0, some of my

Re: [PATCH] raw-format: drop WRITE and RESIZE child perms when possible

2021-07-26 Thread Stefan Hajnoczi
On Mon, Jul 26, 2021 at 05:42:47PM +0200, Kevin Wolf wrote: > Am 26.07.2021 um 16:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > > 26.07.2021 15:28, Stefan Hajnoczi wrote: > > > The following command-line fails due to a permissions conflict: > > > > > >$ qemu-storage-daemon \ > > >

[PATCH v2 3/3] qemu-ga/msi: fix w32 libgcc name

2021-07-26 Thread Gerd Hoffmann
This is what I find on my Fedora 34 mingw install. Signed-off-by: Gerd Hoffmann --- qga/installer/qemu-ga.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs index 9cb4c3d73302..ce7b25b5e16f 100644 ---

[PATCH v2 2/3] ci: build & store guest agent msi

2021-07-26 Thread Gerd Hoffmann
Build guest agent windows msi install package in gitlab CI, store the result as artifact. Signed-off-by: Gerd Hoffmann --- .gitlab-ci.d/crossbuild-template.yml | 3 ++- .gitlab-ci.d/crossbuilds.yml | 2 ++ tests/docker/dockerfiles/fedora-win32-cross.docker |

Re: [PATCH v2 07/22] target/loongarch: Add fixed point arithmetic instruction translation

2021-07-26 Thread Richard Henderson
On 7/26/21 1:56 AM, Song Gao wrote: Hi, Richard. On 07/23/2021 08:46 AM, Richard Henderson wrote: On 7/20/21 11:53 PM, Song Gao wrote: +/* Fixed point arithmetic operation instruction translation */ +static bool trans_add_w(DisasContext *ctx, arg_add_w *a) +{ +    TCGv Rd = cpu_gpr[a->rd]; +  

[PATCH v2 1/3] nsis.py: create dlldir automatically

2021-07-26 Thread Gerd Hoffmann
Use objdump do figure which dlls are needed. Copy them to a temporary dlldir and pass that directory to makensis. This patch removes the need to manually copy dlls to $srcdir/dll/w{32,64} to get functional windows installers via "make installer". Signed-off-by: Gerd Hoffmann ---

[PATCH v2 0/3] build windows installers in ci

2021-07-26 Thread Gerd Hoffmann
With 8619b5ddb56f ("ci: build & store windows installer") merged at least patch 1/3 should go into 6.1 too so the installers created by CI do actually work. Patches 2+3 are for the guest agent installer. Gerd Hoffmann (3): nsis.py: create dlldir automatically ci: build & store guest agent

Re: [PATCH] raw-format: drop WRITE and RESIZE child perms when possible

2021-07-26 Thread Kevin Wolf
Am 26.07.2021 um 16:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > 26.07.2021 15:28, Stefan Hajnoczi wrote: > > The following command-line fails due to a permissions conflict: > > > >$ qemu-storage-daemon \ > >--blockdev > >

Re: [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 16:01, Andrew Jones wrote: > > On Mon, Jul 26, 2021 at 01:42:45PM +0100, Peter Maydell wrote: > > On Fri, 23 Jul 2021 at 21:34, Richard Henderson > > wrote: > > > > > > This is intended to resolve #482. > > > > > > Changes for v2: > > > * Split out length bounding fix to

Re: [PATCH for-6.1? v2 4/9] net/checksum: Remove unused variable in net_checksum_add_iov

2021-07-26 Thread Eric Blake
On Sun, Jul 25, 2021 at 02:24:11AM -1000, Richard Henderson wrote: > From clang-13: > ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ > [-Werror,-Wunused-but-set-variable] > > Signed-off-by: Richard Henderson > --- > net/checksum.c | 4 +--- > 1 file changed, 1

Re: [PATCH for-6.1? v2 3/9] util/selfmap: Discard mapping on error

2021-07-26 Thread Eric Blake
On Sun, Jul 25, 2021 at 02:24:10AM -1000, Richard Henderson wrote: > From clang-13: > util/selfmap.c:26:21: error: variable 'errors' set but not used \ > [-Werror,-Wunused-but-set-variable] > > Quite right of course, but there's no reason not to check errors. > > First, incrementing errors

Re: [PATCH v2 06/22] target/loongarch: Add main translation routines

2021-07-26 Thread Richard Henderson
On 7/25/21 11:39 PM, Song Gao wrote: +void gen_base_offset_addr(TCGv addr, int base, int offset) +{ +    if (base == 0) { +    tcg_gen_movi_tl(addr, offset); +    } else if (offset == 0) { +    gen_load_gpr(addr, base); +    } else { +    tcg_gen_movi_tl(addr, offset); +   

Re: [PATCH v2 03/22] target/loongarch: Add core definition

2021-07-26 Thread Richard Henderson
On 7/25/21 10:47 PM, Song Gao wrote: Hmm,  but where can we declared in ? such as ARM architecture declared in internals.h, is that OK? Yes. It is preferable that only things that are used outside of target/arch/ go into cpu.h, and that everything that is private to target/arch/ go into

Re: [PATCH for-6.1? v2 2/7] mirror: Drop s->synced

2021-07-26 Thread Eric Blake
On Mon, Jul 26, 2021 at 04:46:08PM +0200, Max Reitz wrote: > As of HEAD^, there is no meaning to s->synced other than whether the job > is READY or not. job_is_ready() gives us that information, too. > > Suggested-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Max Reitz > --- >

Re: [PATCH v6 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-26 Thread Keith Busch
On Wed, Jul 21, 2021 at 09:48:32AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to > make up the 64 bit logical PMRMSC register. > > Make it so. Looks good. Reviewed-by: Keith Busch

Re: [PATCH resend v2 5/5] softmmu/memory_mapping: optimize for RamDiscardManager sections

2021-07-26 Thread Peter Xu
On Tue, Jul 20, 2021 at 03:03:04PM +0200, David Hildenbrand wrote: > virtio-mem logically plugs/unplugs memory within a sparse memory region > and notifies via the RamDiscardManager interface when parts become > plugged (populated) or unplugged (discarded). > > Currently, we end up (via the two

Re: [PATCH v6 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-26 Thread Klaus Jensen
Keith, Appala, any chance one of you could review this? This really needs to get to an -rc sooner rather than later :) On Jul 21 09:48, Klaus Jensen wrote: > From: Klaus Jensen > > The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to > make up the 64 bit logical PMRMSC

Re: [PATCH RFC server 06/11] vfio-user: handle PCI config space accesses

2021-07-26 Thread John Levon
On Mon, Jul 19, 2021 at 04:00:08PM -0400, Jagannathan Raman wrote: > Define and register handlers for PCI config space accesses > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/remote/vfio-user-obj.c | 41

[PATCH] hw/arm/nseries: Display hexadecimal value with '0x' prefix

2021-07-26 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 906c915df78..af3164c5519 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -692,7 +692,7 @@ static uint32_t

[PATCH-for-6.1 v4 4/4] gitlab-ci: Fix 'when:' condition in OpenSBI jobs

2021-07-26 Thread Philippe Mathieu-Daudé
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. Fixes: c6fc0fc1a71 ("gitlab-ci.yml: Add jobs to build OpenSBI firmware binaries") Reported-by:

  1   2   3   >