[PATCH v3 1/3] job: take each job's lock individually in job_txn_apply

2020-03-31 Thread Stefan Reiter
All callers of job_txn_apply hold a single job's lock, but different jobs within a transaction can have different contexts, thus we need to lock each one individually before applying the callback function. Similar to job_completed_txn_abort this also requires releasing the caller's context before

[PATCH v3 0/3] Fix some AIO context locking in jobs

2020-03-31 Thread Stefan Reiter
Contains three seperate but related patches cleaning up and fixing some issues regarding aio_context_acquire/aio_context_release for jobs. Mostly affects blockjobs running for devices that have IO threads enabled AFAICT. This is based on the discussions here:

Re: [PULL for-5.0 00/10] tcg patch queue

2020-03-31 Thread Peter Maydell
On Tue, 31 Mar 2020 at 04:54, Richard Henderson wrote: > > My tcg patch queue, plus one mips patch on request of Aleksander. > > > r~ > > > The following changes since commit 5acad5bf480321f178866dc28e38eeda5a3f19bb: > > Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into

[PATCH v3 2/3] replication: acquire aio context before calling job_cancel_sync

2020-03-31 Thread Stefan Reiter
job_cancel_sync requires the job's lock to be held, all other callers already do this (replication_stop, drive_backup_abort, blockdev_backup_abort, job_cancel_sync_all, cancel_common). Signed-off-by: Stefan Reiter --- block/replication.c | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH v3 3/3] backup: don't acquire aio_context in backup_clean

2020-03-31 Thread Stefan Reiter
All code-paths leading to backup_clean (via job_clean) have the job's context already acquired. The job's context is guaranteed to be the same as the one used by backup_top via backup_job_create. Since the previous logic effectively acquired the lock twice, this broke cleanup of backups for disks

Re: [PATCH/RFC] vl/s390: fixup ram sizes for compat machines

2020-03-31 Thread David Hildenbrand
On 31.03.20 14:16, Christian Borntraeger wrote: > > > On 31.03.20 14:13, David Hildenbrand wrote: >> On 31.03.20 14:02, Christian Borntraeger wrote: >>> compat machines did fixup the ram size to match what can be reported via >>> sclp. We need to mimic those for machines 4.2 and older to not

Re: [PATCH/RFC] vl/s390: fixup ram sizes for compat machines

