[PATCH v8 06/74] cpu: introduce process_queued_cpu_work_locked

2020-03-26 Thread Robert Foley
From: "Emilio G. Cota" This completes the conversion to cpu_mutex_lock/unlock in the file. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- cpus-common.c | 17 +++-- 1 file changed, 11 insertions(+), 6

[PATCH v8 04/74] cpu: make qemu_work_cond per-cpu

2020-03-26 Thread Robert Foley
From: "Emilio G. Cota" This eliminates the need to use the BQL to queue CPU work. While at it, give the per-cpu field a generic name ("cond") since it will soon be used for more than just queueing CPU work. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota

[PATCH v8 01/74] cpu: convert queued work to a QSIMPLEQ

2020-03-26 Thread Robert Foley
From: "Emilio G. Cota" Instead of open-coding it. While at it, make sure that all accesses to the list are performed while holding the list's lock. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- cpus-common.c |

[PATCH v8 03/74] cpu: introduce cpu_mutex_lock/unlock

2020-03-26 Thread Robert Foley
From: "Emilio G. Cota" The few direct users of >lock will be converted soon. The per-thread bitmap introduced here might seem unnecessary, since a bool could just do. However, once we complete the conversion to per-vCPU locks, we will need to cover the use case where all vCPUs are locked by the

[PATCH v8 00/74] per-CPU locks

2020-03-26 Thread Robert Foley
V7: https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg00786.html This is a continuation of the series created by Emilio Cota. We are picking up this patch set with the goal to apply any fixes or updates needed to get this accepted. Quoting an earlier patch in the series: "For context,

Re: [PATCH v16 QEMU 13/16] vfio: Add function to start and stop dirty pages tracking

2020-03-26 Thread Alex Williamson
On Wed, 25 Mar 2020 02:39:11 +0530 Kirti Wankhede wrote: > Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking > for VFIO devices. > > Signed-off-by: Kirti Wankhede > --- > hw/vfio/migration.c | 36 > 1 file changed, 36 insertions(+) >

[Bug 1693050] Re: xhci HCIVERSION register read emulation incorrectly handled

2020-03-26 Thread Philippe Mathieu-Daudé
Odd, this should be fixed by commit 6ee021d41 and 36960b4d66..98f52cdbb5c. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1693050 Title: xhci HCIVERSION register read emulation incorrectly handled

Re: [PATCH] i386/cpu: Expand MAX_FIXED_COUNTERS from 3 to 4 to for Icelake

2020-03-26 Thread Paolo Bonzini
On 17/03/20 06:54, Like Xu wrote: > In the Intel SDM, "Table 18-2. Association of Fixed-Function > Performance Counters with Architectural Performance Events", > we may have a new fixed counter 'TOPDOWN.SLOTS' (since Icelake), > which counts the number of available slots for an unhalted > logical

Re: [PATCH] qcow2: Remove unused fields from BDRVQcow2State

2020-03-26 Thread Philippe Mathieu-Daudé
On 3/26/20 6:07 PM, Kevin Wolf wrote: These fields were already removed in commit c3c10f72, but then commit b58deb34 revived them probably due to bad merge conflict resolution. They are still unused, so remove them again. Fixes: b58deb344ddff3b9d8b265bf73a65274767ee5f4 Signed-off-by: Kevin Wolf

Re: [PATCH v2 2/2] mirror: Wait only for in-flight operations

2020-03-26 Thread Max Reitz
On 26.03.20 16:36, Kevin Wolf wrote: > mirror_wait_for_free_in_flight_slot() just picks a random operation to > wait for. However, a MirrorOp is already in s->ops_in_flight when > mirror_co_read() waits for free slots, so if not enough slots are > immediately available, an operation can end up

Re: [PATCH v6 23/61] target/riscv: vector integer merge and move instructions

2020-03-26 Thread Alistair Francis
On Tue, Mar 17, 2020 at 8:53 AM LIU Zhiwei wrote: > > Signed-off-by: LIU Zhiwei Reviewed-by: Alistair Francis Alistair > --- > target/riscv/helper.h | 17 > target/riscv/insn32.decode | 7 ++ > target/riscv/insn_trans/trans_rvv.inc.c | 121

[Bug 1869241] [NEW] svn checkout fails with E000075 "Value too large for defined data type"

2020-03-26 Thread Manuel Reimer
Public bug reported: I try to autobuild for ARM7 with qemu-arm-static. Part of this is downloading source via SVN. Whenever I try to download a SVN repository I get the following output: svn: E75: Can't read directory '...': Value too large for defined data type This is the repository

Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h

