Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-14 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 10:31:47AM +0100, Paolo Bonzini wrote: > However, there are no ramifications to actual coroutine code, except > for the template syntax "CoroutineFn" for the function and > the mandatory co_await/co_return keywords... both of which are an > improvement, really: the fact tha

[PATCH v6 02/18] job.h: categorize fields in struct Job

2022-03-14 Thread Emanuele Giuseppe Esposito
Categorize the fields in struct Job to understand which ones need to be protected by the job mutex and which don't. Signed-off-by: Emanuele Giuseppe Esposito --- include/qemu/job.h | 59 ++ 1 file changed, 34 insertions(+), 25 deletions(-) diff --git

[PATCH v6 05/18] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-03-14 Thread Emanuele Giuseppe Esposito
In preparation to the job_lock/unlock usage, create _locked duplicates of some functions, since they will be sometimes called with job_mutex held (mostly within job.c), and sometimes without (mostly from JobDrivers using the job API). Therefore create a _locked version of such function, so that it

[PATCH v6 12/18] block_job: rename block_job functions called with job_mutex held

2022-03-14 Thread Emanuele Giuseppe Esposito
Just as for the job API, rename block_job functions that are always called under job lock. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 3 ++- block/backup.c | 4 ++-- blockdev.c | 12 +++- blockjob.c

[PATCH v6 06/18] jobs: protect jobs with job_lock/unlock

2022-03-14 Thread Emanuele Giuseppe Esposito
Introduce the job locking mechanism through the whole job API, following the comments in job.h and requirements of job-monitor (like the functions in job-qmp.c, assume lock is held) and job-driver (like in mirror.c and all other JobDriver, lock is not held). Use the _locked helpers introduced bef

[PATCH v6 18/18] block_job_query: remove atomic read

2022-03-14 Thread Emanuele Giuseppe Esposito
Not sure what the atomic here was supposed to do, since job.busy is protected by the job lock. Since the whole function is called under job_mutex, just remove the atomic. Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- blockjob.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v6 17/18] job.c: enable job lock/unlock and remove Aiocontext locks

2022-03-14 Thread Emanuele Giuseppe Esposito
Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other function too, reduce the locking section as much as po

Re: [PATCH] ppc/pnv: Remove user-created PHB{3,4,5} devices

2022-03-14 Thread Cédric Le Goater
On 3/14/22 15:16, Frederic Barrat wrote: On 14/03/2022 14:05, Cédric Le Goater wrote: On a real system with POWER{8,9,10} processors, PHBs are sub-units of the processor, they can be deactivated by firmware but not plugged in or out like a PCI adapter on a slot. Nevertheless, having user-creat

[PULL 1/1] hw/nvram: at24 return 0xff if 1 byte address

2022-03-14 Thread Philippe Mathieu-Daudé
From: Patrick Venture The at24 eeproms are 2 byte devices that return 0xff when they are read from with a partial (1-byte) address written. This distinction was found comparing model behavior to real hardware testing. Tested: `i2ctransfer -f -y 45 w1@85 0 r1` returns 0xff instead of next byte

Re: [PATCH-for-7.0 v2] softmmu: List CPU types again

2022-03-14 Thread Philippe Mathieu-Daudé
On 10/3/22 16:16, Thomas Huth wrote: On 10/03/2022 15.07, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Commit e0220bb5b2 made cpus.c target-agnostic but didn't notice the cpu_list() function is only defined in target-specific code in "cpu.h". Move list_cpus() declaration to "exec

Re: [PATCH] ppc/pnv: Remove user-created PHB{3,4,5} devices

2022-03-14 Thread Frederic Barrat
On 14/03/2022 15:38, Cédric Le Goater wrote: On 3/14/22 15:16, Frederic Barrat wrote: On 14/03/2022 14:05, Cédric Le Goater wrote: On a real system with POWER{8,9,10} processors, PHBs are sub-units of the processor, they can be deactivated by firmware but not plugged in or out like a PCI a

Re: [PULL 00/12] dbus console fixes

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 12:59, wrote: > > From: Marc-André Lureau > > The following changes since commit 1416688c53be6535be755b44c15fb2eb9defd20f: > > Merge remote-tracking branch > 'remotes/mcayland/tags/q800-updates-for-7.0-20220309' into staging > (2022-03-10 13:16:37 +) > > are availab

[PATCH 2/4] intel_iommu: Support IR-only mode without DMA translation

