Re: [PATCH] Fix build without CONFIG_XEN_EMU

2023-03-09 Thread Paolo Bonzini
On 3/8/23 14:05, mreza...@redhat.com wrote: From: Miroslav Rezanina Upstream commit ddf0fd9ae1 "hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback" added kvm_xen_maybe_deassert_callback usage to target/i386/kvm/kvm.c file without conditional preprocessing check. This breaks any build not us

[PATCH 5/9] 9pfs: mark more coroutine_fns

2023-03-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/9pfs/9p.h| 4 ++-- hw/9pfs/codir.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index 2fce4140d1e9..1b0d805b9c12 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -203,7 +203,7 @@ typedef struct V9fsDi

[PATCH 3/9] mirror: make mirror_flush a coroutine_fn, do not use co_wrappers

2023-03-09 Thread Paolo Bonzini
mirror_flush calls a mixed function blk_flush but it is only called from mirror_run; so call the coroutine version and make mirror_flush a coroutine_fn too. Signed-off-by: Paolo Bonzini --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/bl

[PATCH 1/9] vvfat: mark various functions as coroutine_fn

2023-03-09 Thread Paolo Bonzini
Functions that can do I/O are prime candidates for being coroutine_fns. Make the change for those that are themselves called only from coroutine_fns. In addition, coroutine_fns should do I/O using bdrv_co_*() functions, for which it is required to hold the BlockDriverState graph lock. So also n

[PATCH 0/9] (mostly) block: add more coroutine_fn annotations, use bdrv/blk_co_*

2023-03-09 Thread Paolo Bonzini
"Mostly" because there is a 9pfs patch in here too. The series was developed with the help of vrc and the clang TSA annotations. Paolo Paolo Bonzini (9): vvfat: mark various functions as coroutine_fn blkdebug: add missing coroutine_fn annotation mirror: make mirror_flush a coroutine_fn n

[PATCH 4/9] nbd: mark more coroutine_fns, do not use co_wrappers

2023-03-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- nbd/server.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/nbd/server.c b/nbd/server.c index a4750e41880a..6f5fcade2a54 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -1409,8 +1409,8 @@ nbd_

[PATCH 6/9] qemu-pr-helper: mark more coroutine_fns

2023-03-09 Thread Paolo Bonzini
do_sgio can suspend via the coroutine function thread_pool_submit_co, so it has to be coroutine_fn as well---and the same is true of all its direct and indirect callers. Signed-off-by: Paolo Bonzini --- scsi/qemu-pr-helper.c | 22 +++--- 1 file changed, 11 insertions(+), 11 delet

[PATCH 7/9] tests: mark more coroutine_fns

2023-03-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- tests/unit/test-thread-pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-thread-pool.c b/tests/unit/test-thread-pool.c index 6020e65d6986..493b966b94f9 100644 --- a/tests/unit/test-thread-pool.c +++ b/tests/unit/test-thread

[PATCH 2/9] blkdebug: add missing coroutine_fn annotation

2023-03-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/blkdebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 978c8cff9e33..addad914b3f7 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -583,8 +583,8 @@ out: return ret; } -stati

[PATCH 9/9] vmdk: make vmdk_is_cid_valid a coroutine_fn

2023-03-09 Thread Paolo Bonzini
Functions that can do I/O are prime candidates for being coroutine_fns. Make the change for the one that is itself called only from coroutine_fns. Unfortunately vmdk does not use a coroutine_fn for the bulk of the open (like qcow2 does) so vmdk_read_cid cannot have the same treatment. Signed-of

[PATCH 8/9] qcow2: mark various functions as coroutine_fn and GRAPH_RDLOCK

2023-03-09 Thread Paolo Bonzini
Functions that can do I/O (including calling bdrv_is_allocated and bdrv_block_status functions) are prime candidates for being coroutine_fns. Make the change for those that are themselves called only from coroutine_fns. Also annotate that they are called with the graph rdlock taken, thus allowing

[PATCH V3 0/2] qemu: vhost-user: Support Xen memory mapping quirks

2023-03-09 Thread Viresh Kumar
Hello, This patchset tries to update the vhost-user protocol to make it support special memory mapping required in case of Xen hypervisor. The first patch is mostly cleanup and second one introduces a new xen specific feature. V2->V3: - Remove the extra message and instead update the memory regi

[PATCH 2/3] block: do not check bdrv_file_open

2023-03-09 Thread Paolo Bonzini
The set of BlockDrivers that have .bdrv_file_open coincides with those that have .protocol_name and guess what---checking drv->bdrv_file_open is done to see if the driver is a protocol. So check drv->protocol_name instead. Signed-off-by: Paolo Bonzini --- block.c | 13 ++--- 1 file chan