2020-03-31 Thread Cornelia Huck
On Tue, 31 Mar 2020 08:02:38 -0400 Christian Borntraeger wrote: > compat machines did fixup the ram size to match what can be reported via > sclp. We need to mimic those for machines 4.2 and older to not fail on > inbound migration. > > Fixes: 3a12fc61af5c ("390x/s390-virtio-ccw: use memdev for

Re: [PATCH/RFC] vl/s390: fixup ram sizes for compat machines

2020-03-31 Thread Christian Borntraeger
On 31.03.20 14:13, David Hildenbrand wrote: > On 31.03.20 14:02, Christian Borntraeger wrote: >> compat machines did fixup the ram size to match what can be reported via >> sclp. We need to mimic those for machines 4.2 and older to not fail on >> inbound migration. >> >> Fixes: 3a12fc61af5c

Re: [PATCH v9 00/14] iotests: use python logging

2020-03-31 Thread Kevin Wolf
Am 30.03.2020 um 21:03 hat John Snow geschrieben: > > > On 3/24/20 7:20 PM, John Snow wrote: > > This series uses python logging to enable output conditionally on > > iotests.log(). We unify an initialization call (which also enables > > debugging output for those tests with -d) and then make

RE: [PATCH v2 06/22] hw/pci: introduce pci_device_set/unset_iommu_context()

2020-03-31 Thread Liu, Yi L
Hi Eric, > From: Auger Eric < eric.au...@redhat.com> > Sent: Tuesday, March 31, 2020 1:30 AM > To: Liu, Yi L ; qemu-devel@nongnu.org; > Subject: Re: [PATCH v2 06/22] hw/pci: introduce > pci_device_set/unset_iommu_context() > > Yi, > On 3/30/20 6:24 AM, Liu Yi L wrote: > > This patch adds

Re: [PATCH/RFC] vl/s390: fixup ram sizes for compat machines

2020-03-31 Thread David Hildenbrand
On 31.03.20 14:02, Christian Borntraeger wrote: > compat machines did fixup the ram size to match what can be reported via > sclp. We need to mimic those for machines 4.2 and older to not fail on > inbound migration. > > Fixes: 3a12fc61af5c ("390x/s390-virtio-ccw: use memdev for RAM") >

Re: deprecation of in-tree builds

2020-03-31 Thread Kevin Wolf
Am 31.03.2020 um 13:46 hat Liviu Ionescu geschrieben: > > On 31 Mar 2020, at 13:19, Peter Maydell wrote: > > > > > > ... the behaviour > > if they're run from some other (manually created) build directory > > would remain as it is today. > > Great! > > Then for now a strongly worded warning

Re: deprecation of in-tree builds

2020-03-31 Thread Peter Maydell
On Tue, 31 Mar 2020 at 13:02, Kevin Wolf wrote: > Mainly because it allows me to start everything (most importantly: my > editor, git and make) from the same directory. You can use 'make -C build/whatever' to avoid having to change directory. The odd one out here is configure, where you have to

Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 14:46, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: [...] I agree that this is a strange function and its logic is weird. But I don't know what the logic should be. My patch is still valid to just fix obvious use-after-free and possible leak. It doesn't fix the

[PATCH/RFC] vl/s390: fixup ram sizes for compat machines

2020-03-31 Thread Christian Borntraeger
compat machines did fixup the ram size to match what can be reported via sclp. We need to mimic those for machines 4.2 and older to not fail on inbound migration. Fixes: 3a12fc61af5c ("390x/s390-virtio-ccw: use memdev for RAM") Reported-by: Lukáš Doktor Cc: Igor Mammedov Cc: Dr. David Alan

Re: deprecation of in-tree builds

2020-03-31 Thread Kevin Wolf
Am 31.03.2020 um 09:48 hat Paolo Bonzini geschrieben: > On 30/03/20 16:37, Kevin Wolf wrote: > > If manually dealing with separate build directories is inconvenient > > today, it will still be inconvenient with Meson, so this would mean > > introducing the automatic directly creation together with

Re: [PATCH v2] s390x: kvm: Fix number of cpu reports for stsi 3.2.2

2020-03-31 Thread Cornelia Huck
On Tue, 31 Mar 2020 07:01:23 -0400 Janosch Frank wrote: > The cpu number reporting is handled by KVM and QEMU only fills in the > VM name, uuid and other values. > > Unfortunately KVM doesn't report reserved cpus and doesn't even know > they exist until the are created via the ioctl. > > So

Re: deprecation of in-tree builds

2020-03-31 Thread Liviu Ionescu
> On 31 Mar 2020, at 13:19, Peter Maydell wrote: > > > ... the behaviour > if they're run from some other (manually created) build directory > would remain as it is today. Great! Then for now a strongly worded warning displayed at the end of the build (to be clearly visible) should do it,

Re: [PATCH 6/6] qga/commands-posix: fix use after free of local_err

2020-03-31 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: [...] > I agree that this is a strange function and its logic is weird. But I > don't know what the logic should be. My patch is still valid to just > fix obvious use-after-free and possible leak. It doesn't fix the > logic. I sketched improved logic

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

2020-03-31 Thread Alberto Garcia
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 images the cluster is simply deallocated, exposing

Re: [PATCH] fix vhost_user_blk_watch crash

2020-03-31 Thread Michael S. Tsirkin
On Wed, Mar 25, 2020 at 06:30:08PM -0400, Raphael Norwitz wrote: > On Sun, Mar 29, 2020 at 09:30:24AM -0400, Michael S. Tsirkin wrote: > > > > On Mon, Mar 23, 2020 at 01:29:24PM +0800, Li Feng wrote: > > > the G_IO_HUP is watched in tcp_chr_connect, and the callback > > > vhost_user_blk_watch is

Re: [PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread Daniel P . Berrangé
On Tue, Mar 31, 2020 at 01:11:45PM +0200, Philippe Mathieu-Daudé wrote: > On 3/31/20 12:37 PM, Daniel P. Berrangé wrote: > > Running configure directly from the source directory is a build > > configuration that will go away in future. It is also not currently > > covered by any automated testing.

Re: [PATCH v2 0/3] Improved reporting for migrate parameters

2020-03-31 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1585641083.git.maozhon...@cmss.chinamobile.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v2 0/3] Improved reporting for migrate parameters Message-id:

Re: [PATCH v2 0/3] Improved reporting for migrate parameters

2020-03-31 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1585641083.git.maozhon...@cmss.chinamobile.com/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to

Re: [PATCH] linux-user: main: Let each env have its own gdt table

2020-03-31 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200331081506.29037-1-cheng...@emindsoft.com.cn/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

Re: [PATCH v2 0/3] Improved reporting for migrate parameters

2020-03-31 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1585641083.git.maozhon...@cmss.chinamobile.com/ Hi, This series failed the asan 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 RFC 2/9] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2020-03-31 Thread Anup Patel
On Tue, Mar 31, 2020 at 2:43 PM Anup Patel wrote: > > On Fri, Mar 13, 2020 at 9:23 AM Yifei Jiang wrote: > > > > Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. > > Meanwhile, add riscv64 kvm support to configure. > > This should be for both riscv64 and riscv32. The