2020-03-26 Thread Paolo Bonzini
On 26/03/20 18:14, Peter Maydell wrote: >> +#ifndef atomic_fetch_add >> #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, >> __ATOMIC_SEQ_CST) >> #define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, >> __ATOMIC_SEQ_CST) >> #define atomic_fetch_and(ptr, n)

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-26 Thread Richard Henderson
On Wed, 25 Mar 2020 at 04:35, Daniel Brodsky wrote: > > There may be ways to rewrite that expression to avoid triggering the > > warning on a 32-bit platform. Untested, but does this help: > > > > if (sizeof(mask) > 4 && mask <= 0xu) { > > > > -- > > Eric Blake, Principal Software

[Bug 1869073] Re: qemu-arm-static crashes "segmentation fault" when running "git clone -s"

2020-03-26 Thread Manuel Reimer
Actually this one magically went good. I'm testing in Virtual Box as my ARM64 host. Maybe something went wrong there. After rebooting the whole machine today "git" works well. Will reopen if it happens again... ** Changed in: qemu Status: New => Incomplete -- You received this bug

Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-26 Thread Alex Williamson
On Thu, 26 Mar 2020 18:35:48 +0100 Auger Eric wrote: > Hi Alex, > > On 3/24/20 12:08 AM, Alex Williamson wrote: > > [Cc +dwg who originated this warning] > > > > On Mon, 23 Mar 2020 14:16:09 +0530 > > Bharat Bhushan wrote: > > > >> On ARM, the MSI doorbell is translated by the virtual

Re: [PATCH v16 QEMU 05/16] vfio: Add migration region initialization and finalize function

2020-03-26 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > - Migration functions are implemented for VFIO_DEVICE_TYPE_PCI device in this > patch series. > - VFIO device supports migration or not is decided based of migration region > query. If migration region query is successful and migration region >

Re: [RFC v6 01/24] update-linux-headers: Import iommu.h

2020-03-26 Thread Auger Eric
Hi Yi, On 3/26/20 1:58 PM, Liu, Yi L wrote: >> From: Eric Auger >> Sent: Saturday, March 21, 2020 12:58 AM >> To: eric.auger@gmail.com; eric.au...@redhat.com; qemu-devel@nongnu.org; >> Subject: [RFC v6 01/24] update-linux-headers: Import iommu.h >> >> Update the script to import the new

Re: [PATCH v16 QEMU 04/16] vfio: Add save and load functions for VFIO PCI devices

2020-03-26 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > These functions save and restore PCI device specific data - config > space of PCI device. > Tested save and restore with MSI and MSIX type. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > --- > hw/vfio/pci.c | 163 >

Re: [PATCH v16 QEMU 04/16] vfio: Add save and load functions for VFIO PCI devices

2020-03-26 Thread Alex Williamson
On Thu, 26 Mar 2020 17:29:26 + "Dr. David Alan Gilbert" wrote: > * Alex Williamson (alex.william...@redhat.com) wrote: > > On Wed, 25 Mar 2020 02:39:02 +0530 > > Kirti Wankhede wrote: > > > > > These functions save and restore PCI device specific data - config > > > space of PCI device.

Re: [PATCH v9 1/9] hw/vfio/common: Remove error print on mmio region translation by viommu

2020-03-26 Thread Auger Eric
Hi Alex, On 3/24/20 12:08 AM, Alex Williamson wrote: > [Cc +dwg who originated this warning] > > On Mon, 23 Mar 2020 14:16:09 +0530 > Bharat Bhushan wrote: > >> On ARM, the MSI doorbell is translated by the virtual IOMMU. >> As such address_space_translate() returns the MSI controller >> MMIO

Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h

2020-03-26 Thread Alex Bennée
Peter Maydell writes: > On Thu, 26 Mar 2020 at 17:01, Alex Bennée wrote: >> >> Deep inside the FreeBSD netmap headers we end up including stdatomic.h >> which clashes with qemu's atomic functions which are modelled along >> the C11 standard. To avoid a massive rename lets just ifdef around

Re: [PATCH v16 QEMU 04/16] vfio: Add save and load functions for VFIO PCI devices

2020-03-26 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Wed, 25 Mar 2020 02:39:02 +0530 > Kirti Wankhede wrote: > > > These functions save and restore PCI device specific data - config > > space of PCI device. > > Tested save and restore with MSI and MSIX type. > > > > Signed-off-by: Kirti

Re: [PATCH v2 0/3] Fix some AIO context locking in jobs

2020-03-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200326155628.859862-1-s.rei...@proxmox.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 === #!/bin/bash

Re: qemu-system-aarch64 windows binary run Arm64 defconfig kernel not working

2020-03-26 Thread yoma sophian
hi Peter: > Are you using a 32-bit Windows qemu binary or a 64-bit one? > (I'm wondering if this is a 32-bit vs 64-bit bug.) unfortunately, 32-bit Windows qemu binary still fail on booting upstream arm64 defconfig kernel. in below log, I 1st purposely type wrong option, such that you can tell

Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h

2020-03-26 Thread Peter Maydell
On Thu, 26 Mar 2020 at 17:01, Alex Bennée wrote: > > Deep inside the FreeBSD netmap headers we end up including stdatomic.h > which clashes with qemu's atomic functions which are modelled along > the C11 standard. To avoid a massive rename lets just ifdef around the > problem. > > Signed-off-by:

Re: [PATCH] qcow2: Remove unused fields from BDRVQcow2State

2020-03-26 Thread Eric Blake
On 3/26/20 12:07 PM, Kevin Wolf wrote: These fields were already removed in commit c3c10f72, but then commit b58deb34 revived them probably due to bad merge conflict resolution. They are still unused, so remove them again. Fixes: b58deb344ddff3b9d8b265bf73a65274767ee5f4 Signed-off-by: Kevin

Re: [PATCH v2 0/3] Fix some AIO context locking in jobs

2020-03-26 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200326155628.859862-1-s.rei...@proxmox.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

[PATCH] qcow2: Remove unused fields from BDRVQcow2State

2020-03-26 Thread Kevin Wolf
These fields were already removed in commit c3c10f72, but then commit b58deb34 revived them probably due to bad merge conflict resolution. They are still unused, so remove them again. Fixes: b58deb344ddff3b9d8b265bf73a65274767ee5f4 Signed-off-by: Kevin Wolf --- block/qcow2.h | 3 --- 1 file

[PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h

2020-03-26 Thread Alex Bennée
Deep inside the FreeBSD netmap headers we end up including stdatomic.h which clashes with qemu's atomic functions which are modelled along the C11 standard. To avoid a massive rename lets just ifdef around the problem. Signed-off-by: Alex Bennée --- include/qemu/atomic.h | 6 ++ 1 file

Re: [PULL 00/10] Block patches for 5.0-rc1

2020-03-26 Thread Peter Maydell
On Thu, 26 Mar 2020 at 14:29, Max Reitz wrote: > > The following changes since commit 01e38186ecb1fc6275720c5425332eed280ea93d: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20200325b' into staging (2020-03-26 > 09:28:11 +) > > are available in the Git

Re: [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect

2020-03-26 Thread Cornelia Huck
On Thu, 26 Mar 2020 10:05:05 -0400 Janosch Frank wrote: > In case the protection of the machine fails at s390_pv_vm_enable(), > we'll currently report the local_error variable. Problem is that > there's no migration blocker error that we can report at this point so > the pointer is always NULL

Re: [PATCH] qemu-user: fix build with LLVM lld 10

2020-03-26 Thread Richard Henderson
On 3/26/20 6:43 AM, Roger Pau Monne wrote: > lld 10.0.0 introduced a new linker option --image-base equivalent to > the GNU -Ttext-segment one, hence use it when available. > > This fixes the build of QEMU on systems using lld 10 or greater. > > Signed-off-by: Dimitry Andric > Signed-off-by:

Re: [PATCH v9 3/4] linux-user: Support futex_time64

2020-03-26 Thread Alistair Francis
On Wed, Mar 25, 2020 at 11:22 PM Laurent Vivier wrote: > > Le 25/03/2020 à 18:41, Alistair Francis a écrit : > > On Wed, Mar 18, 2020 at 3:54 PM Alistair Francis > > wrote: > >> > >> Add support for host and target futex_time64. If futex_time64 exists on > >> the host we try that first before

Re: booke206_tlb_ways() returning 0

2020-03-26 Thread Laurent Vivier
Le 26/03/2020 à 15:22, Peter Maydell a écrit : > Hi; Coverity points out a possible issue in booke206_get_tlbm() > (this is CID 1421942): > > > static inline ppcmas_tlb_t *booke206_get_tlbm(CPUPPCState *env, const int > tlbn, > target_ulong ea, int

Re: [PULL 0/6] Linux user for 5.0 patches

2020-03-26 Thread Laurent Vivier
Le 26/03/2020 à 16:42, Peter Maydell a écrit : > On Thu, 26 Mar 2020 at 07:24, Laurent Vivier wrote: >> >> The following changes since commit 736cf607e40674776d752acc201f565723e86045: >> >> Update version for v5.0.0-rc0 release (2020-03-24 17:50:00 +) >> >> are available in the Git

Re: [PATCH RFC 9/9] KVM: Dirty ring support

2020-03-26 Thread Peter Xu
On Thu, Mar 26, 2020 at 02:14:36PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Wed, Mar 25, 2020 at 08:41:44PM +, Dr. David Alan Gilbert wrote: > > > > [...] > > > > > > +enum KVMReaperState { > > > > +KVM_REAPER_NONE = 0, > > > > +/* The

Re: [PATCH v9 2/9] memory: Add interface to set iommu page size mask

2020-03-26 Thread Auger Eric
Hi Bharat, On 3/23/20 9:46 AM, Bharat Bhushan wrote: > Allow to set page size mask to be supported by iommu. by iommu memory region. I mean this is not global to the IOMMU. > This is required to expose page size mask compatible with > host with virtio-iommu. > > Signed-off-by: Bharat Bhushan >

Re: [PATCH RFC 8/9] KVM: Add dirty-ring-size property

2020-03-26 Thread Peter Xu
On Thu, Mar 26, 2020 at 01:41:44PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Wed, Mar 25, 2020 at 08:00:31PM +, Dr. David Alan Gilbert wrote: > > > > @@ -2077,6 +2079,33 @@ static int kvm_init(MachineState *ms) > > > >

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

2020-03-26 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 v2 2/3] job: take each job's lock individually in job_txn_apply

2020-03-26 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 v2 1/3] backup: don't acquire aio_context in backup_clean

2020-03-26 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

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

2020-03-26 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: [PATCH v1 12/22] intel_iommu: add PASID cache management infrastructure

2020-03-26 Thread Peter Xu
On Thu, Mar 26, 2020 at 01:57:10PM +, Liu, Yi L wrote: > > From: Liu, Yi L > > Sent: Thursday, March 26, 2020 2:15 PM > > To: 'Peter Xu' > > Subject: RE: [PATCH v1 12/22] intel_iommu: add PASID cache management > > infrastructure > > > > > From: Peter Xu > > > Sent: Wednesday, March 25,

Re: [PATCH v2 0/2] mirror: Fix hang (operation waiting for itself/circular dependency)

2020-03-26 Thread Eric Blake
On 3/26/20 10:36 AM, Kevin Wolf wrote: The recent fix didn't actually fix the whole problem. Operations can't only wait for themselves, but we can also end up with circular dependencies like two operations waiting for each other to complete. This reverts the first fix and implements another

Re: [PATCH v9 4/9] virtio-iommu: set supported page size mask

2020-03-26 Thread Auger Eric
Hi Bharat, On 3/23/20 9:46 AM, Bharat Bhushan wrote: > Add optional interface to set page size mask. > Currently this is set global configuration and not > per endpoint. This allows to override the page size mask per end-point? > > Signed-off-by: Bharat Bhushan > --- >

Re: [PATCH v9 8/9] virtio-iommu: Implement probe request

2020-03-26 Thread Auger Eric
Hi Bharat On 3/23/20 9:46 AM, Bharat Bhushan wrote: > This patch implements the PROBE request. Currently supported > page size mask per endpoint is returned. Also append a NONE > property in the end. > > Signed-off-by: Bharat Bhushan > Signed-off-by: Eric Auger > --- >

Re: [PULL 0/6] Linux user for 5.0 patches

2020-03-26 Thread Peter Maydell
On Thu, 26 Mar 2020 at 07:24, Laurent Vivier wrote: > > The following changes since commit 736cf607e40674776d752acc201f565723e86045: > > Update version for v5.0.0-rc0 release (2020-03-24 17:50:00 +) > > are available in the Git repository at: > > git://github.com/vivier/qemu.git

[PATCH v2 2/2] mirror: Wait only for in-flight operations

2020-03-26 Thread Kevin Wolf
mirror_wait_for_free_in_flight_slot() just picks a random operation to wait for. However, a MirrorOp is already in s->ops_in_flight when mirror_co_read() waits for free slots, so if not enough slots are immediately available, an operation can end up waiting for itself, or two or more operations

[PATCH v2 1/2] Revert "mirror: Don't let an operation wait for itself"

2020-03-26 Thread Kevin Wolf
This reverts commit 7e6c4ff792734e196c8ca82564c56b5e7c6288ca. The fix was incomplete as it only protected against requests waiting for themselves, but not against requests waiting for each other. We need a different solution. Signed-off-by: Kevin Wolf --- block/mirror.c | 21

[PATCH v2 0/2] mirror: Fix hang (operation waiting for itself/circular dependency)

2020-03-26 Thread Kevin Wolf
The recent fix didn't actually fix the whole problem. Operations can't only wait for themselves, but we can also end up with circular dependencies like two operations waiting for each other to complete. This reverts the first fix and implements another approach. v2: - Mark active mirror

[PATCH] gdbstub: fix compiler complaining

2020-03-26 Thread Denis Plotnikov
./gdbstub.c: In function ‘handle_query_thread_extra’: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10: error: ‘cpu_name’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g_free (*pp); ^ ./gdbstub.c:2063:26: note:

[Bug 1869006] Re: PCIe cards passthrough to TCG guest works on 2GB of guest memory but fails on 4GB (vfio_dma_map invalid arg)

2020-03-26 Thread Marcin Juszkiewicz
I wanted to try the same on machine without MSI. But my desktop refuses to boot into sane environment with pci=nomsi kernel option. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1869006 Title:

[PULL 10/10] iotests/138: Test leaks/corruptions fixed report

2020-03-26 Thread Max Reitz
Test that qemu-img check reports the number of leaks and corruptions fixed in its JSON report (after a successful run). While touching the _unsupported_imgopts line, adjust the note on why data_file does not work with this test: The current comment sounds a bit like it is a mistake for qemu-img

[PULL 08/10] qemu-img: Fix check's leak/corruption fix report

2020-03-26 Thread Max Reitz
There are two problems with qemu-img check's report on how many leaks and/or corruptions have been fixed: (1) ImageCheck.has_leaks_fixed and ImageCheck.has_corruptions_fixed are only true when ImageCheck.leaks or ImageCheck.corruptions (respectively) are non-zero. qcow2's check implementation

[PULL 06/10] qcow2: Avoid feature name extension on small cluster size

2020-03-26 Thread Max Reitz
From: Eric Blake As the feature name table can be quite large (over 9k if all 64 bits of all three feature fields have names; a mere 8 features leaves only 8 bytes for a backing file name in a 512-byte cluster), it is unwise to emit this optional header in images with small cluster sizes.

[PULL 09/10] iotests: Add poke_file_[bl]e functions

2020-03-26 Thread Max Reitz
Similarly to peek_file_[bl]e, we may want to write binary integers into a file. Currently, this often means messing around with poke_file and raw binary strings. I hope these functions make it a bit more comfortable. Signed-off-by: Max Reitz Code-suggested-by: Eric Blake Message-Id:

[PULL 05/10] qcow2: List autoclear bit names in header

2020-03-26 Thread Max Reitz
From: Eric Blake The feature table is supposed to advertise the name of all feature bits that we support; however, we forgot to update the table for autoclear bits. While at it, move the table to read-only memory in code, and tweak the qcow2 spec to name the second autoclear bit. Update iotests

[PULL 07/10] sheepdog: Consistently set bdrv_has_zero_init_truncate

2020-03-26 Thread Max Reitz
From: Eric Blake block_int.h claims that .bdrv_has_zero_init must return 0 if .bdrv_has_zero_init_truncate does likewise; but this is violated if only the former callback is provided if .bdrv_co_truncate also exists. When adding the latter callback, it was mistakenly added to only one of the

[PULL 02/10] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Max Reitz
From: Maxim Levitsky This will allow the reuse of a single generic .bdrv_co_create implementation for several drivers. No functional changes. Signed-off-by: Maxim Levitsky Message-Id: <20200326011218.29230-2-mlevi...@redhat.com> Reviewed-by: Denis V. Lunev Signed-off-by: Max Reitz ---

[PULL 04/10] qcow2: Comment typo fixes

2020-03-26 Thread Max Reitz
From: Eric Blake Various trivial typos noticed while working on this file. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Message-Id: <20200324174233.1622067-2-ebl...@redhat.com> Signed-off-by: Max Reitz --- block/qcow2.c | 6 +++--- 1 file

[PULL 00/10] Block patches for 5.0-rc1

2020-03-26 Thread Max Reitz
The following changes since commit 01e38186ecb1fc6275720c5425332eed280ea93d: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200325b' into staging (2020-03-26 09:28:11 +) are available in the Git repository at: https://github.com/XanClic/qemu.git

[PULL 03/10] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Max Reitz
From: Maxim Levitsky Instead of checking the .bdrv_co_create_opts to see if we need the fallback, just implement the .bdrv_co_create_opts in the drivers that need it. This way we don't break various places that need to know if the underlying protocol/format really supports image creation, and

[PULL 01/10] block/mirror: fix use after free of local_err

2020-03-26 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy local_err is used again in mirror_exit_common() after bdrv_set_backing_hd(), so we must zero it. Otherwise try to set non-NULL local_err will crash. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200324153630.11882-3-vsement...@virtuozzo.com>

booke206_tlb_ways() returning 0

2020-03-26 Thread Peter Maydell
Hi; Coverity points out a possible issue in booke206_get_tlbm() (this is CID 1421942): static inline ppcmas_tlb_t *booke206_get_tlbm(CPUPPCState *env, const int tlbn, target_ulong ea, int way) { int r; uint32_t ways = booke206_tlb_ways(env,

Re: [PATCH RFC 9/9] KVM: Dirty ring support

2020-03-26 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Mar 25, 2020 at 08:41:44PM +, Dr. David Alan Gilbert wrote: > > [...] > > > > +enum KVMReaperState { > > > +KVM_REAPER_NONE = 0, > > > +/* The reaper is sleeping */ > > > +KVM_REAPER_WAIT, > > > +/* The reaper is reaping for

[PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect

2020-03-26 Thread Janosch Frank
In case the protection of the machine fails at s390_pv_vm_enable(), we'll currently report the local_error variable. Problem is that there's no migration blocker error that we can report at this point so the pointer is always NULL which leads to a SEGFAULT. Let's remove the error report.

Re: [PATCH] acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot()

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 09:56:24AM -0400, Igor Mammedov wrote: > Coverity spots subj in following guest triggered code path > pci_write(, data = 0) -> acpi_pcihp_eject_slot(,slots = 0) > uinst32_t slot = ctz32(slots) > ... > ... = ~(1U << slot) > where 'slot' value is 32 in case

RE: [PATCH v1 12/22] intel_iommu: add PASID cache management infrastructure

2020-03-26 Thread Liu, Yi L
> From: Liu, Yi L > Sent: Thursday, March 26, 2020 2:15 PM > To: 'Peter Xu' > Subject: RE: [PATCH v1 12/22] intel_iommu: add PASID cache management > infrastructure > > > From: Peter Xu > > Sent: Wednesday, March 25, 2020 10:52 PM > > To: Liu, Yi L > > Subject: Re: [PATCH v1 12/22]

[PATCH] acpi: pcihp: fix left shift undefined behavior in acpi_pcihp_eject_slot()

2020-03-26 Thread Igor Mammedov
Coverity spots subj in following guest triggered code path pci_write(, data = 0) -> acpi_pcihp_eject_slot(,slots = 0) uinst32_t slot = ctz32(slots) ... ... = ~(1U << slot) where 'slot' value is 32 in case 'slots' bitmap is empty. 'slots' is a bitmap and empty one shouldn't do

Re: [PATCH for-5.0 v2 0/3] qemu-img: Fix check's leak/corruption fix report

2020-03-26 Thread Max Reitz
On 24.03.20 18:27, Max Reitz wrote: > Branch: https://github.com/XanClic/qemu.git fix-check-result-v2 > Branch: https://git.xanclic.moe/XanClic/qemu.git fix-check-result-v2 > > v1: https://lists.nongnu.org/archive/html/qemu-block/2020-02/msg01418.html Thanks for the review again, applied to my

Re: [PATCH 2/2] util/bufferiszero: improve avx2 accelerator

2020-03-26 Thread Robert Hoo
On Thu, 2020-03-26 at 08:26 -0500, Eric Blake wrote: > On 3/25/20 9:09 PM, Hu, Robert wrote: > > (Don't know why my Linux-Evolution missed this mail.) > > > -Original Message- > > > Long line; it's nice to wrap commit messages around column 70 or > > > so (because > > > reading 'git log'

[PATCH] qemu-user: fix build with LLVM lld 10

2020-03-26 Thread Roger Pau Monne
lld 10.0.0 introduced a new linker option --image-base equivalent to the GNU -Ttext-segment one, hence use it when available. This fixes the build of QEMU on systems using lld 10 or greater. Signed-off-by: Dimitry Andric Signed-off-by: Roger Pau Monné --- Cc: Laurent Vivier Cc: Richard

Re: [PATCH RFC 8/9] KVM: Add dirty-ring-size property

2020-03-26 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Mar 25, 2020 at 08:00:31PM +, Dr. David Alan Gilbert wrote: > > > @@ -2077,6 +2079,33 @@ static int kvm_init(MachineState *ms) > > > s->memory_listener.listener.coalesced_io_add = > > > kvm_coalesce_mmio_region; > > >

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Max Reitz
On 26.03.20 14:35, Eric Blake wrote: > On 3/26/20 8:28 AM, Kevin Wolf wrote: >> Am 26.03.2020 um 14:20 hat Eric Blake geschrieben: +++ b/block/file-posix.c @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = {    .bdrv_reopen_prepare = raw_reopen_prepare,   

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 09:31:09 -0400 "Michael S. Tsirkin" wrote: > On Thu, Mar 26, 2020 at 09:28:27AM -0400, Michael S. Tsirkin wrote: > > On Thu, Mar 26, 2020 at 02:23:17PM +0100, Igor Mammedov wrote: > > > On Thu, 26 Mar 2020 11:52:36 + > > > Peter Maydell wrote: > > > > > > > Hi;

Re: [PATCH 0/2] Fix the generic image creation code

2020-03-26 Thread Max Reitz
On 26.03.20 13:23, Max Reitz wrote: > On 26.03.20 02:12, Maxim Levitsky wrote: >> The recent patches from Max Reitz allowed some block drivers to not >> provide the .bdrv_co_create_opts and still allow qemu-img to >> create/format images as long as the image is already existing >> (that is the

Re: [PATCH v6 7/7] virtio-net: add migration support for RSS and hash report

2020-03-26 Thread Michael S. Tsirkin
Code looks OK but patchew testing shows failures. If they are false positives pls reply to that mail. On Thu, Mar 26, 2020 at 02:34:39PM +0200, Yuri Benditovich wrote: > ping > > On Fri, Mar 20, 2020 at 1:58 PM Yuri Benditovich > wrote: > > Save and restore RSS/hash report configuration. >

Re: [PATCH for-5.0 v2 0/4] bug fixes extracted from larger qcow2 zero bit work

2020-03-26 Thread Max Reitz
On 24.03.20 18:42, Eric Blake wrote: > My proposal [1] to add an autoclear all-zero-content bit to the qcow2 > format has now stalled into 5.1 territory, but several patches in my > initial proposal are uncontroversial and obvious bug fixes worth > having in 5.0. > > [1]

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Eric Blake
On 3/26/20 8:28 AM, Kevin Wolf wrote: Am 26.03.2020 um 14:20 hat Eric Blake geschrieben: +++ b/block/file-posix.c @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = { .bdrv_reopen_prepare = raw_reopen_prepare, .bdrv_reopen_commit = raw_reopen_commit,

Re: [PATCH v6 0/7] reference implementation of RSS and hash report

2020-03-26 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 01:57:44PM +0200, Yuri Benditovich wrote: > Support for VIRTIO_NET_F_RSS and VIRTIO_NET_F_HASH_REPORT > features in QEMU for reference purpose. > Implements Toeplitz hash calculation for incoming > packets according to configuration provided by driver. > Uses calculated

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Maxim Levitsky
On Thu, 2020-03-26 at 08:20 -0500, Eric Blake wrote: > On 3/25/20 8:12 PM, Maxim Levitsky wrote: > > Instead of checking the .bdrv_co_create_opts to see if we need the failback, > > fallback 100% true. > > > just implement the .bdrv_co_create_opts in the drivers that need it. > > > > This way

Re: [PATCH v6 0/7] reference implementation of RSS and hash report

2020-03-26 Thread Michael S. Tsirkin
On Fri, Mar 20, 2020 at 06:38:51AM -0700, no-re...@patchew.org wrote: > qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or > directory > qemu-system-x86_64: falling back to tcg > = > ==8831==ERROR:

RE: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Liu, Yi L
> From: Peter Xu > Sent: Thursday, March 26, 2020 9:23 PM > To: Liu, Yi L > Subject: Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb > invalidation to host > > On Thu, Mar 26, 2020 at 09:02:48AM -0400, Peter Xu wrote: > > [...] > > > > > > > +static inline bool

Re: [PATCH v6 7/7] virtio-net: add migration support for RSS and hash report

2020-03-26 Thread Juan Quintela
Yuri Benditovich wrote: > Save and restore RSS/hash report configuration. > > Signed-off-by: Yuri Benditovich Reviewed-by: Juan Quintela sorry, hadn't seen it. vmstate parts are right.

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 01:50:41PM +0100, Igor Mammedov wrote: > On Thu, 26 Mar 2020 13:29:01 +0100 > Igor Mammedov wrote: > > > On Thu, 26 Mar 2020 11:52:36 + > > Peter Maydell wrote: > > > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > > is passed a zero

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 09:28:27AM -0400, Michael S. Tsirkin wrote: > On Thu, Mar 26, 2020 at 02:23:17PM +0100, Igor Mammedov wrote: > > On Thu, 26 Mar 2020 11:52:36 + > > Peter Maydell wrote: > > > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > > is passed a zero

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Kevin Wolf
Am 26.03.2020 um 14:20 hat Eric Blake geschrieben: > > +++ b/block/file-posix.c > > @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = { > > .bdrv_reopen_prepare = raw_reopen_prepare, > > .bdrv_reopen_commit = raw_reopen_commit, > > .bdrv_reopen_abort =

Re: [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Eric Blake
On 3/26/20 8:22 AM, Maxim Levitsky wrote: On Thu, 2020-03-26 at 08:18 -0500, Eric Blake wrote: On 3/25/20 8:12 PM, Maxim Levitsky wrote: This will allow to reuse a single generic .bdrv_co_create "allow to ${verb}" is not idiomatic, better is "allow ${subject} to ${verb}" or "allow

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Michael S. Tsirkin
On Thu, Mar 26, 2020 at 02:23:17PM +0100, Igor Mammedov wrote: > On Thu, 26 Mar 2020 11:52:36 + > Peter Maydell wrote: > > > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > > is passed a zero 'slots' argument then ctz32(slots) will return 32, > > and then the code that

Re: [PATCH 2/2] util/bufferiszero: improve avx2 accelerator

2020-03-26 Thread Eric Blake
On 3/25/20 9:09 PM, Hu, Robert wrote: (Don't know why my Linux-Evolution missed this mail.) -Original Message- Long line; it's nice to wrap commit messages around column 70 or so (because reading 'git log' in an 80-column window adds indentation). [Hu, Robert] I think I set my vim

RE: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Liu, Yi L
> From: Peter Xu > Sent: Thursday, March 26, 2020 9:03 PM > To: Liu, Yi L > Subject: Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb > invalidation to host > > On Thu, Mar 26, 2020 at 05:41:39AM +, Liu, Yi L wrote: > > > From: Liu, Yi L > > > Sent: Wednesday, March 25, 2020

Re: acpi_pcihp_eject_slot() bug if passed 'slots == 0'

2020-03-26 Thread Igor Mammedov
On Thu, 26 Mar 2020 11:52:36 + Peter Maydell wrote: > Hi; Coverity spots that if hw/acpi/pcihp.c:acpi_pcihp_eject_slot() > is passed a zero 'slots' argument then ctz32(slots) will return 32, > and then the code that does '1U << slot' is C undefined behaviour > because it's an oversized

Re: [PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-26 Thread Peter Xu
On Thu, Mar 26, 2020 at 09:02:48AM -0400, Peter Xu wrote: [...] > > > > > +static inline bool vtd_pasid_cache_valid( > > > > > + VTDPASIDAddressSpace *vtd_pasid_as) { > > > > > +return vtd_pasid_as->iommu_state && > ^ > >

Re: [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Maxim Levitsky
On Thu, 2020-03-26 at 08:18 -0500, Eric Blake wrote: > On 3/25/20 8:12 PM, Maxim Levitsky wrote: > > This will allow to reuse a single generic .bdrv_co_create > > "allow to ${verb}" is not idiomatic, better is "allow ${subject} to > ${verb}" or "allow ${verb}ing". In this case, I'd go with: >

Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers

2020-03-26 Thread Eric Blake
On 3/25/20 8:12 PM, Maxim Levitsky wrote: Instead of checking the .bdrv_co_create_opts to see if we need the failback, fallback just implement the .bdrv_co_create_opts in the drivers that need it. This way we don't break various places that need to know if the underlying protocol/format

Re: [PATCH 1/2] block: pass BlockDriver reference to the .bdrv_co_create

2020-03-26 Thread Eric Blake
On 3/25/20 8:12 PM, Maxim Levitsky wrote: This will allow to reuse a single generic .bdrv_co_create "allow to ${verb}" is not idiomatic, better is "allow ${subject} to ${verb}" or "allow ${verb}ing". In this case, I'd go with: This will allow the reuse of a single... implementation for

RE: [RFC v6 05/24] memory: Introduce IOMMU Memory Region inject_faults API

2020-03-26 Thread Liu, Yi L
Hi Eric, I'm also considering how to inject iommu fault to vIOMMU. As our previous discussion (long time ago), MemoryRegion way doesn't work well for VTd case. So I'd like see your opinion on the proposal below: I've a patch to make vIOMMUs register PCIIOMMUOps to PCI layer. Current usage is to

[Bug 1867519] Re: qemu 4.2 segfaults on VF detach

2020-03-26 Thread Launchpad Bug Tracker
** Merge proposal linked: https://code.launchpad.net/~paelzer/ubuntu/+source/qemu/+git/qemu/+merge/381033 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1867519 Title: qemu 4.2 segfaults on VF

Re: [PATCH v2] block: make BlockConf.*_size properties 32-bit

2020-03-26 Thread Eric Blake
On 3/26/20 1:52 AM, Roman Kagan wrote: Devices (virtio-blk, scsi, etc.) and the block layer are happy to use 32-bit for logical_block_size, physical_block_size, and min_io_size. However, the properties in BlockConf are defined as uint16_t limiting the values to 32768. This appears unnecessary

<    1   2   3   4   >