Re: [PATCH V2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-09 Thread Viresh Kumar
On 07-03-23, 11:22, Stefan Hajnoczi wrote: > VHOST_USER_IOTLB_MSG probably isn't necessary because address > translation is not required. It will also reduce performance by adding > extra communication. > > Instead, you could change the 1 memory region : 1 mmap relationship that > existing non-Xen

[PATCH 3/3] block: remove separate bdrv_file_open callback

2023-03-09 Thread Paolo Bonzini
bdrv_file_open and bdrv_open are completely equivalent, they are never checked except to see which one to invoke. So merge them into a single one. Signed-off-by: Paolo Bonzini --- block.c | 2 -- block/blkdebug.c | 2 +- block/blkio.c

Re: [PATCH v2 2/3] tests/avocado: Add Fedora 34 distro, including kernel/initrd checksums

2023-03-09 Thread David Woodhouse
On Wed, 2023-03-08 at 19:20 +, David Woodhouse wrote: > On Wed, 2023-03-08 at 17:42 +, Alex Bennée wrote: > > Why slightly newer rather than current release? > > > > Our existing Fedora guest builds cause all sorts of timeout issues > > running under TCG and seem particularly heavyweight co

[PATCH V3 2/2] docs: vhost-user: Add Xen specific memory mapping support

2023-03-09 Thread Viresh Kumar
The current model of memory mapping at the back-end works fine where a standard call to mmap() (for the respective file descriptor) is enough before the front-end can start accessing the guest memory. There are other complex cases though where the back-end needs more information and simple mmap()

[PATCH 0/3] block: remove separate bdrv_file_open callback

2023-03-09 Thread Paolo Bonzini
The value of the bdrv_file_open is sometimes checked to distinguish protocol and format drivers, but apart from that there is no difference between bdrv_file_open and bdrv_open. However, they can all be distinguished by the non-NULL .protocol_name member. Change the checks to use .protocol_name i

[PATCH V3 1/2] docs: vhost-user: Define memory region separately

2023-03-09 Thread Viresh Kumar
The same layout is defined twice, once in "single memory region description" and then in "memory regions description". Separate out details of memory region from these two and reuse the same definition later on. While at it, also rename "memory regions description" to "multiple memory regions des

[PATCH 1/3] block: make assertion more generic

2023-03-09 Thread Paolo Bonzini
.bdrv_needs_filename is only set for drivers that also set bdrv_file_open, i.e. protocol drivers. So we can make the assertion always, it will always pass for those drivers that use bdrv_open. Signed-off-by: Paolo Bonzini --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH v2 2/3] block: make BlockBackend->disable_request_queuing atomic

2023-03-09 Thread Paolo Bonzini
On 3/7/23 22:04, Stefan Hajnoczi wrote: This field is accessed by multiple threads without a lock. Use explicit qatomic_read()/qatomic_set() calls. There is no need for acquire/release because blk_set_disable_request_queuing() doesn't provide any guarantees (it helps that it's used at BlockBacken

Re: [PATCH v3] virtio-balloon: optimize the virtio-balloon on the ARM platform

2023-03-09 Thread David Hildenbrand
On 09.03.23 08:52, Yangming wrote: Optimize the virtio-balloon feature on the ARM platform by adding a variable to keep track of the current hot-plugged pc-dimm size, instead of traversing the virtual machine's memory modules to count the current RAM size during the balloon inflation or deflation

Re: Reply: [PATCH v2] virtio-balloon: optimize the virtio-balloon on the ARM platform

2023-03-09 Thread David Hildenbrand
On 09.03.23 07:14, Yangming wrote: On 08.03.23 01:42, Michael S. Tsirkin wrote: On Wed, Mar 01, 2023 at 06:38:13AM +, Yangming wrote: Optimize the virtio-balloon feature on the ARM platform by adding a variable to keep track of the current hot-plugged pc-dimm size, instead of traversing the

Re: [PATCH] hw/intc/ioapic: Update KVM routes before redelivering IRQ, on RTE update