2022-03-14 Thread David Woodhouse
From: David Woodhouse By setting none of the SAGAW bits we can indicate to a guest that DMA translation isn't supported. Tested by booting Windows 10, as well as Linux guests with the fix at https://git.kernel.org/torvalds/c/c40c10 Signed-off-by: David Woodhouse Reviewed-by: Peter Xu Acked

[PATCH 1/4] target/i386: Fix sanity check on max APIC ID / X2APIC enablement

2022-03-14 Thread David Woodhouse
The check on x86ms->apic_id_limit in pc_machine_done() had two problems. Firstly, we need KVM to support the X2APIC API in order to allow IRQ delivery to APICs >= 255. So we need to call/check kvm_enable_x2apic(), which was done elsewhere in *some* cases but not all. Secondly, microvm needs the s

Re: [PATCH v13 0/8] hmp,qmp: Add commands to introspect virtio devices

2022-03-14 Thread Jonah Palmer
My apologies for not notifying earlier but I have been looking into these errors. Hopefully should be able to get a fix sent out within the week. Thanks Jonah On 3/7/22 17:46, Michael S. Tsirkin wrote: On Mon, Mar 07, 2022 at 08:08:33AM -0500, Jonah Palmer wrote: This series introduces new Q

Re: [PATCH v2 2/3] docs: rSTify MailingLists wiki; move it to QEMU Git

2022-03-14 Thread Kashyap Chamarthy
On Mon, Mar 14, 2022 at 02:45:30PM +0100, Philippe Mathieu-Daudé wrote: > Hi Kashyap, Hi, > On 14/3/22 11:49, Kashyap Chamarthy wrote: [...] > This is a fair conversion from > https://wiki.qemu.org/Contribute/MailingLists, but a good opportunity to > improve (could be on top). Yeah, definitely

Re: [PATCH] MAINTAINERS: change Vladimir's email address

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
14.03.2022 17:47, Eric Blake wrote: On Mon, Mar 14, 2022 at 02:04:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: Old vsement...@virtuozzo.com is not accessible anymore. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! That's my new address: v.sementsov...@ya.ru , the old one is not a

Re: [PATCH] ppc/xive2: Make type Xive2EndSource not user creatable

2022-03-14 Thread Cédric Le Goater
On 3/11/22 08:43, Cédric Le Goater wrote: Xive2EndSource objects can only be instantiated through a Xive2Router (PnvXive2). Suggested-by: Thomas Huth Signed-off-by: Cédric Le Goater --- hw/intc/xive2.c | 1 + 1 file changed, 1 insertion(+) Queued for 7.0 Thanks, C.

