Re: [PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200403165752.18009-1-be...@igalia.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH-for-5.0 00/12] hw: Add missing error-propagation code

2020-04-03 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, Peter. > > On 3/31/20 3:23 PM, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> This series is inspired of Peter fix: >>> "hw/arm/xlnx-zynqmp.c: fix some error-handling code" >>>

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-03 Thread John Snow
On 4/3/20 4:57 AM, Max Reitz wrote: > On 02.04.20 20:27, John Snow wrote: > > [...] > >> Are we squared up for this series? I am actually not sure. > > As far as I’m concerned, yes. I just had this question on how to use mypy. Oh, whoops, Kevin's comment. I do want to address that one.

Re: [PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread Andrey Shinkevich
From: Alberto Garcia Sent: Friday, April 3, 2020 7:57 PM To: qemu-devel@nongnu.org Cc: Alberto Garcia; qemu-bl...@nongnu.org; Andrey Shinkevich; Max Reitz; Kevin Wolf; Vladimir Sementsov-Ogievskiy; Pavel Butsykin Subject: [PATCH for-5.0] qcow2: Check

[PATCH v5 2/2] lockable: replaced locks with lock guard macros where appropriate

2020-04-03 Thread dnbrdsky
From: Daniel Brodsky - ran regexp "qemu_mutex_lock\(.*\).*\n.*if" to find targets - replaced result with QEMU_LOCK_GUARD if all unlocks at function end - replaced result with WITH_QEMU_LOCK_GUARD if unlock not at end Signed-off-by: Daniel Brodsky --- block/iscsi.c | 7 ++

[PATCH v5 1/2] lockable: fix __COUNTER__ macro to be referenced properly

2020-04-03 Thread dnbrdsky
From: Daniel Brodsky - __COUNTER__ doesn't work with ## concat - replaced ## with glue() macro so __COUNTER__ is evaluated Fixes: 3284c3ddc4 Signed-off-by: Daniel Brodsky --- include/qemu/lockable.h | 7 --- include/qemu/rcu.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-)

[PATCH v5 0/2] Replaced locks with lock guard macros

2020-04-03 Thread dnbrdsky
From: Daniel Brodsky This patch set adds: - a fix for lock guard macros so they can be used multiple times in the same function - replacement of locks with lock guards where appropriate v4 -> v5: - added G_GNUC_UNUSED to lock guard macro to supress unused var warning v3 -> v4: - removed

[kvm-unit-tests PATCH v4 04/12] arm: pmu: Add a pmu struct

2020-04-03 Thread Eric Auger
This struct aims at storing information potentially used by all tests such as the pmu version, the read-only part of the PMCR, the number of implemented event counters, ... Signed-off-by: Eric Auger Reviewed-by: Andre Przywara --- v2 -> v3: - Fix pmcr_ro and add a comment --- arm/pmu.c | 29

[kvm-unit-tests PATCH v4 06/12] arm: pmu: Check Required Event Support

2020-04-03 Thread Eric Auger
If event counters are implemented check the common events required by the PMUv3 are implemented. Some are unconditionally required (SW_INCR, CPU_CYCLES, either INST_RETIRED or INST_SPEC). Some others only are required if the implementation implements some other features. Check those wich are

[kvm-unit-tests PATCH v4 08/12] arm: pmu: Test SW_INCR event count

2020-04-03 Thread Eric Auger
Add tests dedicated to SW_INCR event counting. Signed-off-by: Eric Auger --- v3: new - Formerly in chained counter tests but as QEMU does not support chained counters, the whole test was failing. Peter split the test. --- arm/pmu.c | 47

[kvm-unit-tests PATCH v4 05/12] arm: pmu: Introduce defines for PMU versions

2020-04-03 Thread Eric Auger
Introduce some defines encoding the different PMU versions. v3 is encoded differently in 32 and 64 bits. Signed-off-by: Eric Auger --- arm/pmu.c | 26 +- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/arm/pmu.c b/arm/pmu.c index d827e82..a04588a 100644

[kvm-unit-tests PATCH v4 02/12] arm: pmu: Let pmu tests take a sub-test parameter

2020-04-03 Thread Eric Auger
As we intend to introduce more PMU tests, let's add a sub-test parameter that will allow to categorize them. Existing tests are in the cycle-counter category. Signed-off-by: Eric Auger Reviewed-by: Andre Przywara --- v2 -> v3: - added report_prefix_pop() --- arm/pmu.c | 25

RE: Qemu doesn't detect hard drive

2020-04-03 Thread Aijaz . Baig
Thanks for the tip Pete. It is always tiny tidbits like these that can waste hours of time for someone coming from x86 . Ok I changed the command line and it looks like this now: sudo qemu-system-arm -m 1024M -M vexpress-a9 -D qemu.log -sd armdisk.img -kernel

Re: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-04-03 Thread Laurent Vivier
Le 03/04/2020 à 10:10, Chenqun (kuhn) a écrit : >> -Original Message- >> From: Laurent Vivier [mailto:laur...@vivier.eu] >> Sent: Friday, April 3, 2020 4:04 PM >> To: Chenqun (kuhn) ; qemu-devel@nongnu.org; >> qemu-triv...@nongnu.org >> Cc: Zhanghailiang ; phi...@redhat.com >> Subject: Re:

[kvm-unit-tests PATCH v4 12/12] arm: pmu: Test overflow interrupts

2020-04-03 Thread Eric Auger
Test overflows for MEM_ACCESS and SW_INCR events. Also tests overflows with 64-bit events. Signed-off-by: Eric Auger --- v3 -> v4: - all report messages are different v2 -> v3: - added prefix pop - added pmu_stats.unexpected - added pmu- prefix - remove traces in irq_handler() v1 -> v2: -

[kvm-unit-tests PATCH v4 10/12] arm: pmu: test 32-bit <-> 64-bit transitions

2020-04-03 Thread Eric Auger
Test configurations where we transit from 32b to 64b counters and conversely. Also tests configuration where chain counters are configured but only one counter is enabled. Signed-off-by: Eric Auger --- v3 -> v4: - allo report messages are different v2 -> v3: - added prefix pop --- arm/pmu.c

Re: [PATCH kvm-unit-tests] fixup! arm/arm64: ITS: pending table migration test

2020-04-03 Thread Andrew Jones
On Fri, Apr 03, 2020 at 07:07:10AM +0200, Auger Eric wrote: > Hi Drew, > > On 4/2/20 8:01 PM, Andrew Jones wrote: > > [ Without the fix this test would hang, as timeouts don't work with > > the migration scripts (yet). Use errata to skip instead of hang. ] > > Signed-off-by: Andrew Jones > >

Re: [PATCH 2/5] ppc/pnv: Add support for NMI interface

2020-04-03 Thread Nicholas Piggin
Cédric Le Goater's on March 26, 2020 2:38 am: > [ Please use c...@kaod.org ! ] > > On 3/25/20 3:41 PM, Nicholas Piggin wrote: >> This implements the NMI interface for the PNV machine, similarly to >> commit 3431648272d ("spapr: Add support for new NMI interface") for >> SPAPR. >> >>

[PATCH v2 06/12] acpi: add ISADeviceClass->build_aml()

2020-04-03 Thread Gerd Hoffmann
Also add isa_aml_build() function which walks all isa devices. This allows to move aml builder code to isa devices. Signed-off-by: Gerd Hoffmann --- include/hw/isa/isa.h | 2 ++ hw/i386/acpi-build.c | 1 + hw/isa/isa-bus.c | 15 +++ 3 files changed, 18 insertions(+) diff

Re: [PATCH v5] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-04-03 Thread Max Reitz
On 31.03.20 13:43, Alberto Garcia wrote: > A discard request deallocates the selected clusters so they read back > as zeroes. This is done by clearing the cluster offset field and > setting QCOW_OFLAG_ZERO in the L2 entry. > > This flag is however only supported when qcow_version >= 3. In older >

[PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 17 - hw/rtc/mc146818rtc.c | 20 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 77fc9df74735..a5bc7764e611 100644 ---

Re: [PATCH v2 0/3] drop writes to read-only ram device & vfio regions

2020-04-03 Thread Yan Zhao
Forgot the changelog, so sent this patch 0/3 again. sorry about that. On Sat, Apr 04, 2020 at 01:08:23AM +0800, Zhao, Yan Y wrote: > patch 1 modifies handler of ram device memory regions to drop guest writes > to read-only ram device memory regions > > patch 2 modifies handler of non-mmap'd

Re: [PATCH kvm-unit-tests] fixup! arm/arm64: ITS: pending table migration test

2020-04-03 Thread Auger Eric
Hi Drew, On 4/3/20 9:37 AM, Andrew Jones wrote: > On Fri, Apr 03, 2020 at 07:07:10AM +0200, Auger Eric wrote: >> Hi Drew, >> >> On 4/2/20 8:01 PM, Andrew Jones wrote: >>> [ Without the fix this test would hang, as timeouts don't work with >>> the migration scripts (yet). Use errata to skip

Re: [PATCH v4 2/2] target/arm: kvm: Handle potential issue with dabt injection

2020-04-03 Thread Andrew Jones
On Mon, Mar 23, 2020 at 11:32:27AM +, Beata Michalska wrote: > Injecting external data abort through KVM might trigger > an issue on kernels that do not get updated to include the KVM fix. > For those and aarch32 guests, the injected abort gets misconfigured > to be an implementation defined

Re: Qemu doesn't detect hard drive

2020-04-03 Thread Peter Maydell
On Fri, 3 Apr 2020 at 09:01, wrote: > I am looking at 'dumping' a Debian like rootfs on the MMC and then use that > as the default rootfs instead of the busybox one. Is there an easy to follow > guide that you can point me at? Would save me a couple hours. Also, merely > specifying that

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-03 Thread Kevin Wolf
Am 02.04.2020 um 20:27 hat John Snow geschrieben: > On 4/1/20 8:40 AM, Max Reitz wrote: > > On 31.03.20 19:39, Kevin Wolf wrote: > >> Am 31.03.2020 um 19:23 hat John Snow geschrieben: > >>> > >>> > >>> On 3/31/20 6:21 AM, Max Reitz wrote: > On 31.03.20 02:00, John Snow wrote: > > Minor

[PATCH v2 03/12] acpi: drop pointless _STA method

2020-04-03 Thread Gerd Hoffmann
When returning a constant there is no point in having a method in the first place, _STA can be a simple integer instead. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build.c

[PATCH v2 02/12] acpi: add aml builder stubs

2020-04-03 Thread Gerd Hoffmann
Needed when moving aml builder code to devices. Signed-off-by: Gerd Hoffmann --- hw/acpi/aml-build-stub.c | 79 hw/acpi/Makefile.objs| 4 +- 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 hw/acpi/aml-build-stub.c diff --git

[PATCH v2 08/12] acpi: move aml builder code for serial device

2020-04-03 Thread Gerd Hoffmann
The code uses the isa_serial_io array to figure what the device uid is. Side effect is that acpi antries are not limited to port 1+2 any more, we'll also get entries for ports 3+4. Signed-off-by: Gerd Hoffmann --- hw/char/serial-isa.c | 32 hw/i386/acpi-build.c

[PATCH v2 04/12] acpi: serial: don't use _STA method

2020-04-03 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00

[PATCH v2 01/12] move 'typedef Aml' to qemu/types.h

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- include/hw/acpi/aml-build.h | 1 - include/qemu/typedefs.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index de4a4065682c..1bfe5844e984 100644 --- a/include/hw/acpi/aml-build.h

Re: is just a wrong function name of libusb_get_port_number? request for a review of the bug fix(Internet mail)

2020-04-03 Thread kraxel
On Fri, Apr 03, 2020 at 07:05:13AM +, bauerchen(陈蒙蒙) wrote: > thanks, but my libusbx version is libusbx-1.0.15-4.el7.x86_64 , > I can find libusb_get_port_numbers function in libusb-1.0.so.0 but find > libusb_get_port_number > > [root@t]# strings /lib64/libusb-1.0.so.0 |grep

RE: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-04-03 Thread Chenqun (kuhn)
>-Original Message- >From: Laurent Vivier [mailto:laur...@vivier.eu] >Sent: Friday, April 3, 2020 4:04 PM >To: Chenqun (kuhn) ; qemu-devel@nongnu.org; >qemu-triv...@nongnu.org >Cc: Zhanghailiang ; phi...@redhat.com >Subject: Re: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang

RE: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-04-03 Thread Chenqun (kuhn)
>-Original Message- >From: Laurent Vivier [mailto:laur...@vivier.eu] >Sent: Friday, April 3, 2020 4:28 PM >To: Chenqun (kuhn) ; qemu-devel@nongnu.org; >qemu-triv...@nongnu.org >Cc: Zhanghailiang ; phi...@redhat.com >Subject: Re: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang

Re: [PATCH v1 4/5] dma/xlnx-zdma: Advance the descriptor address when stopping

2020-04-03 Thread Francisco Iglesias
On [2020 Apr 02] Thu 15:47:20, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Advance the descriptor address when stopping the channel. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/dma/xlnx-zdma.c | 1 - > 1 file changed, 1 deletion(-) > > diff

Re: Questionable aspects of QEMU Error's design

2020-04-03 Thread Markus Armbruster
BALATON Zoltan writes: > On Thu, 2 Apr 2020, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >>> 02.04.2020 12:36, BALATON Zoltan wrote: [...] Not much better. Could it be something like: [...]     ERRP_RET(object_property_set_link(cpuobj,

[PATCH v2 09/12] acpi: move aml builder code for parallel device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/char/parallel.c | 25 + hw/i386/acpi-build.c | 23 --- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/hw/char/parallel.c b/hw/char/parallel.c index 8dd67d13759b..2bff1f17fda7 100644 ---

[PATCH v2 00/12] acpi: i386 tweaks

2020-04-03 Thread Gerd Hoffmann
First batch of microvm patches, some generic acpi stuff. Split the acpi-build.c monster, specifically split the pc and q35 and pci bits into a separate file which we can skip building at some point in the future. v2 changes: leave acpi-build.c largely as-is, move useful bits to other places to

[PATCH v2 2/3] hw/vfio: drop guest writes to ro regions

2020-04-03 Thread Yan Zhao
for vfio regions that are without write permission, drop guest writes to those regions. Signed-off-by: Yan Zhao Signed-off-by: Xin Zeng --- hw/vfio/common.c | 8 +++- hw/vfio/trace-events | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/vfio/common.c

Re: [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros

2020-04-03 Thread David Gibson
On Thu, Apr 02, 2020 at 09:18:09AM +0200, Cédric Le Goater wrote: > On 4/2/20 8:50 AM, David Gibson wrote: > > On Thu, Apr 02, 2020 at 08:41:24AM +0200, Cédric Le Goater wrote: > >> On 4/2/20 2:31 AM, David Gibson wrote: > >>> On Wed, Apr 01, 2020 at 05:26:33PM +0200, Cédric Le Goater wrote: >

Re: Re: is just a wrong function name of libusb_get_port_number? request for a review of the bug fix(Internet mail)

2020-04-03 Thread 陈蒙蒙
thanks, but my libusbx version is libusbx-1.0.15-4.el7.x86_64 , I can find libusb_get_port_numbers function in libusb-1.0.so.0 but find libusb_get_port_number [root@t]# strings /lib64/libusb-1.0.so.0 |grep libusb_get_port_number libusb_get_port_number [root@t]# is my libusbx package problem?

[kvm-unit-tests PATCH v4 11/12] arm: gic: Introduce gic_irq_set_clr_enable() helper

2020-04-03 Thread Eric Auger
Allows to set or clear the enable state of a PPI/SGI/SPI. Signed-off-by: Eric Auger --- --- lib/arm/asm/gic.h | 4 lib/arm/gic.c | 31 +++ 2 files changed, 35 insertions(+) diff --git a/lib/arm/asm/gic.h b/lib/arm/asm/gic.h index 922cbe9..57e81c6 100644

[kvm-unit-tests PATCH v4 09/12] arm: pmu: Test chained counters

2020-04-03 Thread Eric Auger
Add 2 tests exercising chained counters. The first one uses CPU_CYCLES and the second one uses SW_INCR. Signed-off-by: Eric Auger --- v3 -> v4: - each report_info has a different message v2 -> v3: - added prefix pop - added pmu prefix to the test names - defines, event array ... --- arm/pmu.c

Re: [EXTERNAL] [PATCH 5/5] ppc/pnv: Implement mce injection

2020-04-03 Thread Nicholas Piggin
Cédric Le Goater's on March 26, 2020 2:39 am: > On 3/25/20 3:41 PM, Nicholas Piggin wrote: >> This implements mce injection for pnv. > > This would be the command to use ? > > (qemu) mce 0 0x10 0x80 0xdeadbeef 1 > >> Signed-off-by: Nicholas Piggin >> --- >> hw/ppc/pnv.c | 55

[kvm-unit-tests PATCH v4 00/12] KVM: arm64: PMUv3 Event Counter Tests

2020-04-03 Thread Eric Auger
This series implements tests exercising the PMUv3 event counters. It tests both the 32-bit and 64-bit versions. Overflow interrupts also are checked. Those tests only are written for arm64. It allowed to reveal some issues related to SW_INCR implementation (esp. related to 64-bit implementation),

[kvm-unit-tests PATCH v4 01/12] arm64: Provide read/write_sysreg_s

2020-04-03 Thread Eric Auger
From: Andrew Jones Sometimes we need to test access to system registers which are missing assembler mnemonics. Signed-off-by: Andrew Jones Reviewed-by: Alexandru Elisei --- lib/arm64/asm/sysreg.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/lib/arm64/asm/sysreg.h

[kvm-unit-tests PATCH v4 03/12] arm: pmu: Don't check PMCR.IMP anymore

2020-04-03 Thread Eric Auger
check_pmcr() checks the IMP field is different than 0. However A zero IMP field is permitted by the architecture, meaning the MIDR_EL1 should be looked at instead. This causes TCG to fail this test on '-cpu max' because in that case PMCR.IMP is set equal to MIDR_EL1.Implementer which is 0. So

[PATCH v2 3/3] hw/vfio: let read-only flag take effect for mmap'd regions

2020-04-03 Thread Yan Zhao
along side setting host page table to be read-only, the memory regions are also required to be read-only, so that when guest writes to the read-only & mmap'd regions, vmexits would happen and region write handlers are called. Signed-off-by: Yan Zhao Signed-off-by: Xin Zeng --- hw/vfio/common.c

[PATCH v2 1/3] memory: drop guest writes to read-only ram device regions

2020-04-03 Thread Yan Zhao
for ram device regions, drop guest writes if the regions is read-only. Signed-off-by: Yan Zhao Signed-off-by: Xin Zeng --- memory.c | 6 +- trace-events | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index 601b749906..a380b59980 100644 ---

[PATCH v2 0/3] drop writes to read-only ram device & vfio regions

2020-04-03 Thread Yan Zhao
patch 1 modifies handler of ram device memory regions to drop guest writes to read-only ram device memory regions patch 2 modifies handler of non-mmap'd read-only vfio regions to drop guest writes to those regions patch 3 let mmap'd read-only vfio regions be able to generate vmexit for guest

Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Dietmar Maurer
> With the following patch, it seems to survive for now. I'll give it some > more testing tomorrow (also qemu-iotests to check that I didn't > accidentally break something else.) Wow, that was fast! Seems your patch fixes the bug! I wonder what commit introduced that problem, maybe:

Re: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-04-03 Thread Laurent Vivier
Le 03/04/2020 à 10:22, Laurent Vivier a écrit : > Le 03/04/2020 à 10:10, Chenqun (kuhn) a écrit : >>> -Original Message- >>> From: Laurent Vivier [mailto:laur...@vivier.eu] >>> Sent: Friday, April 3, 2020 4:04 PM >>> To: Chenqun (kuhn) ; qemu-devel@nongnu.org; >>> qemu-triv...@nongnu.org

Re: is just a wrong function name of libusb_get_port_number? request for a review of the bug fix

2020-04-03 Thread kraxel
On Thu, Apr 02, 2020 at 11:47:17AM +, bauerchen(陈蒙蒙) wrote: > From 6bfb3087866606ed36a21e7bd05f0674e6a97158 Mon Sep 17 00:00:00 2001 > From: Bauerchen > Date: Thu, 2 Apr 2020 19:19:00 +0800 > Subject: [PATCH] Fix:fix the wrong function name of libusb_get_port_number > > [desc]: >

Re: [PATCH v1 5/5] dma/xlnx-zdma: Reorg to fix CUR_DSCR

2020-04-03 Thread Francisco Iglesias
On [2020 Apr 02] Thu 15:47:21, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Reorganize the descriptor handling so that CUR_DSCR always > points to the next descriptor to be processed. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- >

Re: [PATCH for-5.0] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefano Garzarella
On Thu, Apr 02, 2020 at 03:54:34PM +0100, Stefan Hajnoczi wrote: > When a file descriptor becomes ready we must re-arm POLL_ADD. This is > done by adding an sqe to the io_uring sq ring. The ->need_wait() > function wasn't taking pending sqes into account and therefore >

Re: Qemu doesn't detect hard drive

2020-04-03 Thread Peter Maydell
On Fri, 3 Apr 2020 at 06:18, Aijaz.Baig wrote: > I would now like to add a hard disk for persistent storage and then transfer > control from busybox initrd based rootfs over to the full fledged version > offered with Linux. So I add it to the command line > > `sudo qemu-system-arm -m 1024M -M

RE: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-04-03 Thread Chenqun (kuhn)
Ping! This series has been reviewed. Could someone please pick this up (e.g. qemu-trivial?)? >-Original Message- >From: Chenqun (kuhn) >Sent: Wednesday, March 25, 2020 10:59 AM >To: qemu-devel@nongnu.org; qemu-triv...@nongnu.org >Cc: Zhanghailiang ; laur...@vivier.eu;

[PATCH v2 11/12] acpi: move aml builder code for i8042 (kbd+mouse) device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build.c | 39 --- hw/input/pckbd.c | 31 +++ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index

[PATCH v2 12/12] acpi: factor out fw_cfg_add_acpi_dsdt()

2020-04-03 Thread Gerd Hoffmann
Add helper function to add fw_cfg device, also move code to hw/i386/fw_cfg.c. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/fw_cfg.h | 1 + hw/i386/acpi-build.c | 24 +--- hw/i386/fw_cfg.c | 28 3 files

Re: [PATCH v5 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-04-03 Thread Laurent Vivier
Le 03/04/2020 à 09:51, Chenqun (kuhn) a écrit : > Ping! > > This series has been reviewed. Could someone please pick this up (e.g. > qemu-trivial?)? As we are in hard feature freeze now and this is not critical bug fixes I'm going to queue them for 5.1 except if you have good arguments to have

Re: [PATCH 3/5] nmi: add MCE class for implementing machine check injection commands

2020-04-03 Thread Nicholas Piggin
David Gibson's on March 31, 2020 10:22 am: > On Thu, Mar 26, 2020 at 12:41:45AM +1000, Nicholas Piggin wrote: >> Like commit 9cb805fd26 ("cpus: Define callback for QEMU "nmi" command") >> this implements a machine check injection command framework and defines >> a monitor command for ppc. >> >>

Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Thomas Lamprecht
On 4/2/20 7:10 PM, Kevin Wolf wrote: > Am 02.04.2020 um 18:47 hat Kevin Wolf geschrieben: >> So I think this is the bug: Calling blk_wait_while_drained() from >> anywhere between blk_inc_in_flight() and blk_dec_in_flight() is wrong >> because it will deadlock the drain operation. >> >>

Re: [PATCH v3] qobject: json-streamer: Change bracket_count to brace_count

2020-04-03 Thread Markus Armbruster
Simran Singhal writes: > Change the "parser->bracket_count >= 0" to "parser->brace_count >= 0" > to fix the typo. > > Fixes: 8d3265b3 > > Reviewed-by: Eric Blake > Signed-off-by: Simran Singhal First, thank you so much for spotting and fixing my typo! The commit message neglects to explain

Re: [PATCH v1 1/5] dma/xlnx-zdma: Remove comment

2020-04-03 Thread Francisco Iglesias
On [2020 Apr 02] Thu 15:47:17, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Remove comment. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/dma/xlnx-zdma.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/dma/xlnx-zdma.c

Re: [PATCH v1 3/5] dma/xlnx-zdma: Clear DMA_DONE when halting

2020-04-03 Thread Francisco Iglesias
On [2020 Apr 02] Thu 15:47:19, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Clear DMA_DONE when halting the DMA channel. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/dma/xlnx-zdma.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH v1 2/5] dma/xlnx-zdma: Populate DBG0.CMN_BUF_FREE

2020-04-03 Thread Francisco Iglesias
On [2020 Apr 02] Thu 15:47:18, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Populate DBG0.CMN_BUF_FREE so that SW can see some free space. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias > --- > hw/dma/xlnx-zdma.c | 6 ++ > 1 file changed, 6

[kvm-unit-tests PATCH v4 07/12] arm: pmu: Basic event counter Tests

2020-04-03 Thread Eric Auger
Adds the following tests: - event-counter-config: test event counter configuration - basic-event-count: - programs counters #0 and #1 to count 2 required events (resp. CPU_CYCLES and INST_RETIRED). Counter #0 is preset to a value close enough to the 32b overflow limit so that we check the

Re: Questionable aspects of QEMU Error's design

2020-04-03 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 02.04.2020 18:06, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 02.04.2020 11:55, Markus Armbruster wrote: Peter Maydell writes: > On Thu, 2 Apr 2020 at 07:11, Vladimir Sementsov-Ogievskiy > wrote: >>

[PATCH v2 05/12] acpi: parallel: don't use _STA method

2020-04-03 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00

[PATCH v2 10/12] acpi: move aml builder code for floppy device

2020-04-03 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/block/fdc.c | 83 hw/i386/acpi-build.c | 83 stubs/cmos.c | 7 stubs/Makefile.objs | 1 + 4 files changed, 91 insertions(+), 83 deletions(-) create

[PATCH v2 0/3] drop writes to read-only ram device & vfio regions

2020-04-03 Thread Yan Zhao
patch 1 modifies handler of ram device memory regions to drop guest writes to read-only ram device memory regions patch 2 modifies handler of non-mmap'd read-only vfio regions to drop guest writes to those regions patch 3 let mmap'd read-only vfio regions be able to generate vmexit for guest

Re: [PULL 00/15] Misc patches for 5.0-rc2

2020-04-03 Thread Peter Maydell
On Thu, 2 Apr 2020 at 20:07, Paolo Bonzini wrote: > > The following changes since commit 2833ad487cfff7dc33703e4731b75facde1c561e: > > Update version for v5.0.0-rc1 release (2020-03-31 18:02:47 +0100) > > are available in the Git repository at: > > git://github.com/bonzini/qemu.git

Re: [PATCH v2 06/12] acpi: add ISADeviceClass->build_aml()

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:56 +0200 Gerd Hoffmann wrote: > Also add isa_aml_build() function which walks all isa devices. > This allows to move aml builder code to isa devices. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > include/hw/isa/isa.h | 2 ++ >

[PATCH for-5.0 v2 0/3] acpi: Fixes for inconsistency in ACPI MR size during migration

2020-04-03 Thread Shameer Kolothum
This is to fix few issues discovered while adding NVDIMM hot-add support to arm/virt. These were previously part of [1] and since the fixes are generic in nature and might be an issue in x86 as well, they are being treated separately now. 1. https://patchwork.kernel.org/patch/11432371/ v1 --> V2

[PATCH for-5.0 v2 1/3] acpi: Use macro for table-loader file name

2020-04-03 Thread Shameer Kolothum
Use macro for "etc/table-loader" and move it to the header file similar to ACPI_BUILD_TABLE_FILE/ACPI_BUILD_RSDP_FILE etc. Signed-off-by: Shameer Kolothum Reviewed-by: Igor Mammedov --- hw/arm/virt-acpi-build.c| 2 +- hw/i386/acpi-build.c| 2 +- include/hw/acpi/aml-build.h | 1 + 3

Re: [PATCH] iotests/common.pattern: Quote echos

2020-04-03 Thread Philippe Mathieu-Daudé
On 4/3/20 12:11 PM, Max Reitz wrote: From time to time, my shell decides to repace the bracketed numbers here by the numbers inside (i.e., "=== Clusters to be compressed [1]" is printed as "=== Clusters to be compressed 1"). That makes tests that use common.pattern fail. Prevent that from

[PATCH for-5.0 v2 3/3] exec: Fix for qemu_ram_resize() callback

2020-04-03 Thread Shameer Kolothum
From: David Hildenbrand Summarizing the issue: 1. Memory regions contain ram blocks with a different size, if the size is not properly aligned. While memory regions can have an unaligned size, ram blocks can't. This is true when creating resizable memory region with an unaligned

RE: [RFC v6 00/24] vSMMUv3/pSMMUv3 2 stage VFIO integration

2020-04-03 Thread Shameerali Kolothum Thodi
Hi Eric, > -Original Message- > From: Auger Eric [mailto:eric.au...@redhat.com] > Sent: 03 April 2020 11:45 > To: Shameerali Kolothum Thodi ; > eric.auger@gmail.com; qemu-devel@nongnu.org; qemu-...@nongnu.org; > peter.mayd...@linaro.org; m...@redhat.com; alex.william...@redhat.com; >

Re: [PATCH for-5.0 2/2] block: Fix blk->in_flight during blk_wait_while_drained()

2020-04-03 Thread Max Reitz
On 03.04.20 12:44, Kevin Wolf wrote: > Calling blk_wait_while_drained() while blk->in_flight is increased for > the current request is wrong because it will cause the drain operation > to deadlock. > > Many callers of blk_wait_while_drained() have already increased > blk->in_flight when called in

Re: Re: is just a wrong function name of libusb_get_port_number? request for a review of the bug fix(Internet mail)

2020-04-03 Thread 陈蒙蒙
OK,thanks, I will try . Bauer From: kraxel Date: 2020-04-03 16:19 To: bauerchen(陈蒙蒙) CC: qemu-devel; hdegoede Subject: Re: is just a wrong function

Re: [PATCH for-5.0? v3] qemu-img: Report convert errors by bytes, not sectors

2020-04-03 Thread Max Reitz
On 02.04.20 15:57, Eric Blake wrote: > Various qemu-img commands are inconsistent on whether they report > status/errors in terms of bytes or sector offsets. The latter is > confusing (especially as more places move to 4k block sizes), so let's > switch everything to just use bytes everywhere.

Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:59 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/char/parallel.c | 25 + > hw/i386/acpi-build.c | 23 --- > 2 files changed, 25 insertions(+), 23 deletions(-) > > diff --git a/hw/char/parallel.c

Re: [PATCH-for-5.0 v2 4/4] qga: Restrict guest-file-read count to 10 MB to avoid crashes

2020-04-03 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Apr 02, 2020 at 03:09:55PM +0200, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >> > On https://www.mail-archive.com/qemu-devel@nongnu.org/msg693176.html >> > Daniel Berrangé commented: >> > >> > The QEMU guest agent protocol is not

Re: [PATCH for-5.0 1/2] block: Don't blk_wait_while_drained() in blk_co_preadv/pwritev

2020-04-03 Thread Max Reitz
On 03.04.20 12:44, Kevin Wolf wrote: > Calling blk_wait_while_drained() while blk->in_flight is increased for > the current request is wrong because it will cause the drain operation > to deadlock. > > In blk_co_preadv() and blk_co_pwritev_part(), this deadlock is easily > fixed by simply

Re: Question about scsi device hotplug (e.g scsi-hd)

2020-04-03 Thread Stefan Hajnoczi
On Thu, Apr 02, 2020 at 11:46:57AM +0300, Maxim Levitsky wrote: > On Wed, 2020-04-01 at 18:36 +0200, Paolo Bonzini wrote: > > On 01/04/20 17:09, Stefan Hajnoczi wrote: > > > > What do you think about it? > > > > > > Maybe aio_disable_external() is needed to postpone device emulation > > > until

Re: [PATCH v2] Compress lines for immediate return

2020-04-03 Thread Stefan Hajnoczi
On Wed, Apr 01, 2020 at 10:23:14PM +0530, Simran Singhal wrote: > Compress two lines into a single line if immediate return statement is found. > > It also remove variables progress, val, data, ret and sock > as they are no longer needed. > > Remove space between function "mixer_load" and '(' to

Re: [PATCH v2 0/3] drop writes to read-only ram device & vfio regions

2020-04-03 Thread Peter Maydell
On Fri, 3 Apr 2020 at 09:13, Yan Zhao wrote: > > patch 1 modifies handler of ram device memory regions to drop guest writes > to read-only ram device memory regions > > patch 2 modifies handler of non-mmap'd read-only vfio regions to drop guest > writes to those regions > > patch 3 let mmap'd

Re: [PATCH v2 02/12] acpi: add aml builder stubs

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:52 +0200 Gerd Hoffmann wrote: > Needed when moving aml builder code to devices. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Igor Mammedov > --- > hw/acpi/aml-build-stub.c | 79 > hw/acpi/Makefile.objs| 4 +- > 2

Re: [PATCH v2 07/12] acpi: move aml builder code for rtc device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:57 +0200 Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- [...] > +static void rtc_build_aml(ISADevice *isadev, Aml *scope) > +{ > +Aml *dev; > +Aml *crs; > + > +crs = aml_resource_template(); > +aml_append(crs, aml_io(AML_DECODE16, 0x0070,

Re: [PATCH v2 09/12] acpi: move aml builder code for parallel device

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 12:12:10 +0200 Igor Mammedov wrote: > On Fri, 3 Apr 2020 10:04:59 +0200 > Gerd Hoffmann wrote: > [...] > > +static void parallel_isa_build_aml(ISADevice *isadev, Aml *scope) > > +{ > > +ISAParallelState *isa = ISA_PARALLEL(isadev); > > +Aml *dev; > > +Aml *crs;

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-04-03 Thread Vladimir Sementsov-Ogievskiy
03.04.2020 14:23, Peter Krempa wrote: On Fri, Apr 03, 2020 at 14:02:47 +0300, Vladimir Sementsov-Ogievskiy wrote: 19.12.2019 13:36, Peter Krempa wrote: On Thu, Dec 19, 2019 at 11:51:01 +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! It's a continuation for "bitmap migration bug with

Re: [PATCH for-5.0] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefan Hajnoczi
On Thu, Apr 02, 2020 at 03:54:34PM +0100, Stefan Hajnoczi wrote: > When a file descriptor becomes ready we must re-arm POLL_ADD. This is > done by adding an sqe to the io_uring sq ring. The ->need_wait() > function wasn't taking pending sqes into account and therefore >

[PULL for-5.0 1/1] aio-posix: fix test-aio /aio/event/wait with fdmon-io_uring

2020-04-03 Thread Stefan Hajnoczi
When a file descriptor becomes ready we must re-arm POLL_ADD. This is done by adding an sqe to the io_uring sq ring. The ->need_wait() function wasn't taking pending sqes into account and therefore io_uring_submit_and_wait() was not being called. Polling for cqes failed to detect fd readiness

[PATCH for-5.0] hw/gpio/aspeed_gpio.c: Don't directly include assert.h

2020-04-03 Thread Peter Maydell
Remove a direct include of assert.h -- this is already provided by qemu/osdep.h, and it breaks our rule that the first include must always be osdep.h. In particular we must get the assert() macro via osdep.h to avoid compile failures on mingw (see the comment in osdep.h where we redefine assert()

Re: [PATCH v2 00/12] acpi: i386 tweaks

2020-04-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200403080502.8154-1-kra...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH v2 05/12] acpi: parallel: don't use _STA method

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:55 +0200 Gerd Hoffmann wrote: > The _STA method dates back to the days where we had a static DSDT. The > device is listed in the DSDT table unconditionally and the _STA method > checks a bit in the isa bridge pci config space to figure whenever a > given is isa device

Re: [PATCH v2 04/12] acpi: serial: don't use _STA method

2020-04-03 Thread Igor Mammedov
On Fri, 3 Apr 2020 10:04:54 +0200 Gerd Hoffmann wrote: > The _STA method dates back to the days where we had a static DSDT. The > device is listed in the DSDT table unconditionally and the _STA method > checks a bit in the isa bridge pci config space to figure whenever a > given is isa device

Re: [RFC qemu 0/6] mirror: implement incremental and bitmap modes

2020-04-03 Thread Fabian Grünbichler
On February 25, 2020 10:54 pm, John Snow wrote: > On 2/18/20 5:07 AM, Fabian Grünbichler wrote: >> picking up on John's in-progress patch series from last summer, this is >> a stab at rebasing and adding test cases for the low-hanging fruits: >> >> - bitmap mirror mode with

Re: Qemu doesn't detect hard drive

2020-04-03 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 4/3/20 9:39 AM, Peter Maydell wrote: >> On Fri, 3 Apr 2020 at 06:18, Aijaz.Baig wrote: >>> I would now like to add a hard disk for persistent storage and then >>> transfer control from busybox initrd based rootfs over to the full fledged >>> version offered

Re: [PATCH v2 08/10] linux-user: factor out reading of /proc/self/maps

2020-04-03 Thread Alex Bennée
Richard Henderson writes: > On 4/1/20 2:47 AM, Alex Bennée wrote: >> +typedef struct { >> +uint64_t start; >> +uint64_t end; > ... >> +errors = qemu_strtoul(fields[0], , 16, >start); >> +errors += qemu_strtoul(end + 1, NULL, 16, >end); > > uint64_t vs

  1   2   3   >