2023-03-09 Thread David Woodhouse
On Wed, 2023-03-08 at 18:09 -0500, Peter Xu wrote: > On Mon, Mar 06, 2023 at 05:28:24PM +, David Woodhouse wrote: > > Indeed, I don't think we care about the in-kernel I/OAPIC. I don't > > think we care about the kernel knowing about e.g. "GSI #11" at all. We > > can just deliver it as MSI (for

Re: [PATCH 5/9] 9pfs: mark more coroutine_fns

2023-03-09 Thread Christian Schoenebeck
On Thursday, March 9, 2023 9:44:52 AM CET Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > hw/9pfs/9p.h| 4 ++-- > hw/9pfs/codir.c | 6 +++--- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h > index 2fce4140d1e9..1b0d805b9c12 100644

[PATCH] intel-iommu: Set status bit after operation completed

2023-03-09 Thread Zhenzhong Duan
According to SDM 11.4.4.2 Global Status Register: "This field is cleared by hardware when software sets the SRTP field in the Global Command register. This field is set by hardware when hardware completes the ‘Set Root Table Pointer’ operation using the value provided in the Root Table Address regi

Re: [PATCH v4 1/3] qga: Refactor guest-exec capture-output to take enum

2023-03-09 Thread Daniel P . Berrangé
On Wed, Mar 08, 2023 at 03:49:39PM -0700, Daniel Xu wrote: > Previously capture-output was an optional boolean flag that either > captured all output or captured none. While this is OK in most cases, it > lacks flexibility for more advanced capture cases, such as wanting to > only capture stdout. >

Re: [PATCH 0/3] block: remove separate bdrv_file_open callback

2023-03-09 Thread Philippe Mathieu-Daudé
On 9/3/23 09:50, Paolo Bonzini wrote: The value of the bdrv_file_open is sometimes checked to distinguish protocol and format drivers, but apart from that there is no difference between bdrv_file_open and bdrv_open. However, they can all be distinguished by the non-NULL .protocol_name member. C

Re: [PATCH v2 05/25] target/arm: Create gen_set_rmode, gen_restore_rmode

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: Split out common subroutines for handing rounding mode changes during translation. Use tcg_constant_i32 and tcg_temp_new_i32 instead of tcg_const_i32. Signed-off-by: Richard Henderson --- Cc: qemu-...@nongnu.org --- target/arm/tcg/translate.h | 1

Re: [PATCH v2 15/25] target/ppc: Avoid tcg_const_* in vmx-impl.c.inc

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --- target/ppc/translate/vmx-impl.c.inc | 10 +- 1 fil

Re: [PATCH v2 16/25] target/ppc: Avoid tcg_const_* in xxeval

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: Initialize a new temp instead of tcg_const_*. Fix a pasto in a comment. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --- target/ppc/translate/vsx-impl.

Re: [PATCH v2 17/25] target/ppc: Avoid tcg_const_* in vsx-impl.c.inc

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --- target/ppc/translate/vsx-impl.c.inc | 28 ++

Re: [PATCH v2 18/25] target/ppc: Avoid tcg_const_* in fp-impl.c.inc

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: All uses are strictly read-only. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --- target/ppc/translate/fp-impl.c.inc | 26 --

Re: [PATCH v2 19/25] target/ppc: Avoid tcg_const_* in power8-pmu-regs.c.inc

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: All uses are strictly read-only. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --- target/ppc/power8-pmu-regs.c.inc | 4 ++-- 1 file changed, 2 inserti

Re: [PATCH v2 22/25] target/ppc: Avoid tcg_const_* in translate.c

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:35, Richard Henderson wrote: All remaining uses are strictly read-only. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --- target/ppc/translate.c | 142 +-

Re: [PATCH v2 23/25] target/tricore: Use min/max for saturate

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:35, Richard Henderson wrote: Use tcg_constant_i32 for the bounds. Signed-off-by: Richard Henderson --- Cc: Bastian Koppelmann --- target/tricore/translate.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) static void gen_saturate(TCGv ret, TCGv arg, i

Re: [PATCH v2 14/25] target/ppc: Avoid tcg_const_i64 in do_vcntmb

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: Compute both partial results separately and accumulate at the end, instead of accumulating in the middle. Signed-off-by: Richard Henderson --- Cc: Daniel Henrique Barboza Cc: Cédric Le Goater Cc: David Gibson Cc: Greg Kurz Cc: qemu-...@nongnu.org --

Re: [PULL 0/9] Fix missing memory barriers on ARM

2023-03-09 Thread Peter Maydell
On Tue, 7 Mar 2023 at 11:43, Paolo Bonzini wrote: > > The following changes since commit c61d1a066cb6cf90662c82d0e35660fc0ccacbaf: > > Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging > (2023-03-02 16:13:45 +) > > are available in the Git repository at: > > https:/

[PATCH v1] migration/multifd: correct multifd_send_thread to trace the flags

2023-03-09 Thread Wei Wang
The p->flags could be updated via the send_prepare callback, e.g. OR-ed with MULTIFD_FLAG_ZLIB via zlib_send_prepare. Assign p->flags to the local "flags" before the send_prepare callback could only get partial of p->flags. Fix it by moving the assignment of p->flags to the local flags after the ca

Re: [PATCH] virtio: refresh vring region cache after updating a virtqueue size

2023-03-09 Thread Cornelia Huck
On Thu, Mar 02 2023, Carlos López wrote: > When a virtqueue size is changed by the guest via > virtio_queue_set_num(), its region cache is not automatically updated. > If the size was increased, this could lead to accessing the cache out > of bounds. For example, in vring_get_used_event(): > >

Re: [PATCH v2 2/3] block: make BlockBackend->disable_request_queuing atomic

2023-03-09 Thread Paolo Bonzini
On 3/7/23 22:04, Stefan Hajnoczi wrote: static int coroutine_fn GRAPH_RDLOCK @@ -1271,7 +1271,8 @@ static void coroutine_fn blk_wait_while_drained(BlockBackend *blk) { assert(blk->in_flight > 0); -if (qatomic_read(&blk->quiesce_counter) && !blk->disable_request_queuing) { +

Re: [SeaBIOS] Re: [SeaBIOS PATCH] xen: require Xen info structure at 0x1000 to detect Xen

2023-03-09 Thread Gerd Hoffmann
On Tue, Mar 07, 2023 at 08:42:18AM +, David Woodhouse wrote: > On Thu, 2023-02-02 at 10:10 +0100, Gerd Hoffmann wrote: > > > Thanks, Kevin. > > > > > > I'd like to get the rest of the Xen platform support in to qemu 8.0 > > > if > > > possible. Which is currently scheduled for March. > > > >

[PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-09 Thread Richard W.M. Jones
[ Patch series also available here, along with this cover letter and the script used to generate test results: https://gitlab.com/rwmjones/qemu/-/commits/2023-nbd-multi-conn-v1 ] This patch series adds multi-conn support to the NBD block driver in qemu. It is only meant for discussion and tes

[PATCH nbd 2/4] nbd: Split out block device state from underlying NBD connections

2023-03-09 Thread Richard W.M. Jones
To implement multi-conn, we will put multiple underlying NBD connections (ie. NBDClientConnection) inside the NBD block device handle (BDRVNBDState). This requires first breaking the one-to-one relationship between NBDClientConnection and BDRVNBDState. To do this a new structure (NBDConnState) is

[PATCH nbd 4/4] nbd: Enable multi-conn using round-robin

2023-03-09 Thread Richard W.M. Jones
Enable NBD multi-conn by spreading operations across multiple connections. (XXX) This uses a naive round-robin approach which could be improved. For example we could look at how many requests are in flight and assign operations to the connections with fewest. Or we could try to estimate (based on

[PATCH nbd 3/4] nbd: Open multiple NBD connections if multi-conn is set

2023-03-09 Thread Richard W.M. Jones
If the user opts in to multi-conn and the server advertises it, open multiple NBD connections. They are opened with the same parameters as the initial connection. Similarly on the close path the connections are closed. However only the zeroth connection is used, so this commit does not actually

[PATCH nbd 1/4] nbd: Add multi-conn option

2023-03-09 Thread Richard W.M. Jones
Add multi-conn option to the NBD client. This commit just adds the option, it is not functional. Setting this to a value > 1 permits multiple connections to the NBD server; a typical value might be 4. The default is 1, meaning only a single connection is made. If the NBD server does not adverti

Re: [PATCH v2 1/3] hw/intc/ioapic: Update KVM routes before redelivering IRQ, on RTE update

2023-03-09 Thread Paolo Bonzini
On 3/8/23 12:19, David Woodhouse wrote: A Linux guest will perform IRQ migration after the IRQ has happened, updating the RTE to point to the new destination CPU and then unmasking the interrupt. However, when the guest updates the RTE, ioapic_mem_write() calls ioapic_service(), which redelivers

[PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Hanna Czenczek
Commit 7e5cdb345f77d76cb4877fe6230c4e17a7d0d0ca ("ide: Increment BB in-flight counter for TRIM BH") fixed a problem when cancelling trims: ide_cancel_dma_sync() drains the BB to stop a potentially ongoing request, and then asserts that no request is active anymore. When trying to cancel a trim, th

[PULL 1/3] edk2: update submodule to edk2-stable202302

2023-03-09 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- roms/edk2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/edk2 b/roms/edk2 index b24306f15daa..f80f052277c8 16 --- a/roms/edk2 +++ b/roms/edk2 @@ -1 +1 @@ -Subproject commit b24306f15daa2ff8510b06702114724b33895d3c +Subproject commit f

[PULL 0/3] Edk2 stable202302 20230309 patches

2023-03-09 Thread Gerd Hoffmann
tags/edk2-stable202302-20230309-pull-request for you to fetch changes up to 75bc97ac50634229fa9da45faa1fa64bbe6024c7: edk2: update firmware binaries (2023-03-09 12:49:29 +0100) edk2: update to 202302

[PULL 2/3] edk2: replace build scripts

2023-03-09 Thread Gerd Hoffmann
Remove Makefile.edk2 and the edk2*.sh scripts with a python script (which already handles fedora rpm builds) and a config file for it. Signed-off-by: Gerd Hoffmann --- roms/edk2-build.py | 372 + roms/Makefile | 29 +--- roms/Makefile.edk2

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Paolo Bonzini
On 3/9/23 12:44, Hanna Czenczek wrote: + * + * Note that TRIM operations call blk_aio_pdiscard() multiple + * times (and finally increment s->blk's in-flight counter while + * ide_trim_bh_cb() is scheduled), so we have to loop blk_drain() + * until the whole operation is done.

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Paolo Bonzini
On Thu, Mar 9, 2023 at 1:05 PM Paolo Bonzini wrote: > I think having to do this is problematic, because the blk_drain should > leave no pending operation. > > Here it seems okay because you do it in a controlled situation, but the > main thread can also issue blk_drain(), or worse bdrv_drained_beg

Re: [PATCH v2 2/3] block: make BlockBackend->disable_request_queuing atomic

2023-03-09 Thread Stefan Hajnoczi
On Thu, Mar 09, 2023 at 12:18:00PM +0100, Paolo Bonzini wrote: > On 3/7/23 22:04, Stefan Hajnoczi wrote: > > static int coroutine_fn GRAPH_RDLOCK > > @@ -1271,7 +1271,8 @@ static void coroutine_fn > > blk_wait_while_drained(BlockBackend *blk) > > { > > assert(blk->in_flight > 0); > > -

[PATCH v17 06/12] s390x/cpu topology: interception of PTF instruction

2023-03-09 Thread Pierre Morel
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are interce

[PATCH v17 09/12] machine: adding s390 topology to query-cpu-fast

2023-03-09 Thread Pierre Morel
S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth --- qapi/machine.json | 9 - hw/core/machine-q

[PATCH v17 05/12] s390x/cpu topology: resetting the Topology-Change-Report

2023-03-09 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- include/hw/s390x/cpu-topology.h | 1 + targ

[PATCH v17 08/12] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-03-09 Thread Pierre Morel
The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU. The same command allows to modify the CPU attributes modifiers like polarization e

[PATCH v17 03/12] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-03-09 Thread Pierre Morel
On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h | 21 +++ include/hw/s390x/sclp.h | 1 + target/s390x/cpu.h | 72 hw/s390

[PATCH v17 12/12] docs/s390x/cpu topology: document s390x cpu topology

2023-03-09 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/devel/index-internals.rst | 1 + docs/devel/s390-cpu-topology.rst | 146 ++ docs/system/s390x/cpu-topology.rst | 238 + docs/system/target

[PATCH v17 01/12] s390x/cpu topology: add s390 specifics to CPU topology

2023-03-09 Thread Pierre Morel
S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications on the host vCPUs scheduling and help the guest take the best decisions on the scheduling of threads on the vCPUs. Let

[PATCH v17 10/12] machine: adding s390 topology to info hotpluggable-cpus

2023-03-09 Thread Pierre Morel
S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel --- hw/core/machine-hmp-cmds.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c ind

[PATCH v17 00/12] s390x: CPU Topology

2023-03-09 Thread Pierre Morel
Hi, What is new in this new spin: A) shadow_entitlement stores the vertical entitlement It serves two purposes: 1) when the host specifies the entitlement, he may not be aware of the polarization and may provide entitlement which is not correct for the current polarization. For exemp

[PATCH v17 11/12] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-03-09 Thread Pierre Morel
When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 33 + hw/s390x/cp

[PATCH v17 02/12] s390x/cpu topology: add topology entries on CPU hotplug

2023-03-09 Thread Pierre Morel
The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books and sockets in the case they are not specified. - verify the CPU attributes - check that we have still room on t

[PATCH v17 07/12] target/s390x/cpu topology: activate CPU topology

2023-03-09 Thread Pierre Morel
The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled by default and fenced for SE (secure executi

[PATCH v17 04/12] s390x/sclp: reporting the maximum nested topology entries

2023-03-09 Thread Pierre Morel
The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch

Re: [PULL 25/67] target/m68k: Remove `NB_MMU_MODES` define

2023-03-09 Thread Laurent Vivier
Le 07/03/2023 à 18:58, Richard Henderson a écrit : From: Anton Johansson via The author field seems broken. Thanks, Laurent Signed-off-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20230306175230.7110-11-a...

Re: [PATCH v2 2/3] block: make BlockBackend->disable_request_queuing atomic

2023-03-09 Thread Stefan Hajnoczi
On Thu, Mar 09, 2023 at 10:07:40AM +0100, Paolo Bonzini wrote: > On 3/7/23 22:04, Stefan Hajnoczi wrote: > > This field is accessed by multiple threads without a lock. Use explicit > > qatomic_read()/qatomic_set() calls. There is no need for acquire/release > > because blk_set_disable_request_queui

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Hanna Czenczek
On 09.03.23 13:08, Paolo Bonzini wrote: On Thu, Mar 9, 2023 at 1:05 PM Paolo Bonzini wrote: I think having to do this is problematic, because the blk_drain should leave no pending operation. Here it seems okay because you do it in a controlled situation, but the main thread can also issue blk_

Re: [PATCH] linux-user/mips: Low down switchable NaN2008 requirement

2023-03-09 Thread Philippe Mathieu-Daudé
Hi Jiaxun, On 11/2/23 18:34, Jiaxun Yang wrote: Previously switchable NaN2008 requires fcsr31.nan2008 to be writable for guest. However as per MIPS arch spec this bit can never be writable. This cause NaN2008 ELF to be rejected by QEMU. NaN2008 can be enabled on R2~R5 processors, just make it a

Re: [PATCH v2 12/25] target/m68k: Reject immediate as destination in gen_ea_mode

2023-03-09 Thread Laurent Vivier
Le 07/03/2023 à 19:34, Richard Henderson a écrit : In theory this should never happen, as all such instructions are illegal. This is checked in e.g. gen_lea_mode and gen_ea_mode_fp but not here. In case something higher up isn't checking modes properly, return NULL_QREG. This will result in an

Re: [PATCH v3] qapi: give available enum values as error hint

2023-03-09 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Wed, Mar 8, 2023 at 5:55 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > This allows for a more pleasant user experience. >> > >> > Before: >> > $ ./qemu-system-x86_64 -display egl-headless,gl=

Re: [PATCH 1/6] block: don't acquire AioContext lock in bdrv_drain_all()

2023-03-09 Thread Stefan Hajnoczi
On Wed, Mar 08, 2023 at 06:25:43PM +0100, Kevin Wolf wrote: > Am 08.03.2023 um 15:26 hat Stefan Hajnoczi geschrieben: > > On Wed, Mar 08, 2023 at 09:48:17AM +0100, Kevin Wolf wrote: > > > Am 07.03.2023 um 20:20 hat Stefan Hajnoczi geschrieben: > > > > On Tue, Mar 07, 2023 at 06:17:22PM +0100, Kevin

Re: [PULL 00/20] MIPS patches for 2023-03-07

2023-03-09 Thread Peter Maydell
On Tue, 7 Mar 2023 at 23:48, Philippe Mathieu-Daudé wrote: > > The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: > > Merge tag 'pull-riscv-to-apply-20230306' of > https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 > +) > > are available in t

Re: [PULL 0/5] aspeed queue

2023-03-09 Thread Peter Maydell
On Tue, 7 Mar 2023 at 15:55, Cédric Le Goater wrote: > > The following changes since commit 817fd33836e73812df2f1907612b57750fcb9491: > > Merge tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu > into staging (2023-03-06 14:06:06 +) > > are available in the Git repository

Re: [PULL 00/67] tcg patch queue

2023-03-09 Thread Peter Maydell
On Tue, 7 Mar 2023 at 17:58, Richard Henderson wrote: > > The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: > > Merge tag 'pull-riscv-to-apply-20230306' of > https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 > +) > > are available in the Gi

Re: [PATCH v7] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-03-09 Thread Dorinda Bassey
Hi Marc-André, Thank you for your feedback. Given that we have only one loop, I would set the thread name to NULL, > (which will use "pw-thread-loop" by default) > I think it's preferable to be explicit and clear about the thread name. It's not clear to me the reason being that it's only one loop

Re: [PATCH v2 08/25] target/arm: Avoid tcg_const_* in translate-mve.c

2023-03-09 Thread Philippe Mathieu-Daudé
On 7/3/23 19:34, Richard Henderson wrote: All uses are in the context of an accumulator conditionally having a zero input. Split the rda variable to rda_{i,o}, and set rda_i to tcg_constant_foo(0) when required. Signed-off-by: Richard Henderson --- Cc: qemu-...@nongnu.org --- target/arm/tcg/

Re: [PATCH 2/2] log: remove unneeded new line

2023-03-09 Thread Philippe Mathieu-Daudé
On 28/2/23 23:16, BALATON Zoltan wrote: On Thu, 19 Jan 2023, BALATON Zoltan wrote: The help text of the -d plugin option has a new line at the end which is not needed as one is added automatically. Fixing it removes the unexpected empty line in -d help output. Signed-off-by: BALATON Zoltan P

Re: [PATCH] memory: dump HPA and access type of ramblocks

2023-03-09 Thread Philippe Mathieu-Daudé
On 1/3/23 13:07, Ted Chen wrote: Thanks, Peter. hi Paolo, A gentle ping:) May I know what's your opinion to this patch? Any concern or further improvement required? Merged as commit dbc6ae9c3b (fixing format string on 32-bit hosts).

Re: [PATCH] ui/cocoa: Override windowDidResignKey

2023-03-09 Thread Philippe Mathieu-Daudé
On 28/2/23 08:09, Akihiko Odaki wrote: This fixes pressed keys being stuck when the deck is clicked and the window loses focus. In the past, Gustavo Noronha Silva also had a patch to fix this issue though it only ungrabs mouse and does not release keys, and depends on another out-of-tree patch:

Re: [PATCH v2 0/4] target/mips: misc microMIPS fixes

2023-03-09 Thread Philippe Mathieu-Daudé
Marcin Nowakowski (4): target/mips: fix JALS32/J32 instruction handling for microMIPS target/mips: fix SWM32 handling for micromips target/mips: implement CP0.Config7.WII bit support target/mips: set correct CP0.Config[4,5] values for M14K(c) Merged as commits 9055ffd76e..dcebb36eb0.

Re: [PATCH v2 2/3] block: make BlockBackend->disable_request_queuing atomic

2023-03-09 Thread Paolo Bonzini
On 3/9/23 13:31, Stefan Hajnoczi wrote: On Thu, Mar 09, 2023 at 10:07:40AM +0100, Paolo Bonzini wrote: On 3/7/23 22:04, Stefan Hajnoczi wrote: This field is accessed by multiple threads without a lock. Use explicit qatomic_read()/qatomic_set() calls. There is no need for acquire/release because

Re: [PATCH 0/3] MIPS Virt machine

2023-03-09 Thread Philippe Mathieu-Daudé
Jiaxun Yang (3): docs/system: Remove "mips" board from target-mips.rst Patch 1 merged as commit abe45a859b.

Re: [PATCH v2 2/2] tests/tcg/s390x: Add C(G)HRL test

2023-03-09 Thread Thomas Huth
On 08/03/2023 22.02, Nina Schoetterl-Glausch wrote: Test COMPARE HALFWORD RELATIVE LONG instructions. Test that the bytes following the second operand do not affect the instruction. Test the sign extension performed on the second operand. Signed-off-by: Nina Schoetterl-Glausch --- I don't kno

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-09 Thread Paolo Bonzini
On 3/9/23 13:31, Hanna Czenczek wrote: On 09.03.23 13:08, Paolo Bonzini wrote: On Thu, Mar 9, 2023 at 1:05 PM Paolo Bonzini wrote: I think having to do this is problematic, because the blk_drain should leave no pending operation. Here it seems okay because you do it in a controlled situation,

[PATCH v2] target/riscv: Add RVV registers to log

2023-03-09 Thread Ivan Klokov
Added QEMU option 'rvv' to add RISC-V RVV registers to log like regular regs. Signed-off-by: Ivan Klokov --- v2: - fix option name - fix byte ordering --- accel/tcg/cpu-exec.c | 3 +++ include/hw/core/cpu.h | 2 ++ include/qemu/log.h| 1 + target/riscv/cpu.c| 59 +++

Re: [PATCH 1/8] docs/devel: describe QPP API

2023-03-09 Thread Alex Bennée
Andrew Fasano writes: > From: Elysia Witham > > The new QPP API allows plugin-to-plugin interaction for creating > and using callbacks as well as importing and exporting functions. > The new test plugins qpp_srv and qpp_client demonstrate how > plugins use the new API. > > Signed-off-by: Elysi

Re: [PATCH 2/8] plugins: version 2, require unique plugin names

2023-03-09 Thread Alex Bennée
Andrew Fasano writes: > From: Elysia Witham > > In order for the QPP API to resolve interactions between plugins, > plugins must export their own names which cannot match any other > loaded plugins. > > Signed-off-by: Elysia Witham > Signed-off-by: Andrew Fasano > --- > include/qemu/qemu-pl

Re: Re: [PATCH] target/riscv/csr.c: fix H extension TVM trap

2023-03-09 Thread CHEN Yi
> -Original Messages- > From: "Daniel Henrique Barboza" > Sent Time: 2023-03-09 03:44:03 (Thursday) > To: chenyi2...@zju.edu.cn, qemu-devel@nongnu.org > Cc: "Palmer Dabbelt" , "Alistair Francis" > , "Bin Meng" , "Weiwei Li" > , "Liu Zhiwei" , "open > list:RISC-V TCG CPUs" > Subject:

Re: [PATCH 3/8] plugins: add id_to_plugin_name

2023-03-09 Thread Alex Bennée
Andrew Fasano writes: > From: Elysia Witham > > Plugins will pass their unique id when creating callbacks to > ensure they are associated with the correct plugin. This > internal function resolves those ids to the declared names. > > Signed-off-by: Elysia Witham > Signed-off-by: Andrew Fasano

Re: [PULL 00/73] virtio,pc,pci: features, fixes

2023-03-09 Thread Michael S. Tsirkin
On Tue, Mar 07, 2023 at 08:10:51PM -0500, Michael S. Tsirkin wrote: > The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: > > Merge tag 'pull-riscv-to-apply-20230306' of > https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 > +) > > are availa

Re: [PULL 73/73] virtio: refresh vring region cache after updating a virtqueue size

2023-03-09 Thread Michael S. Tsirkin
On Tue, Mar 07, 2023 at 08:14:31PM -0500, Michael S. Tsirkin wrote: > From: Carlos López > > When a virtqueue size is changed by the guest via > virtio_queue_set_num(), its region cache is not automatically updated. > If the size was increased, this could lead to accessing the cache out > of boun

Re: [PATCH RESEND v6 0/5] migration: reduce time of loading non-iterable vmstate

2023-03-09 Thread Chuang Xu
Hi, Peter, On 2023/3/8 下午11:46, Peter Xu wrote: 1. squash fix into patch1 of yours. 2. introduce address_space_to_flatview_rcu() 3. add specific comment to define when to use which as_to_flat() This can be together with 2). We should suggest using address_space_to_flatview() by default in the

Re: [PATCH v2 2/2] tests/tcg/s390x: Add C(G)HRL test

2023-03-09 Thread Nina Schoetterl-Glausch
On Thu, 2023-03-09 at 14:47 +0100, Thomas Huth wrote: > On 08/03/2023 22.02, Nina Schoetterl-Glausch wrote: > > Test COMPARE HALFWORD RELATIVE LONG instructions. > > Test that the bytes following the second operand do not affect the > > instruction. > > Test the sign extension performed on the seco

Re: [PATCH] intel-iommu: Set status bit after operation completed

2023-03-09 Thread Peter Xu
Hi, Zhenzhong, On Thu, Mar 09, 2023 at 05:23:19PM +0800, Zhenzhong Duan wrote: > According to SDM 11.4.4.2 Global Status Register: > "This field is cleared by hardware when software sets the SRTP field in the > Global Command register. This field is set by hardware when hardware > completes the ‘S

Re: Re: [PATCH] target/riscv/csr.c: fix H extension TVM trap

2023-03-09 Thread CHEN Yi
-Original Messages- From:liweiwei Sent Time:2023-03-09 15:48:17 (Thursday) To: chenyi2...@zju.edu.cn, qemu-devel@nongnu.org Cc: "Palmer Dabbelt" , "Alistair Francis" , "Bin Meng" , "Daniel Henrique Barboza" , "Liu Zhiwei" , "open list:RISC-V TCG CPUs" Subject: Re: [PATCH] target/ri

Re: [PULL 00/27] Enable PV backends with Xen/KVM emulation

2023-03-09 Thread Peter Maydell
On Tue, 7 Mar 2023 at 18:27, David Woodhouse wrote: > > The following changes since commit 9832009d9dd2386664c15cc70f6e6bfe062be8bd: > > Merge tag 'pull-riscv-to-apply-20230306' of > https://gitlab.com/palmer-dabbelt/qemu into staging (2023-03-07 12:53:00 > +) > > are available in the Git

  1   2   3   >