Re: [PATCH v1] s390x: Reject unaligned RAM sizes

2020-03-31 Thread Christian Borntraeger
On 27.03.20 23:13, Igor Mammedov wrote: > On Fri, 27 Mar 2020 17:53:39 +0100 > David Hildenbrand wrote: > >> On 27.03.20 17:46, Igor Mammedov wrote: >>> On Fri, 27 Mar 2020 17:05:34 +0100 >>> Christian Borntraeger wrote: >>> On 27.03.20 17:01, David Hildenbrand wrote: > On

Re: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 11:28 AM, Gerd Hoffmann wrote: On Sat, Mar 28, 2020 at 05:16:59PM -0700, Paul Zimmerman wrote: This patch series adds emulation for the dwc-hsotg USB controller, which is used on the Raspberry Pi 3 and earlier, as well as a number of other development boards. The main benefit for

Re: [PATCH v2 08/22] vfio/common: provide PASID alloc/free hooks

2020-03-31 Thread Auger Eric
Hi Yi, On 3/31/20 12:59 PM, Liu, Yi L wrote: > Hi Eric, > >> From: Auger Eric >> Sent: Tuesday, March 31, 2020 6:48 PM >> To: Liu, Yi L ; qemu-devel@nongnu.org; >> alex.william...@redhat.com; pet...@redhat.com >> Cc: pbonz...@redhat.com; m...@redhat.com; da...@gibson.dropbear.id.au; Tian, >>