Re: [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu

2022-03-14 Thread Cédric Le Goater
On 3/10/22 19:30, Daniel Henrique Barboza wrote: Hi, These are more test fixes that I missed from my first series [1]. Thanks Murilo Opsfelder and Fabiano for letting me know that we still had broken tests to deal with. All these tests were either a case of 'this needs kvm_pr' or 'this needs kv

Re: [PATCH] target/ppc: fix ISI fault cause for Radix MMU

2022-03-14 Thread Cédric Le Goater
On 3/9/22 20:27, Leandro Lupori wrote: Fix Instruction Storage Interrupt (ISI) fault cause for Radix MMU, when caused by missing PAGE_EXEC permission, to be SRR1_NOEXEC_GUARD instead of DSISR_PROTFAULT. This matches POWER9 hardware behavior. Fixes: d5fee0bbe68 ("target/ppc: Implement ISA V3.00 r

Re: [PATCH 0/5] --disable-tcg qtest/avocado fixes for ppc64

2022-03-14 Thread Cédric Le Goater
On 3/3/22 16:35, Daniel Henrique Barboza wrote: Hi, 'make check' and 'make check-avocado' in a ppc64 host, using a QEMU built with --disable-tcg, fails in a handful of tests/files due to the lack of TCG support not being accounted for. The tests usually fall back to KVM acceleration, and when ru

[PATCH 3/4] intel_iommu: Only allow interrupt remapping to be enabled if it's supported

2022-03-14 Thread David Woodhouse
From: David Woodhouse We should probably check if we were meant to be exposing IR, before letting the guest turn the IRE bit on. Signed-off-by: David Woodhouse Reviewed-by: Peter Xu Acked-by: Jason Wang --- hw/i386/intel_iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

Re: [PATCH experiment 14/16] util: introduce C++ stackless coroutine backend

2022-03-14 Thread Stefan Hajnoczi
On Mon, Mar 14, 2022 at 10:32:01AM +0100, Paolo Bonzini wrote: > +// > + > +// CoroutineFn does not even need anything more than what > +// BaseCoroutine provides, so it's just a type alias. The magic > +// is all in ValuePromise. > +// > +// Suspended CoroutineFns are cha

[PATCH] gitlab-ci: Allow adding manual jobs on cirrus-ci

2022-03-14 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé By default, all Cirrus-CI jobs are added as 'on_success' (the default value). Add a ${MANUAL_JOB} variable (default to 0) to be able to add manual jobs. Suggested-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.d/cirrus.yml | 2 ++

Re: [PATCH] MAINTAINERS: change Vladimir's email address

2022-03-14 Thread Eric Blake
On Mon, Mar 14, 2022 at 02:04:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Old vsement...@virtuozzo.com is not accessible anymore. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Hi all! > > That's my new address: v.sementsov...@ya.ru , the old one is not > available anymore. I

Re: [PATCH] target/ppc: fix xxspltw for big endian hosts

2022-03-14 Thread Cédric Le Goater
On 3/10/22 18:20, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Fix a typo in the host endianness macro and add a simple test to detect regressions. Fixes: 9bb0048ec6f8 ("target/ppc: convert xxspltw to vector operations") Signed-off-by: Matheus Ferst --- target/ppc/translate/vsx-

Re: [PATCH 0/3] Fix user-created PHB devices on POWER10

2022-03-14 Thread Cédric Le Goater
On 3/10/22 16:50, Frederic Barrat wrote: A short series to fix creating PHB devices and root ports on the newly merged powernv10 machine. Frederic Barrat (3): ppc/pnv: Introduce a pnv-phb5 device to match root port ppc/pnv: Fixes for user-created pnv-phb5 devices ppc/pnv: Fix PEC looku

Re: [PATCH 2/4] intel_iommu: Support IR-only mode without DMA translation

2022-03-14 Thread Michael S. Tsirkin
On Mon, Mar 14, 2022 at 02:25:42PM +, David Woodhouse wrote: > From: David Woodhouse > > By setting none of the SAGAW bits we can indicate to a guest that DMA > translation isn't supported. Tested by booting Windows 10, as well as > Linux guests with the fix at https://git.kernel.org/torvalds

Re: [PATCH v2] block/nbd.c: Fixed IO request coroutine not being wakeup when kill NBD server

2022-03-14 Thread Eric Blake
On Wed, Mar 09, 2022 at 04:21:01PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 09.03.2022 10:48, Rao Lei wrote: > > During the IO stress test, the IO request coroutine has a probability that > > is > > can't be awakened when the NBD server is killed. > > > > The GDB stack is as follows: > > Whe

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-03-14 Thread Eric Blake
On Wed, Feb 16, 2022 at 11:08:06AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 16.02.2022 02:24, Eric Blake wrote: > > > > +++ b/tests/qemu-iotests/tests/nbd-multiconn > > > > @@ -0,0 +1,188 @@ > > > > +#!/usr/bin/env bash > > > > +# group: rw auto quick > > > > +# > > > > +# Test that qemu-nbd M

[PATCH 4/4] intel_iommu: Fix irqchip / X2APIC configuration checks

2022-03-14 Thread David Woodhouse
We don't need to check kvm_enable_x2apic(). It's perfectly OK to support interrupt remapping even if we can't address CPUs above 254. Kind of pointless, but still functional. The check on kvm_enable_x2apic() needs to happen *anyway* in order to allow CPUs above 254 even without an IOMMU, so allow

Re: [PATCH] x86: q35: require split irqchip for large CPU count

2022-03-14 Thread David Woodhouse
On Mon, 2022-03-14 at 13:21 +, Daniel P. Berrangé wrote: > On Mon, Mar 14, 2022 at 12:59:38PM +, David Woodhouse wrote: > > On Mon, 2022-03-14 at 11:35 +0100, Igor Mammedov wrote: > > > On Fri, 11 Mar 2022 14:58:41 + > > > David Woodhouse < > > > dw...@infradead.org > > > > > > > wrote

[PATCH 0/3] Use g_new() & friends where that makes obvious

2022-03-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This series only touches allocations with size arguments of the form si

Re: [PATCH 2/4] intel_iommu: Support IR-only mode without DMA translation

2022-03-14 Thread David Woodhouse
On Mon, 2022-03-14 at 11:24 -0400, Michael S. Tsirkin wrote: > On Mon, Mar 14, 2022 at 02:25:42PM +, David Woodhouse wrote: > > From: David Woodhouse > > > > By setting none of the SAGAW bits we can indicate to a guest that DMA > > translation isn't supported. Tested by booting Windows 10, as

[PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster --- scripts/coccinelle/use-g_new-etc.cocci | 75 ++ 1 file changed, 75 insertions(+) create mode 100644 scripts/coccinelle/use-

[PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form si

[PATCH 2/2] hw/i386/acpi-build: Avoid 'sun' identifier

2022-03-14 Thread Andrew Deason
On Solaris, 'sun' is #define'd to 1, which causes errors if a variable is named 'sun'. Slightly change the name of the var for the Slot User Number so we can build on Solaris. Signed-off-by: Andrew Deason --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

Re: [PATCH 2/4] intel_iommu: Support IR-only mode without DMA translation

2022-03-14 Thread David Woodhouse
On Mon, 2022-03-14 at 14:25 +, David Woodhouse wrote: > From: David Woodhouse > > By setting none of the SAGAW bits we can indicate to a guest that DMA > translation isn't supported. Tested by booting Windows 10, as well as > Linux guests with the fix at https://git.kernel.org/torvalds/c/c40a

[PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On older Solaris releases, we didn't get a protype for madvise, and so util/osdep.c provides its own prototype. Some time between the public Solaris 11.4 release and Solaris 11.4.42 CBE, we started getting an madvise prototype that looks like this: extern int madvise(void *, size_t, int); Whi

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-14 Thread Paolo Bonzini
On 3/14/22 15:07, Stefan Hajnoczi wrote: If we can reach a consensus about C++ language usage in QEMU then I'm in favor of using C++ coroutines. It's probably not realistic to think we can limit C++ language usage to just coroutines forever. Someone finds another C++ feature they absolutely need

[PATCH 0/2] Fixes for building on Solaris 11.4.42 CBE

2022-03-14 Thread Andrew Deason
With these minor fixes, I can build qemu on Solaris 11.4.42 CBE (Oracle's new rolling release thing), using '--disable-rdma --enable-modules --disable-dbus-display --target-list=x86_64-softmmu'. I'm just interested in the guest agent right now, so that's all I've tested (briefly), but the rest of t

[PATCH for-7.0 0/2] block/vmdk: Fix reopening bs->file

2022-03-14 Thread Hanna Reitz
Hi, A couple of months ago I noticed that changing a vmdk node’s file child through blockdev-reopen would crash qemu. I started writing a fix at some point, got distracted, but now here it is. Hanna Reitz (2): block/vmdk: Fix reopening bs->file iotests/reopen-file: Test reopening file child

[PATCH for-7.0 2/2] iotests/reopen-file: Test reopening file child

2022-03-14 Thread Hanna Reitz
This should work for all format drivers that support reopening, so test it. (This serves as a regression test for HEAD^: This test used to fail for VMDK before HEAD^.) Signed-off-by: Hanna Reitz --- tests/qemu-iotests/tests/reopen-file | 88 tests/qemu-iotests/tests

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: > > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > Th

[PATCH for-7.0 1/2] block/vmdk: Fix reopening bs->file

2022-03-14 Thread Hanna Reitz
VMDK disk data is stored in extents, which may or may not be separate from bs->file. VmdkExtent.file points to where they are stored. Each that is stored in bs->file will simply reuse the exact pointer value of bs->file. (That is why vmdk_free_extents() will unref VmdkExtent.file (e->file) only

Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 16:12, Andrew Deason wrote: > > On older Solaris releases, we didn't get a protype for madvise, and so > util/osdep.c provides its own prototype. Some time between the public > Solaris 11.4 release and Solaris 11.4.42 CBE, we started getting an > madvise prototype that looks

Re: [PATCH] MAINTAINERS: change Vladimir's email address

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
14.03.2022 18:16, Vladimir Sementsov-Ogievskiy wrote: 14.03.2022 17:47, Eric Blake wrote: On Mon, Mar 14, 2022 at 02:04:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: Old vsement...@virtuozzo.com is not accessible anymore. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all! That's my n

Re: [PATCH 0/3] Use g_new() & friends where that makes obvious

2022-03-14 Thread Philippe Mathieu-Daudé
On 14/3/22 17:01, Markus Armbruster wrote: g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This series only touches a

Re: [PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Christian Schoenebeck
On Montag, 14. März 2022 17:01:07 CET Markus Armbruster wrote: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. >

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: >> >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void *, which lets the compiler ca

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 10:31:47AM +0100, Paolo Bonzini wrote: > This was compiled with GCC 11 only. Coroutine support was added in > GCC 10, released in 2020, which IIRC is much newer than the most recent > release we support. Currrently we target 7.4: commit 2a85a08c998e418a46a308095893f2236

Re: [PULL 00/18] migration queue

2022-03-14 Thread Peter Maydell
On Tue, 8 Mar 2022 at 18:47, Dr. David Alan Gilbert wrote: > > * Philippe Mathieu-Daudé (philippe.mathieu.da...@gmail.com) wrote: > > I'm seeing an error on the s390x runner: > > > > ▶ 26/547 ERROR:../tests/qtest/migration-test.c:276:check_guests_ram: > > assertion failed: (bad == 0) ERROR > > >

[PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Khem Raj
Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Henderson --- li

Re: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 17:02, Khem Raj wrote: > > Fixes > ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: > incomplete definition of type 'struct pt_regs' > return uc->uc_mcontext.regs->nip; >^ > > Signed-off-by: Khem Raj > Cc: Peter May

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Cédric Le Goater
On 3/14/22 17:01, Markus Armbruster wrote: g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches a

Re: [PULL 00/18] migration queue

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 04:56:18PM +, Peter Maydell wrote: > On Tue, 8 Mar 2022 at 18:47, Dr. David Alan Gilbert > wrote: > > > > * Philippe Mathieu-Daudé (philippe.mathieu.da...@gmail.com) wrote: > > > I'm seeing an error on the s390x runner: > > > > > > ▶ 26/547 ERROR:../tests/qtest/migrat

Re: [PULL 00/18] migration queue

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 17:07, Daniel P. Berrangé wrote: > So the test harness is waiting for a reply to 'query-migrate'. > > This should be fast unless QEMU has hung in the main event > loop servicing monitor commands, or stopped. I was kind of loose with the terminology -- I don't remember wheth

Re: [PATCH v2 4/4] util/event-loop-base: Introduce options to set the thread pool size

2022-03-14 Thread Nicolas Saenz Julienne
On Mon, 2022-03-14 at 13:35 +, Stefan Hajnoczi wrote: > On Fri, Mar 11, 2022 at 11:40:30AM +0100, Nicolas Saenz Julienne wrote: > > On Thu, 2022-03-10 at 10:45 +, Stefan Hajnoczi wrote: > > > On Thu, Mar 03, 2022 at 04:13:07PM +0100, Nicolas Saenz Julienne wrote: > > > > @@ -537,10 +546,19

Re: [PATCH v2 1/6] block: Support passing NULL ops to blk_set_dev_ops()

2022-03-14 Thread Stefan Hajnoczi
On Tue, Feb 15, 2022 at 06:59:38PM +0800, Xie Yongji wrote: > This supports passing NULL ops to blk_set_dev_ops() > so that we can remove stale ops in some cases. > > Signed-off-by: Xie Yongji > --- > block/block-backend.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Khem Raj
On Mon, Mar 14, 2022 at 10:05 AM Peter Maydell wrote: > > On Mon, 14 Mar 2022 at 17:02, Khem Raj wrote: > > > > Fixes > > ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: > > incomplete definition of type 'struct pt_regs' > > return uc->uc_mcontext.regs->nip; > >

[PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Khem Raj
Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Mathieu-Daudé Cc: Richard Henderson --- v2:

Re: [PULL 00/18] migration queue

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 05:15:57PM +, Peter Maydell wrote: > On Mon, 14 Mar 2022 at 17:07, Daniel P. Berrangé wrote: > > So the test harness is waiting for a reply to 'query-migrate'. > > > > This should be fast unless QEMU has hung in the main event > > loop servicing monitor commands, or sto

Re: [PATCH v4 1/3] qmp: Support for querying stats

2022-03-14 Thread Mark Kanda
Thank you Markus. On 3/11/2022 7:06 AM, Markus Armbruster wrote: Mark Kanda writes: Introduce QMP support for querying stats. Provide a framework for adding new stats and support for the following commands: - query-stats Returns a list of all stats per target type (only VM and vCPU to start)

[PATCH v6 01/15] vhost: Add VhostShadowVirtqueue

2022-03-14 Thread Eugenio Pérez
Vhost shadow virtqueue (SVQ) is an intermediate jump for virtqueue notifications and buffers, allowing qemu to track them. While qemu is forwarding the buffers and virtqueue changes, it is able to commit the memory it's being dirtied, the same way regular qemu's VirtIO devices do. This commit only

[PATCH v6 00/15] vDPA shadow virtqueue

2022-03-14 Thread Eugenio Pérez
This series enable shadow virtqueue (SVQ) for vhost-vdpa devices. This is intended as a new method of tracking the memory the devices touch during a migration process: Instead of relay on vhost device's dirty logging capability, SVQ intercepts the VQ dataplane forwarding the descriptors between VM

[PATCH v6 05/15] virtio: Add vhost_svq_get_vring_addr

2022-03-14 Thread Eugenio Pérez
It reports the shadow virtqueue address from qemu virtual address space. Since this will be different from the guest's vaddr, but the device can access it, SVQ takes special care about its alignment & lack of garbage data. It assumes that IOMMU will work in host_page_size ranges for that. Signed-

[PATCH v6 03/15] vhost: Add Shadow VirtQueue call forwarding capabilities

2022-03-14 Thread Eugenio Pérez
This will make qemu aware of the device used buffers, allowing it to write the guest memory with its contents if needed. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 4 hw/virtio/vhost-shadow-virtqueue.c | 38 ++ hw/virtio/vhost-vdpa.c

[PATCH v6 02/15] vhost: Add Shadow VirtQueue kick forwarding capabilities

2022-03-14 Thread Eugenio Pérez
At this mode no buffer forwarding will be performed in SVQ mode: Qemu will just forward the guest's kicks to the device. Host memory notifiers regions are left out for simplicity, and they will not be addressed in this series. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h

[PATCH v6 11/15] vdpa: Add custom IOTLB translations to SVQ

2022-03-14 Thread Eugenio Pérez
Use translations added in VhostIOVATree in SVQ. Only introduce usage here, not allocation and deallocation. As with previous patches, we use the dead code paths of shadow_vqs_enabled to avoid commiting too many changes at once. These are impossible to take at the moment. Signed-off-by: Eugenio Pé

[PATCH v6 06/15] vdpa: adapt vhost_ops callbacks to svq

2022-03-14 Thread Eugenio Pérez
First half of the buffers forwarding part, preparing vhost-vdpa callbacks to SVQ to offer it. QEMU cannot enable it at this moment, so this is effectively dead code at the moment, but it helps to reduce patch size. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 48

[PULL 3/4] tcg/s390x: Fix tcg_out_dup_vec vs general registers

2022-03-14 Thread Richard Henderson
We copied the data from the general register input to the vector register output, but have not yet replicated it. We intended to fall through into the vector-vector case, but failed to redirect the input register. This is caught by an assertion failure in tcg_out_insn_VRIc, which diagnosed the inc

[PATCH v6 15/15] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-14 Thread Eugenio Pérez
Finally offering the possibility to enable SVQ from the command line. Signed-off-by: Eugenio Pérez --- qapi/net.json| 8 +++- net/vhost-vdpa.c | 48 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/qapi/net.json b/qapi/net.

[PATCH v6 12/15] vdpa: Adapt vhost_vdpa_get_vring_base to SVQ

2022-03-14 Thread Eugenio Pérez
This is needed to achieve migration, so the destination can restore its index. Setting base as last used idx, so destination will see as available all the entries that the device did not use, including the in-flight processing ones. This is ok for networking, but other kinds of devices might have

[PATCH v6 10/15] vhost: Add VhostIOVATree

2022-03-14 Thread Eugenio Pérez
This tree is able to look for a translated address from an IOVA address. At first glance it is similar to util/iova-tree. However, SVQ working on devices with limited IOVA space need more capabilities, like allocating IOVA chunks or performing reverse translations (qemu addresses to iova). The al

[PATCH v6 13/15] vdpa: Never set log_base addr if SVQ is enabled

2022-03-14 Thread Eugenio Pérez
Setting the log address would make the device start reporting invalid dirty memory because the SVQ vrings are located in qemu's memory. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio

[PATCH v6 09/15] util: add iova_tree_find_iova

2022-03-14 Thread Eugenio Pérez
This function does the reverse operation of iova_tree_find: To look for a mapping that match a translated address so we can do the reverse. This have linear complexity instead of logarithmic, but it supports overlapping HVA. Future developments could reduce it. Signed-off-by: Eugenio Pérez ---

[PATCH v6 04/15] vhost: Add vhost_svq_valid_features to shadow vq

2022-03-14 Thread Eugenio Pérez
This allows SVQ to negotiate features with the guest and the device. For the device, SVQ is a driver. While this function bypasses all non-transport features, it needs to disable the features that SVQ does not support when forwarding buffers. This includes packed vq layout, indirect descriptors or

[PATCH v6 14/15] vdpa: Expose VHOST_F_LOG_ALL on SVQ

2022-03-14 Thread Eugenio Pérez
SVQ is able to log the dirty bits by itself, so let's use it to not block migration. Also, ignore set and clear of VHOST_F_LOG_ALL on set_features if SVQ is enabled. Even if the device supports it, the reports would be nonsense because SVQ memory is in the qemu region. The log region is still all

[PATCH v6 07/15] vhost: Shadow virtqueue buffers forwarding

2022-03-14 Thread Eugenio Pérez
Initial version of shadow virtqueue that actually forward buffers. There is no iommu support at the moment, and that will be addressed in future patches of this series. Since all vhost-vdpa devices use forced IOMMU, this means that SVQ is not usable at this point of the series on any device. For s

[PULL 0/4] tcg patch queue

2022-03-14 Thread Richard Henderson
The following changes since commit 15df33ceb73cb6bb3c6736cf4d2cff51129ed4b4: Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20220312-1' into staging (2022-03-13 17:29:18 +) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-202

[PATCH v6 08/15] util: Add iova_tree_alloc_map

2022-03-14 Thread Eugenio Pérez
This iova tree function allows it to look for a hole in allocated regions and return a totally new translation for a given translated address. It's usage is mainly to allow devices to access qemu address space, remapping guest's one into a new iova space where qemu can add chunks of addresses. Si

Re: [PATCH 0/3] tcg/s390x vector fixes

2022-03-14 Thread Richard Henderson
On 3/14/22 05:41, Thomas Huth wrote: On 10/03/2022 21.27, Richard Henderson wrote: These 3 issues were found by running risu on arm neon test cases. In the meantime, Thomas encountered one of the same with the new tests of vectorized sha512. Thanks! If you don't mind (e.g. if you don't have an

[PULL 2/4] tcg/s390x: Fix INDEX_op_bitsel_vec vs VSEL

2022-03-14 Thread Richard Henderson
The operands are output in the wrong order: the tcg selector argument is first, whereas the s390x selector argument is last. Tested-by: Thomas Huth Resolves: https://gitlab.com/qemu-project/qemu/-/issues/898 Fixes: 9bca986df88 ("tcg/s390x: Implement TCG_TARGET_HAS_bitsel_vec") Signed-off-by: Rich

[PULL 1/4] tcg/s390x: Fix tcg_out_dupi_vec vs VGM

2022-03-14 Thread Richard Henderson
The immediate operands to VGM were in the wrong order, producing an inverse mask. Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index 6e65828c09..508f

[PULL 4/4] tcg/arm: Don't emit UNPREDICTABLE LDRD with Rm == Rt or Rt+1

2022-03-14 Thread Richard Henderson
The LDRD (register) instruction is UNPREDICTABLE if the Rm register is the same as either Rt or Rt+1 (the two registers being loaded to). We weren't making sure we avoided this, with the result that on some host CPUs like the Cortex-A7 we would get a SIGILL because the CPU chooses to UNDEF for this

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Daniel P . Berrangé
On Mon, Mar 14, 2022 at 05:52:32PM +0100, Markus Armbruster wrote: > Peter Maydell writes: > > > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: > >> > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > >> for two reasons. One, it catches multiplication overflowin

Re: [PULL 00/18] migration queue

2022-03-14 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Mon, 14 Mar 2022 at 17:07, Daniel P. Berrangé wrote: > > So the test harness is waiting for a reply to 'query-migrate'. > > > > This should be fast unless QEMU has hung in the main event > > loop servicing monitor commands, or stopped. > > I

Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Daniel Henrique Barboza
On 3/14/22 14:25, Khem Raj wrote: Fixes ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' return uc->uc_mcontext.regs->nip; ^ Signed-off-by: Khem Raj Cc: Peter Maydell Cc: Philippe Math

Re: [PATCH 3/3] tests/tcg/s390x: Test BRASL and BRCL with large negative offsets

2022-03-14 Thread Richard Henderson
On 3/14/22 01:30, Christian Borntraeger wrote: Am 11.03.22 um 21:32 schrieb Richard Henderson: On 3/11/22 10:49, Ilya Leoshkevich wrote: +    size_t length = 0x10006; +    unsigned char *buf; +    int i; + +    buf = mmap(NULL, length, PROT_READ | PROT_WRITE | PROT_EXEC, +   M

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-03-14 Thread Eric Blake
On Wed, Feb 16, 2022 at 07:14:58PM +0200, Nir Soffer wrote: > > > I'm not the best at writing python iotests; I welcome a language > > > translation of this aspect. > > > > > > > > Let me try:) > > Thanks! This is much nicer and will be easier to maintain. > > > > > > > #!/usr/bin/env python3 > >

Re: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 17:22, Khem Raj wrote: > > On Mon, Mar 14, 2022 at 10:05 AM Peter Maydell > wrote: > > > > On Mon, 14 Mar 2022 at 17:02, Khem Raj wrote: > > > > > > Fixes > > > ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: > > > incomplete definition of type 'st

Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 17:59, Daniel Henrique Barboza wrote: > I am intrigued about why we didn't hit this before, especially considering > that ppc64 header is just a > pointer to this file. It's specific to musl, which does different things with its system includes than glibc does. -- PMM

Re: [PULL 00/18] migration queue

2022-03-14 Thread Peter Maydell
On Mon, 14 Mar 2022 at 17:55, Dr. David Alan Gilbert wrote: > > Peter Maydell (peter.mayd...@linaro.org) wrote: > > One thing that makes this bug investigation trickier, incidentally, > > is that the migration-test code seems to depend on userfaultfd. > > That means you can't run it under 'rr'. >

Re: [PULL 0/1] I2C patches for 2022-03-14

2022-03-14 Thread Peter Maydell
ging (2022-03-13 17:29:18 +) > > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/i2c-20220314 > > for you to fetch changes up to 1cbab82e9d1bdb2c7b9ef46a396fdc03ea3fa04c: > > hw/nvram: at24 r

Re: [PATCH] target/arm: Fix handling of LPAE block descriptors

2022-03-14 Thread Peter Maydell
Ping for review, please? thanks -- PMM On Fri, 4 Mar 2022 at 16:56, Peter Maydell wrote: > > LPAE descriptors come in three forms: > > * table descriptors, giving the address of the next level page table > * page descriptors, which occur only at level 3 and describe the >mapping of one pag

Re: [PATCH v6 15/15] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-03-14 Thread Eugenio Perez Martin
On Mon, Mar 14, 2022 at 6:50 PM Eugenio Pérez wrote: > > Finally offering the possibility to enable SVQ from the command line. > > Signed-off-by: Eugenio Pérez > --- > qapi/net.json| 8 +++- > net/vhost-vdpa.c | 48 > 2 files changed, 47

Re: [PATCH 1/2] util/osdep: Avoid madvise proto on modern Solaris

2022-03-14 Thread Andrew Deason
On Mon, 14 Mar 2022 16:36:00 + Peter Maydell wrote: > On Mon, 14 Mar 2022 at 16:12, Andrew Deason wrote: > > #ifdef CONFIG_SOLARIS > > #include > > +#ifndef HAVE_MADVISE_PROTO > > /* See MySQL bug #7156 (http://bugs.mysql.com/bug.php?id=7156) for > > discussion about Solaris header p

Re: [PULL 00/18] migration queue

2022-03-14 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Mon, 14 Mar 2022 at 17:55, Dr. David Alan Gilbert > wrote: > > > > Peter Maydell (peter.mayd...@linaro.org) wrote: > > > One thing that makes this bug investigation trickier, incidentally, > > > is that the migration-test code seems to depend

Re: [PATCH] MAINTAINERS: change Vladimir's email address

2022-03-14 Thread Vladimir Sementsov-Ogievskiy
14.03.2022 19:40, Vladimir Sementsov-Ogievskiy wrote: 14.03.2022 18:16, Vladimir Sementsov-Ogievskiy wrote: 14.03.2022 17:47, Eric Blake wrote: On Mon, Mar 14, 2022 at 02:04:15PM +0300, Vladimir Sementsov-Ogievskiy wrote: Old vsement...@virtuozzo.com is not accessible anymore. Signed-off-by:

<    1   2   3   4   >