Re: [PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 12:37 PM, Daniel P. Berrangé wrote: Running configure directly from the source directory is a build configuration that will go away in future. It is also not currently covered by any automated testing. Display a deprecation warning if the user attempts to use an in-srcdir build setup,

Re: [PATCH v1] usb: Add read support for HCIVERSION register to XHCI

2020-03-31 Thread Philippe Mathieu-Daudé
On 3/31/20 11:57 AM, Cameron Esfahani wrote: Philippe - From what I've seen, access size has nothing to do with alignment. Yes, I was wondering if you were using unaligned accesses. I *think* the correct fix is in the "memory: Support unaligned accesses on aligned-only models" patch from

[PATCH v2] s390x: kvm: Fix number of cpu reports for stsi 3.2.2

2020-03-31 Thread Janosch Frank
The cpu number reporting is handled by KVM and QEMU only fills in the VM name, uuid and other values. Unfortunately KVM doesn't report reserved cpus and doesn't even know they exist until the are created via the ioctl. So let's fix up the cpu values after KVM has written its values to the 3.2.2

RE: [PATCH v2 08/22] vfio/common: provide PASID alloc/free hooks

2020-03-31 Thread Liu, Yi L
Hi Eric, > From: Auger Eric > Sent: Tuesday, March 31, 2020 6:48 PM > To: Liu, Yi L ; qemu-devel@nongnu.org; > alex.william...@redhat.com; pet...@redhat.com > Cc: pbonz...@redhat.com; m...@redhat.com; da...@gibson.dropbear.id.au; Tian, > Kevin ; Tian, Jun J ; Sun, Yi Y > ; k...@vger.kernel.org;

Re: Massive memory leak in 4.2.0

2020-03-31 Thread Dr. David Alan Gilbert
* Alexander Yuriev (a...@corp.zubrcom.net) wrote: > Hello, Hi, (Copying in Marc-Andre for virtio gpu stuff) > I was wondering if there is any interest in getting detailed reports/having > a tester for a reproducible massive memory leak in qemu 4.2.0 running a > guest with X11 via virgl-0.8.1

[PATCH-for-5.1 7/7] target/sparc/int32_helper: Extract and use excp_name_str()

2020-03-31 Thread Philippe Mathieu-Daudé
Improve exception error report: Before: qemu: fatal: Trap 0x06 while interrupts disabled, Error state After: qemu: fatal: Trap 0x06 (Window Underflow) while interrupts disabled, Error state Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/int32_helper.c | 18 -- 1

[PATCH-for-5.1 5/7] hw/timer/grlib_gptimer: Display frequency in decimal

2020-03-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/trace-events b/hw/timer/trace-events index 29fda7870e..96a6c9138c 100644 --- a/hw/timer/trace-events +++ b/hw/timer/trace-events @@ -19,7 +19,7 @@

[PATCH-for-5.1 4/7] hw/misc/grlib_ahb_apb_pnp: Add trace events on read accesses

2020-03-31 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/grlib_ahb_apb_pnp.c | 13 +++-- hw/misc/trace-events| 4 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/misc/grlib_ahb_apb_pnp.c b/hw/misc/grlib_ahb_apb_pnp.c index d22ed00206..43e001c3c7 100644 ---

[PATCH-for-5.0 3/7] hw/misc/grlib_ahb_apb_pnp: Fix AHB PnP 8-bit accesses

2020-03-31 Thread Philippe Mathieu-Daudé
The Plug & Play region of the AHB/APB bridge can be accessed by various word size, however the implementation is clearly restricted to 32-bit: static uint64_t grlib_ahb_pnp_read(void *opaque, hwaddr offset, unsigned size) { AHBPnp *ahb_pnp = GRLIB_AHB_PNP(opaque); return

[PATCH-for-5.0 1/7] tests/acceptance/machine_sparc_leon3: Disable HelenOS test

2020-03-31 Thread Philippe Mathieu-Daudé
This test was written/tested around beginning of 2019, but was extracted from a bigger series and posted end of June 2019 [*]. Unfortunately I did not notice commit 162abf1a8 was merged by then, which implements the AHB and APB plug and play devices. HelenOS 0.6 is expecting the PnP registers to

[PATCH-for-5.1 6/7] target/sparc/int32_helper: Remove DEBUG_PCALL definition

2020-03-31 Thread Philippe Mathieu-Daudé
We define DEBUG_PCALL since b884fc5e (2012-10-06). 7.5 years later it is safe to assume we can remove it :) Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/int32_helper.c | 5 - 1 file changed, 5 deletions(-) diff --git a/target/sparc/int32_helper.c b/target/sparc/int32_helper.c

[PATCH 0/7] hw/sparc/leon3: Few fixes and disable HelenOS test

2020-03-31 Thread Philippe Mathieu-Daudé
The Leon3Machine.test_leon3_helenos_uimage has been running erratically since some time now. Time to disable it (at least until we make it reliable). Few other patches added while tracking the issue. Philippe Mathieu-Daudé (7): tests/acceptance/machine_sparc_leon3: Disable HelenOS test

[PATCH-for-5.0 2/7] hw/misc/grlib_ahb_apb_pnp: Avoid crash when writing to AHB PnP registers

2020-03-31 Thread Philippe Mathieu-Daudé
Similarly to commit 158b659451 with the APB PnP registers, guests can crash QEMU when writting to the AHB PnP registers: $ echo 'writeb 0xf042 69' | qemu-system-sparc -M leon3_generic -S -bios /etc/magic -qtest stdio [I 1571938309.932255] OPENED [R +0.063474] writeb 0xf042 69

Re: [PATCH v2 08/22] vfio/common: provide PASID alloc/free hooks

2020-03-31 Thread Auger Eric
Yi, On 3/30/20 6:24 AM, Liu Yi L wrote: > This patch defines vfio_host_iommu_context_info, implements the PASID > alloc/free hooks defined in HostIOMMUContextClass. > > Cc: Kevin Tian > Cc: Jacob Pan > Cc: Peter Xu > Cc: Eric Auger > Cc: Yi Sun > Cc: David Gibson > Cc: Alex Williamson >

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-03-31 Thread Janosch Frank
On 3/31/20 12:16 PM, Cornelia Huck wrote: > On Tue, 31 Mar 2020 11:46:53 +0200 > Janosch Frank wrote: > >> On 3/31/20 11:35 AM, Cornelia Huck wrote: >>> On Tue, 31 Mar 2020 03:14:56 -0400 >>> Janosch Frank wrote: >>> Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested

Re: [PATCH for-5.0 2/3] fw_cfg: Migrate ACPI table mr sizes separately

2020-03-31 Thread Dr. David Alan Gilbert
* Shameer Kolothum (shameerali.kolothum.th...@huawei.com) wrote: > Any sub-page size update to ACPI MRs will be lost during > migration, as we use aligned size in ram_load_precopy() -> > qemu_ram_resize() path. This will result in inconsistency in > FWCfgEntry sizes between source and destination.

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

2020-03-31 Thread Max Reitz
On 31.03.20 11:51, Alberto Garcia wrote: > On Tue 31 Mar 2020 10:57:18 AM CEST, Max Reitz wrote: >> I’ll have to dequeue it again, because it breaks iotests 046 and 177 >> (both of which already have special handling for v2-specific discard; >> but it needs to be adjusted now that the discard

Re: [PATCH v6 04/42] nvme: bump spec data structures to v1.3

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:38 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:37, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Add missing fields in the Identify Controller and Identify Namespace > > > data structures to

Re: [PATCH v6 07/42] nvme: refactor nvme_addr_read

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:39 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:38, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Pull the controller memory buffer check to its own function. The check > > > will be used on

Re: [PATCH v10 13/14] iotests: Mark verify functions as private

2020-03-31 Thread Max Reitz
On 31.03.20 02:00, John Snow wrote: > Mark the verify functions as "private" with a leading underscore, to > discourage their use. Update type signatures while we're here. > > (Also, make pending patches not yet using the new entry points fail in a > very obvious way.) > > Signed-off-by: John

Re: [PATCH] s390x: kvm: Fix number of cpu reports for stsi 3.2.2

2020-03-31 Thread David Hildenbrand
On 31.03.20 12:11, Cornelia Huck wrote: > On Mon, 30 Mar 2020 18:04:09 +0200 > David Hildenbrand wrote: > >> On 30.03.20 17:38, Janosch Frank wrote: >>> The cpu number reporting is handled by KVM and QEMU only fills in the >>> VM name, uuid and other values. >>> >>> Unfortuantely KVM doesn't

Re: deprecation of in-tree builds

2020-03-31 Thread Daniel P . Berrangé
On Sat, Mar 21, 2020 at 08:50:34PM +, Peter Maydell wrote: > AIUI from Paolo, the intention is to deprecate and eventually > stop supporting "in-tree" builds, so that the only option is > building in a separate build directory. I thought we should > probably mention that in the 5.0 changelog,

[PATCH] configure: warn if not using a separate build directory

2020-03-31 Thread Daniel P . Berrangé
Running configure directly from the source directory is a build configuration that will go away in future. It is also not currently covered by any automated testing. Display a deprecation warning if the user attempts to use an in-srcdir build setup, so that they are aware that they're building

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-03-31 Thread David Hildenbrand
On 26.03.20 10:49, Michael S. Tsirkin wrote: > On Thu, Mar 26, 2020 at 08:54:04AM +0100, David Hildenbrand wrote: >> >> >>> Am 26.03.2020 um 08:21 schrieb Michael S. Tsirkin : >>> >>> On Thu, Mar 12, 2020 at 09:51:25AM +0100, David Hildenbrand wrote: > On 12.03.20 09:47, Michael S. Tsirkin

Re: [PATCH] spapr: Don't allow unplug of NVLink2 devices

2020-03-31 Thread Alexey Kardashevskiy
On 31/03/2020 18:56, Philippe Mathieu-Daudé wrote: > On 3/31/20 5:27 AM, David Gibson wrote: >> Currently, we can't properly handle unplug of NVLink2 devices, because we >> don't have code to tear down their special memory resources.  There's not >> a lot of impetus to implement that: since

Re: [PATCH 0/4] spapr: Get rid of CAS reboot flag

2020-03-31 Thread Alexey Kardashevskiy
On 31/03/2020 18:08, Greg Kurz wrote: > On Tue, 31 Mar 2020 13:59:01 +1100 > Alexey Kardashevskiy wrote: > >> >> >> On 31/03/2020 11:44, David Gibson wrote: >>> On Wed, Mar 25, 2020 at 04:25:24PM +0100, Greg Kurz wrote: The CAS reboot flag was introduced in QEMU 2.10 to allow the guest

Re: [PATCH v1] usb: Add read support for HCIVERSION register to XHCI

2020-03-31 Thread Cameron Esfahani via
Actually, reading the specification a little more, the only fields which are documented as being smaller than 4-bytes are CAPLENGTH (1-byte) and HCIVERSION (2-bytes). So maybe change impl.min_access_size to 1 and rely on the fact that traditionally callers haven't read less than 4-bytes for

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

2020-03-31 Thread Max Reitz
On 31.03.20 02:00, John Snow wrote: > Minor cleanup for HMP functions; helps with line length and consolidates > HMP helpers through one implementation function. > > Although we are adding a universal toggle to turn QMP logging on or off, > many existing callers to hmp functions don't expect that

Re: deprecation of in-tree builds

2020-03-31 Thread Peter Maydell
On Tue, 31 Mar 2020 at 10:20, Liviu Ionescu wrote: > > On 31 Mar 2020, at 10:48, Paolo Bonzini wrote: > > Serious question: why is automatic directly creation more convenient for > > developers? > > For my use case it isn't, automatic creation will break my folder structure > and I'll not be

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-03-31 Thread Cornelia Huck
On Tue, 31 Mar 2020 11:46:53 +0200 Janosch Frank wrote: > On 3/31/20 11:35 AM, Cornelia Huck wrote: > > On Tue, 31 Mar 2020 03:14:56 -0400 > > Janosch Frank wrote: > > > >> Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested > >> a bit more thorough. > > > >

Re: [PATCH] s390x: kvm: Fix number of cpu reports for stsi 3.2.2

2020-03-31 Thread Cornelia Huck
On Mon, 30 Mar 2020 18:04:09 +0200 David Hildenbrand wrote: > On 30.03.20 17:38, Janosch Frank wrote: > > The cpu number reporting is handled by KVM and QEMU only fills in the > > VM name, uuid and other values. > > > > Unfortuantely KVM doesn't report reserved cpus and doesn't even know > >

Re: [PATCH v1] usb: Add read support for HCIVERSION register to XHCI

2020-03-31 Thread Cameron Esfahani via
Philippe - From what I've seen, access size has nothing to do with alignment. What the code in access_with_adjusted_size() will do is make sure that "size" is >= min_access_size and <= max_access_size. So reading 2-bytes from address 2 turns into reading 4-bytes from address 2: xhci_cap_read()

Re: [PATCH RFC 8/9] target/riscv: Handler KVM_EXIT_RISCV_SBI exit

2020-03-31 Thread Anup Patel
On Tue, Mar 31, 2020 at 2:56 PM Jiangyifei wrote: > > > > -Original Message- > > From: Anup Patel [mailto:a...@brainfault.org] > > Sent: Tuesday, March 31, 2020 1:17 PM > > To: Jiangyifei > > Cc: QEMU Developers ; open list:RISC-V > ri...@nongnu.org>; Anup Patel ; Zhanghailiang > > ;

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

2020-03-31 Thread Alberto Garcia
On Tue 31 Mar 2020 10:57:18 AM CEST, Max Reitz wrote: > I’ll have to dequeue it again, because it breaks iotests 046 and 177 > (both of which already have special handling for v2-specific discard; > but it needs to be adjusted now that the discard operation no longer > reveals the backing file

Re: [PATCH v6 09/42] nvme: add max_ioqpairs device parameter

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:40 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:39, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > The num_queues device paramater has a slightly confusing meaning because > > > it accounts for

Re: [PATCH 5/7] target/ppc: Rework ppc_radix64_walk_tree() for partition-scoped translation

2020-03-31 Thread Greg Kurz
On Tue, 31 Mar 2020 11:10:20 +0200 Cédric Le Goater wrote: > On 3/30/20 7:00 PM, Greg Kurz wrote: > > On Mon, 30 Mar 2020 11:49:44 +0200 > > Cédric Le Goater wrote: > > > >> The ppc_radix64_walk_tree() routine walks through the nested radix > >> tables to look for a PTE. > >> > >> Split it two

Re: [PATCH v6 11/42] nvme: add temperature threshold feature

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:40 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:40, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > It might seem wierd to implement this feature for an emulated device, > > > but it is

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-03-31 Thread Janosch Frank
On 3/31/20 11:35 AM, Cornelia Huck wrote: > On Tue, 31 Mar 2020 03:14:56 -0400 > Janosch Frank wrote: > >> Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested >> a bit more thorough. > > s/thorough/thoroughly/ ? > >> >> In this test we set a custom name and uuid through the

Re: [PATCH v6 12/42] nvme: add support for the get log page command

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:41 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:40, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Add support for the Get Log Page command and basic implementations of > > > the mandatory

Re: [PATCH v6 14/42] nvme: add missing mandatory features

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:41 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:41, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Add support for returning a resonable response to Get/Set Features of > > > mandatory

Re: bdrv_drained_begin deadlock with io-threads

2020-03-31 Thread Dietmar Maurer
> Inside exec.c, there is a race: > > --- > static bool prepare_mmio_access(MemoryRegion *mr) > { > bool unlocked = !qemu_mutex_iothread_locked(); > bool release_lock = false; > > if (unlocked && mr->global_locking) { > qemu_mutex_lock_iothread(); > -- > > IMHO,

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-03-31 Thread Cornelia Huck
On Tue, 31 Mar 2020 03:14:56 -0400 Janosch Frank wrote: > Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested > a bit more thorough. s/thorough/thoroughly/ ? > > In this test we set a custom name and uuid through the QEMU command > line. Both parameters will be passed to the

Re: [PATCH v6 23/42] nvme: add mapping helpers

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:44 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:45, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > > > use them in

Re: [PATCH v6 19/42] nvme: enforce valid queue creation sequence

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:41 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:43, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Support returning Command Sequence Error if Set Features on Number of > > > Queues is called

[PATCH v12 2/4] qcow2: rework the cluster compression routine

2020-03-31 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/qcow2-threads.c | 71

[PATCH v12 4/4] iotests: 287: add qcow2 compression type test

2020-03-31 Thread Denis Plotnikov
The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/287 | 128 + tests/qemu-iotests/287.out

[PATCH v12 0/4] qcow2: Implement zstd cluster compression method

2020-03-31 Thread Denis Plotnikov
v12: * 03: again, rework compression and decompression loops to make them more correct [Vladimir] 03: move assert in compression to more appropriate place [Vladimir] v11: * 03: the loops don't need "do{}while" form anymore and the they were buggy (missed

[PATCH v12 1/4] qcow2: introduce compression type feature

2020-03-31 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus

[PATCH v12 3/4] qcow2: add zstd cluster compression

2020-03-31 Thread Denis Plotnikov
zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance test results: Test compresses and

Re: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation

2020-03-31 Thread Gerd Hoffmann
On Sat, Mar 28, 2020 at 05:16:59PM -0700, Paul Zimmerman wrote: > This patch series adds emulation for the dwc-hsotg USB controller, > which is used on the Raspberry Pi 3 and earlier, as well as a number > of other development boards. The main benefit for Raspberry Pi is that > this enables

RE: [PATCH RFC 8/9] target/riscv: Handler KVM_EXIT_RISCV_SBI exit

2020-03-31 Thread Jiangyifei
> -Original Message- > From: Anup Patel [mailto:a...@brainfault.org] > Sent: Tuesday, March 31, 2020 1:17 PM > To: Jiangyifei > Cc: QEMU Developers ; open list:RISC-V ri...@nongnu.org>; Anup Patel ; Zhanghailiang > ; Sagar Karandikar > ; Bastian Koppelmann paderborn.de>; Zhangxiaofeng

Re: [PATCH v6 24/42] nvme: remove redundant has_sg member

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:44 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:45, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Remove the has_sg member from NvmeRequest since it's redundant. > > > > To be honest this

Re: [PATCH v6 29/42] nvme: refactor request bounds checking

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:44 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:56, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Signed-off-by: Klaus Jensen > > > --- > > > hw/block/nvme.c | 28

Re: deprecation of in-tree builds

2020-03-31 Thread Liviu Ionescu
> On 31 Mar 2020, at 10:48, Paolo Bonzini wrote: > > On 30/03/20 16:37, Kevin Wolf wrote: >> If manually dealing with separate build directories is inconvenient >> today, It may be for some, but it isn't for all, perhaps we should not generalise and get the wrong conclusions. In the xPack

Re: bdrv_drained_begin deadlock with io-threads

2020-03-31 Thread Dietmar Maurer
Inside exec.c, there is a race: --- static bool prepare_mmio_access(MemoryRegion *mr) { bool unlocked = !qemu_mutex_iothread_locked(); bool release_lock = false; if (unlocked && mr->global_locking) { qemu_mutex_lock_iothread(); -- IMHO, checking for unlocked that way

Re: [PATCH v6 31/42] nvme: add check for prinfo

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:45 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:57, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Check the validity of the PRINFO field. > > > > > > Signed-off-by: Klaus Jensen > > > --- >

Re: [PATCH RFC 2/9] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2020-03-31 Thread Anup Patel
On Fri, Mar 13, 2020 at 9:23 AM Yifei Jiang wrote: > > Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. > Meanwhile, add riscv64 kvm support to configure. This should be for both riscv64 and riscv32. The KVMTOOL compiles perfectly fine for riscv32 (although not tested

Re: [PATCH 1/6] scripts/coccinelle: add error-use-after-free.cocci

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 12:00, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add script to find and fix trivial use-after-free of Error objects. How to use: spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \ --macro-file scripts/cocci-macro-file.h --in-place \

Re: [PATCH 2/6] block/mirror: fix use after free of local_err

2020-03-31 Thread Markus Armbruster
Max Reitz writes: > On 25.03.20 12:47, Vladimir Sementsov-Ogievskiy wrote: >> 25.03.2020 14:11, Max Reitz wrote: >>> On 24.03.20 16:36, Vladimir Sementsov-Ogievskiy wrote: local_err is used again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to

Re: [PATCH v6 32/42] nvme: allow multiple aios per command

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:47 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:57, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > This refactors how the device issues asynchronous block backend > > > requests. The

Re: [PATCH 5/7] target/ppc: Rework ppc_radix64_walk_tree() for partition-scoped translation

2020-03-31 Thread Cédric Le Goater
On 3/30/20 7:00 PM, Greg Kurz wrote: > On Mon, 30 Mar 2020 11:49:44 +0200 > Cédric Le Goater wrote: > >> The ppc_radix64_walk_tree() routine walks through the nested radix >> tables to look for a PTE. >> >> Split it two and introduce a new routine ppc_radix64_next_level() > > Split it in two...

Re: [PATCH v11 3/4] qcow2: add zstd cluster compression

2020-03-31 Thread Vladimir Sementsov-Ogievskiy
31.03.2020 11:34, Denis Plotnikov wrote: On 31.03.2020 11:10, Vladimir Sementsov-Ogievskiy wrote: 31.03.2020 10:55, Denis Plotnikov wrote: On 31.03.2020 09:22, Vladimir Sementsov-Ogievskiy wrote: 30.03.2020 18:04, Denis Plotnikov wrote: On 30.03.2020 16:14, Vladimir Sementsov-Ogievskiy

Re: [PATCH 1/6] scripts/coccinelle: add error-use-after-free.cocci

2020-03-31 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add script to find and fix trivial use-after-free of Error objects. > How to use: > spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \ > --macro-file scripts/cocci-macro-file.h --in-place \ > --no-show-diff ( FILES... | --use-gitgrep . )

Re: [PATCH v5 07/18] s390x: protvirt: Inhibit balloon when switching to protected mode

2020-03-31 Thread David Hildenbrand
>> I would have thought we would have to disallow on the hypervisor/device >> side. (no expert on user space drivers, especially how they >> detect/enable/access virtio devices) > > QEMU does exactly this: > > static int virtio_validate_features(VirtIODevice *vdev) > { > VirtioDeviceClass *k

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

2020-03-31 Thread Max Reitz
On 30.03.20 12:05, Max Reitz wrote: > On 27.03.20 19:59, 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

Re: [PATCH v6 36/42] nvme: add support for scatter gather lists

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:48 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:58, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > For now, support the Data Block, Segment and Last Segment descriptor > > > types. > > > > > >

Re: [PATCH v6 38/42] nvme: support multiple namespaces

2020-03-31 Thread Maxim Levitsky
On Tue, 2020-03-31 at 07:48 +0200, Klaus Birkelund Jensen wrote: > On Mar 25 12:59, Maxim Levitsky wrote: > > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > This adds support for multiple namespaces by introducing a new 'nvme-ns' > > > device model.

bdrv_drained_begin deadlock with io-threads

2020-03-31 Thread Dietmar Maurer
I can see and reproduce this error with latest code from today. But I also see it on stable 4.1.1 (sometimes). I guess this is a similar problem as reported earlier: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07363.html To reproduce, you need a VM using virtio-scsi-single drive

Re: [PATCH v2 3/4] target/i386: add the missing features for Icelake-Server CPU model

2020-03-31 Thread Robert Hoo
On Sat, 2020-03-28 at 11:06 +0800, Chenyi Qiang wrote: > Add the SHA_NI and AVX512IFMA feature bits in FEAT_7_0_EBX, RDPID > feature bit in FEAT_7_0_ECX and FSRM feature bit in FEAT_7_0_EDX. > > Signed-off-by: Chenyi Qiang > --- > target/i386/cpu.c | 10 ++ > 1 file changed, 10

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-03-31 Thread David Hildenbrand
On 31.03.20 10:29, Janosch Frank wrote: > On 3/31/20 10:24 AM, David Hildenbrand wrote: >> On 31.03.20 09:14, Janosch Frank wrote: >>> Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested >>> a bit more thorough. >>> >>> In this test we set a custom name and uuid through the QEMU

<    1   2   3   4   >