[PULL 18/18] hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi

2024-12-19 Thread Bibo Mao
Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and replace them with LoongArchExtIOICommonState and macro LOONGARCH_EXTIOI_COMMON separately. Also remove unnecessary header files. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c | 31 ++

[PULL 16/18] hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common

2024-12-19 Thread Bibo Mao
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMMON, and has its own realize() function. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c| 39 +++

[PULL 17/18] hw/intc/loongarch_extioi: Add pre_save interface

2024-12-19 Thread Bibo Mao
Add vmstate pre_save interface, which can be used extioi kvm driver in future. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi_common.c | 13 + include/hw/intc/loongarch_extioi_common.h | 1 + 2 files changed, 14 insertions(+) diff --git a/hw/int

Re: [PATCH v1 3/3] i386/sev: Add KVM_EXIT_SNP_REQ_CERTS support for certificate-fetching

2024-12-19 Thread Daniel P . Berrangé
On Wed, Dec 18, 2024 at 04:29:51PM -0600, Michael Roth wrote: > On Wed, Dec 18, 2024 at 05:50:52PM +, Daniel P. Berrangé wrote: > > On Wed, Dec 18, 2024 at 09:49:39AM -0600, Michael Roth wrote: > > > The GHCB specification[1] defines a VMGEXIT-based Guest Request > > > hypercall to allow an SNP

[PATCH v6 1/4] i386/cpu: Support thread and module level cache topology

2024-12-19 Thread Zhao Liu
Allow cache to be defined at the thread and module level. This increases flexibility for x86 users to customize their cache topology. Signed-off-by: Zhao Liu Tested-by: Yongwei Ma Reviewed-by: Jonathan Cameron --- target/i386/cpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(

[PATCH v6 0/4] i386: Support SMP Cache Topology

2024-12-19 Thread Zhao Liu
Hi folks, This is my v6. since Phili has already merged the general smp cache part, v6 just includes the remaining i386-specific changes to support SMP cache topology for PC machine (currently all patches have got Reviewed-by from previous review). Compared with v5 [1], there's no change and just

[PULL 15/18] hw/intc/loongarch_extioi: Add common file loongarch_extioi_common

2024-12-19 Thread Bibo Mao
Add new common file loongarch_extioi_common.c, and move vmstate and property structure to common file. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- hw/intc/loongarch_extioi.c| 59 + hw/intc/loongarch_extioi_common.c | 63 +++

[PATCH v6 2/4] i386/cpu: Update cache topology with machine's configuration

2024-12-19 Thread Zhao Liu
User will configure smp cache topology via -machine smp-cache. For this case, update the x86 CPUs' cache topology with user's configuration in MachineState. Signed-off-by: Zhao Liu Tested-by: Yongwei Ma Reviewed-by: Jonathan Cameron --- Changes since Patch v3: * Updated MachineState.smp_cache

[PATCH v6 4/4] i386/cpu: add has_caches flag to check smp_cache configuration

2024-12-19 Thread Zhao Liu
From: Alireza Sanaee Add has_caches flag to SMPCompatProps, which helps in avoiding extra checks for every single layer of caches in x86 (and ARM in future). Signed-off-by: Alireza Sanaee Signed-off-by: Zhao Liu Reviewed-by: Jonathan Cameron --- Note: Picked from Alireza's series with the cha

[PATCH v6 3/4] i386/pc: Support cache topology in -machine for PC machine

2024-12-19 Thread Zhao Liu
Allow user to configure l1d, l1i, l2 and l3 cache topologies for PC machine. Additionally, add the document of "-machine smp-cache" in qemu-options.hx. Signed-off-by: Zhao Liu Tested-by: Yongwei Ma Reviewed-by: Jonathan Cameron --- Changes since Patch v3: * Described the omitting cache will u

Re: [PATCH 41/71] hw/net: Constify all Property

2024-12-19 Thread Akihiko Odaki
On 2024/12/14 4:07, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Akihiko Odaki

[PULL 00/41] Rust, qdev, target/i386 changes for 2024-12-19

2024-12-19 Thread Paolo Bonzini
The following changes since commit 8032c78e556cd0baec111740a6c636863f9bd7c8: Merge tag 'firmware-20241216-pull-request' of https://gitlab.com/kraxel/qemu into staging (2024-12-16 14:20:33 -0500) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream f

[PULL 28/41] rust: re-export C types from qemu-api submodules

2024-12-19 Thread Paolo Bonzini
Long term we do not want device code to use "bindings" at all, so make it possible to get the relevant types from the other modules of qemu-api. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/qdev.rs| 7 +-- rust/qemu-api/src/qom.rs | 12 +++- rust

[PULL 24/41] Constify all opaque Property pointers

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson s/ Property [*]/ const Property */ Basically all of these only feed object_field_prop_ptr, which now takes a const pointer itself. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-25-richard.hender...@linaro.org Signed-off-by:

[PULL 10/41] hw/sparc: Remove empty Property lists

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-11-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/sparc/sun4m.c | 5 - hw/sparc64/sun4u.c | 5 - 2 files changed, 10 deletions(-) diff --git a/hw/sparc/

[PULL 08/41] hw/s390x: Remove empty Property lists

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-9-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/s390x/3270-ccw.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c

[PULL 12/41] include/hw/qdev-core: Detect most empty Property lists at compile time

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-13-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h| 8 hw/core/qdev-properties.c | 2 +- migration/migration.c | 2 +- 3 files

[PULL 18/41] hw/core: Replace device_class_set_props with a macro

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Use ARRAY_SIZE to implement as device_class_set_props_n. Remove any DEFINE_PROP_END_OF_LIST terminator from the count. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-19-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini -

[PULL 31/41] rust: qom: add initial subset of methods on Object

2024-12-19 Thread Paolo Bonzini
Add an example of implementing instance methods and converting the result back to a Rust type. In this case the returned types are a string (actually a Cow; but that's transparent as long as it derefs to &str) and a QOM class. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-ap

[PULL 23/41] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson There is exactly one instance of this method: print_pci_devfn. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-24-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 2 +- hw/core/qde

[PULL 05/41] hw/pci-host/astro: Remove empty Property list

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-6-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/pci-host/astro.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c

[PULL 39/41] rust: pl011: extend registers to 32 bits

2024-12-19 Thread Paolo Bonzini
The PL011 Technical Reference Manual lists the "real" size of the registers in table 3-1, and only rounds up to the next byte when describing the registers; for example, UARTDR is listed as having width 12/8 (12 bits read, 8 written) and only bits 15:0 are listed in "Table 3-2 UARTDR Register". Ho

[PULL 27/41] rust: rename qemu-api modules to follow C code a bit more

2024-12-19 Thread Paolo Bonzini
A full match would mean calling them qom::object and hw::core::qdev. For now, keep the names shorter but still a bit easier to find. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 4 +- rust/qemu-api-macros/src/lib.rs | 2

[PULL 29/41] rust: tests: allow writing more than one test

2024-12-19 Thread Paolo Bonzini
Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/tests/tests.rs | 115 --- 1 file changed, 67 insertions(+), 48 deletions(-) diff --git a/rust/qemu-api/tests/tests.rs b/rust/qemu-api/tests/tests.rs index 68557fb85c7..953cb15975b 100644 --- a/r

[PULL 34/41] target/i386: Reset TSCs of parked vCPUs too on VM reset

2024-12-19 Thread Paolo Bonzini
From: "Maciej S. Szmigiero" Since commit 5286c3662294 ("target/i386: properly reset TSC on reset") QEMU writes the special value of "1" to each online vCPU TSC on VM reset to reset it. However parked vCPUs don't get that handling and due to that their TSCs get desynchronized when the VM gets res

[PULL 40/41] rust: pl011: fix migration stream

2024-12-19 Thread Paolo Bonzini
The Rust vmstate macros lack the type-safety of their C equivalents (so safe, much abstraction), and therefore they were predictably wrong. The registers have already been changed to 32-bits in the previous patch, but read_pos/read_count/read_trigger also have to be u32 instead of usize. The easie

[PULL 26/41] rust: qom: add possibility of overriding unparent

2024-12-19 Thread Paolo Bonzini
Add a blanket definition of ClassInitImpl that thunks ObjectImpl::UNPARENT and overrides it in ObjectClass if it is not None. ClassInitImpl can now call its superclass's ClassInitImpl, so that the C and Rust hierarchies match more closely. This is mostly done as an example of implementing the met

Re: [PATCH] tests/functional: Convert the kvm_xen_guest avocado test

2024-12-19 Thread Thomas Huth
On 18/12/2024 23.14, David Woodhouse wrote: On Wed, 2024-12-18 at 16:54 +0100, Thomas Huth wrote: On 18/12/2024 12.48, David Woodhouse wrote: On 18 December 2024 12:32:49 CET, Thomas Huth wrote: Use the serial console to execute the commands in the guest instead of using ssh since we don't ha

[PULL 21/41] include/hw/qdev-properties: Shrink struct Property

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Before, via pahole: arm32, a 32-bit host which aligns uint64_t: struct Property { const char * name; /* 0 4 */ const PropertyInfo * info; /* 4 4 */ ptrdiff_t offs

[PULL 01/41] migration: Constify migration_properties

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-2-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- migration/options.h | 2 +- migration/options.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 14/41] migration: Use device_class_set_props_n

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Export the migration_properties array size from options.c; use that to feed device_class_set_props_n. We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-15-richard.hend

[PULL 07/41] hw/tricore: Remove empty Property lists

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-8-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/tricore/tc27x_soc.c | 5 - hw/tricore/tricore_testdevice.c | 5 - 2 files changed, 10 deletions(-

[PULL 02/41] hw/ide: Constify sysbus_ahci_properties

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-3-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/ide/ahci-sysbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/ahci-sysbus.c b/hw/id

[PULL 30/41] rust: qom: add casting functionality

2024-12-19 Thread Paolo Bonzini
Add traits that let client cast typecast safely between object types. In particular, an upcast is compile-time guaranteed to succeed, and a YOLO C-style downcast must be marked as unsafe. The traits are based on an IsA<> trait that declares what is a subclass of what, which is an idea taken from g

[PULL 15/41] hw/scsi/megasas: Use device_class_set_props_n

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-16-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/scsi/megasas.c | 7 --- 1 file changed, 4 in

[PULL 32/41] rust: qemu-api: add a module to wrap functions and zero-sized closures

2024-12-19 Thread Paolo Bonzini
One recurring issue when writing Rust bindings is how to convert a Rust function ("fn" or "impl Fn") to a C function, and how to pass around "self" to a C function that only takes a void*. An easy solution would be to store on the heap a pair consisting of a pointer to the Rust function and the po

[PULL 13/41] hw/core: Introduce device_class_set_props_n

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Record the size of the array in DeviceClass.props_count_. Iterate with known count in qdev_prop_walk. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-14-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qd

[PULL 41/41] rust: pl011: simplify handling of the FIFO enabled bit in LCR

2024-12-19 Thread Paolo Bonzini
Use ==/!= instead of going through bool and xor. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 6 ++ rust/hw/char/pl011/src/lib.rs| 6 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/

[PULL 11/41] hw/virtio: Remove empty Property lists

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-12-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/virtio/vdpa-dev-pci.c | 5 - hw/virtio/vhost-user-snd-pci.c | 5 - 2 files changed, 10 deletions(-)

[PULL 19/41] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson These are not arrays of Property and had no business using DEFINE_PROP_END_OF_LIST. Use plain { } instead. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-20-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- target/

[PULL 33/41] kvm: consistently return 0/-errno from kvm_convert_memory

2024-12-19 Thread Paolo Bonzini
In case of incorrect parameters, kvm_convert_memory() was returning -1 instead of -EINVAL. The guest won't notice because it will move anyway to RUN_STATE_INTERNAL_ERROR, but fix this for consistency and clarity. Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 8 1 file changed,

[PULL 38/41] rust: pl011: fix break errors and definition of Data struct

2024-12-19 Thread Paolo Bonzini
The Data struct is wrong, and does not show how bits 8-15 of DR are the receive status. Fix it, and use it to fix break errors ("c >> 8" in the C code does not translate to "c.to_be_bytes()[3]"). Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/h

[PULL 37/41] rust: pl011: always use reset() method on registers

2024-12-19 Thread Paolo Bonzini
For CR, the ugly-ish "0.into()" idiom is already hidden within the reset method. Do not repeat it. For FR, standardize on reset() being equivalent to "*self = Self::default()" and let reset_fifo toggle only the bits that are related to FIFOs. This commit also reproduces C commit 02b1f7f6192 ("hw

[PULL 06/41] hw/ppc: Only register spapr_nvdimm_properties if CONFIG_LIBPMEM

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Do not register an empty set of properties. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-7-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/ppc/spapr_nvdimm.c | 9 + 1 file changed, 5 insertions(+), 4

[PULL 03/41] target/ppc: Remove empty property list

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Harsh Prateek Bora Link: https://lore.kernel.org/r/20241216035109.3486070-4-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- target/ppc/cpu_init.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/targe

[PULL 04/41] target/s390x: Use s390x_cpu_properties for system mode only

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Avoid the empty property list for user-only mode. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-5-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- target/s390x/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>

2024-12-19 Thread Paolo Bonzini
Parameterize the implementation of ClassInitImpl so that it is possible to call up the chain of implementations, one superclass at a time starting at ClassInitImpl. In order to avoid having to implement (for example) ClassInitImpl, also remove the dummy PL011Class and PL011LuminaryClass structs an

[PULL 36/41] rust: pl011: match break logic of C version

2024-12-19 Thread Paolo Bonzini
Check loopback_enabled(), not fifo_enabled(), like the C code. Also, set_break_error() must not happen until the break is read from the FIFO. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 3 +-- 1 file changed, 1

[PULL 09/41] hw/xen: Remove empty Property lists

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson There is no point in registering no properties. Remove xen_sysdev_class_init entirely, as it did nothing else. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-10-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/x

[PULL 16/41] hw/arm/armsse: Use device_class_set_props_n

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson We must remove DEFINE_PROP_END_OF_LIST so the count is correct. Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-17-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- hw/arm/armsse.c | 9 + 1 file changed, 5 in

[PULL 17/41] rust/qemu-api: Use device_class_set_props_n

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson This means we can update declare_properties to drop the zero terminator at the end of the array as well. Cc: qemu-r...@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Paolo Bonzini Link: https://lore.kernel.org/r/20241216035109.3486070-18-richard.hender...@lin

[PULL 35/41] rust: pl011: fix declaration of LineControl bits

2024-12-19 Thread Paolo Bonzini
The bits in the LineControl struct were backwards. :( Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/lib.rs | 82 +-- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/rust/hw/char/

[PULL 22/41] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr

2024-12-19 Thread Paolo Bonzini
From: Richard Henderson Signed-off-by: Richard Henderson Link: https://lore.kernel.org/r/20241216035109.3486070-23-richard.hender...@linaro.org Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties.c| 2 +- 2 files changed, 2 insertions(+), 2 deleti

RE: [PATCH 1/3] multifd: bugfix for migration using compression methods

2024-12-19 Thread Liu, Yuan1
> -Original Message- > From: Peter Xu > Sent: Thursday, December 19, 2024 1:03 AM > To: Liu, Yuan1 > Cc: faro...@suse.de; qemu-devel@nongnu.org; Zeng, Jason > ; Wang, Yichen > Subject: Re: [PATCH 1/3] multifd: bugfix for migration using compression > methods > > On Wed, Dec 18, 2024 at

Re: Use of BQL from thread in PCIe device

2024-12-19 Thread Paolo Bonzini
On 12/18/24 20:10, Markus Lavin wrote: Sorry but I don't quite follow. Which callbacks are we talking about? Are you saying that it is fine to call pci_dma_read/pci_dma_write/ msix_notify from a thread without acquiring any particular lock in advance? Depending on how exactly your code is bein

Re: [PATCH] tests/functional: Convert the kvm_xen_guest avocado test

2024-12-19 Thread David Woodhouse
On 19 December 2024 09:35:13 CET, Thomas Huth wrote: >On 18/12/2024 23.14, David Woodhouse wrote: >> On Wed, 2024-12-18 at 16:54 +0100, Thomas Huth wrote: >>> On 18/12/2024 12.48, David Woodhouse wrote: On 18 December 2024 12:32:49 CET, Thomas Huth wrote: > Use the serial console to exec

Re: [PATCH 5/5] qtest/e1000e|igb: Fix msix to re-trigger interrupts

2024-12-19 Thread Akihiko Odaki
On 2024/12/18 16:42, Nicholas Piggin wrote: The e1000e and igb tests don't clear the msix pending bit after waiting for it, as it is masked so the irq doesn't get sent. Failing to clear the pending interrupt means all subsequent waits for that interrupt after the first do not actually wait for an

Re: [PATCH v3 00/24] Multifd 🔀 device state transfer support with VFIO consumer

2024-12-19 Thread Cédric Le Goater
Hello Yanghang On 12/19/24 08:55, Yanghang Liu wrote: FYI. The following data comes from the first ping-pong mlx VF migration after rebooting the host. 1. Test for multifd=0: 1.1 Outgoing migration: VF number: 1 VF 4 VF Time elapsed:

Re: [PATCH 4/5] qtest/e1000e|igb: Clear interrupt-cause bits after irq

2024-12-19 Thread Akihiko Odaki
On 2024/12/18 16:42, Nicholas Piggin wrote: The e1000e and igb tests do not clear the ICR/EICR cause bits (or set auto-clear) on seeing queue interrupts, which inhibits the triggering of a new interrupt. Fix this by clearing the cause bits, and verify that the expected cause bit was set. Cc: Mi

Re: [RFC PATCH 04/10] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO_DEVICE

2024-12-19 Thread Philippe Mathieu-Daudé
On 19/12/24 17:59, Daniel P. Berrangé wrote: On Thu, Dec 19, 2024 at 04:38:51PM +0100, Philippe Mathieu-Daudé wrote: Follow the assumed QOM type definition style, prefixing with 'TYPE_'. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/vmcoreinfo.h | 6 +++--- hw/misc/vmcoreinfo.c

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Philippe Mathieu-Daudé
On 19/12/24 18:08, Ani Sinha wrote: On Thu, 19 Dec, 2024, 10:21 pm Philippe Mathieu-Daudé, mailto:phi...@linaro.org>> wrote: On 19/12/24 17:16, Ani Sinha wrote: > > > On Thu, 19 Dec, 2024, 9:22 pm Philippe Mathieu-Daudé, mailto:phi...@linaro.org> >

Re: [PATCH 0/4] include: Header cleanups around "cpu.h"

2024-12-19 Thread Philippe Mathieu-Daudé
On 18/12/24 17:42, Richard Henderson wrote: On 12/18/24 09:51, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (4):    target/ppc: Include missing headers in mmu-hash[32,64].h    tcg/tci: Include missing 'disas/dis-asm.h' header    exec/ram_addr: Include missing 'exec/hwaddr.h' and 'exec/cp

Re: [RFC PATCH 05/10] hw/misc/vmcoreinfo: Convert to three-phase reset interface

2024-12-19 Thread Daniel P . Berrangé
On Thu, Dec 19, 2024 at 04:38:52PM +0100, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/misc/vmcoreinfo.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o

Re: [PATCH] accel/tcg: Un-inline translator_is_same_page()

2024-12-19 Thread Philippe Mathieu-Daudé
On 18/12/24 16:41, Philippe Mathieu-Daudé wrote: Remove the single target-specific definition used in "exec/translator.h" (TARGET_PAGE_MASK) by un-inlining is_same_page(). Rename the method as translator_is_same_page() and improve its documentation. Use it in translator_use_goto_tb(). Signed-off

Re: [PATCH 1/1] MAINTAINERS: remove myself from sbsa-ref

2024-12-19 Thread Philippe Mathieu-Daudé
On 18/12/24 13:30, Marcin Juszkiewicz wrote: I am ending my time with Linaro and do not have plans to continue working on SBSA Reference Platform anymore. Signed-off-by: Marcin Juszkiewicz --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] accel/tcg: Really restrict cpu_io_recompile() to system emulation

2024-12-19 Thread Philippe Mathieu-Daudé
On 16/12/24 17:05, Philippe Mathieu-Daudé wrote: Commit 38fc4b11e03 ("accel/tcg: Restrict cpu_io_recompile() to system emulation") inadvertently restricted cpu_io_recompile() to SoftMMU. Correct to restrict to system emulation. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20241212185341

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, 19 Dec, 2024, 10:21 pm Philippe Mathieu-Daudé, wrote: > On 19/12/24 17:16, Ani Sinha wrote: > > > > > > On Thu, 19 Dec, 2024, 9:22 pm Philippe Mathieu-Daudé, > > wrote: > > > > On 16/12/24 12:48, Ani Sinha wrote: > > > > > diff --git a/hw/misc/meson.bui

Re: [PATCH 0/3] include: Cleanups around 'exec/cpu-common.h' header

2024-12-19 Thread Philippe Mathieu-Daudé
On 17/12/24 16:13, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (3): hw/xen: Remove unnecessary 'exec/cpu-common.h' header system/numa: Remove unnecessary 'exec/cpu-common.h' header system/accel-ops: Remove unnecessary 'exec/cpu-common.h' header Series queued.

Re: [PATCH] accel/tcg: Declare cpu_loop_exit_requested() in 'exec/cpu-common.h'

2024-12-19 Thread Philippe Mathieu-Daudé
On 17/12/24 15:06, Philippe Mathieu-Daudé wrote: Move cpu_loop_exit_requested() declaration to "exec/cpu-common.h", along with the related cpu_loop_exit_noexc(), cpu_loop_exit(), cpu_loop_exit_atomic() and cpu_loop_exit_restore() methods. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <202

Re: [PATCH 0/2] include: Two cleanups around missing 'qemu/atomic.h'

2024-12-19 Thread Philippe Mathieu-Daudé
On 17/12/24 15:13, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (2): exec/translation-block: Include missing 'qemu/atomic.h' header qemu/coroutine: Include missing 'qemu/atomic.h' header Patches queued.

Re: [PATCH V4 19/19] migration: cpr-transfer documentation

2024-12-19 Thread Peter Xu
On Mon, Dec 02, 2024 at 05:20:11AM -0800, Steve Sistare wrote: > Signed-off-by: Steve Sistare I think this one is already good enough, so: Reviewed-by: Peter Xu But still, a few comments inline. > --- > docs/devel/migration/CPR.rst | 176 > ++- > 1 fi

Re: [PATCH v5] hw/acpi: Add vmclock device

2024-12-19 Thread David Woodhouse
On Tue, 2024-12-03 at 17:33 +, David Woodhouse wrote: > From: David Woodhouse > > The vmclock device addresses the problem of live migration with > precision clocks. The tolerances of a hardware counter (e.g. TSC) are > typically around ±50PPM. A guest will use NTP/PTP/PPS to discipline that

Re: [PATCH v2 00/13] QOM: container_get() removal

2024-12-19 Thread Philippe Mathieu-Daudé
On 21/11/24 20:21, Peter Xu wrote: Peter Xu (13): qom: Add TYPE_CONTAINER macro qom: New object_property_add_new_container() tests: Fix test-qdev-global-props on anonymous qdev realize() tests: Explicitly create containers in test_qom_partial_path() ppc/e500: Avoid abuse of contai

Re: [PATCH] meson: Do not define CONFIG_DEVICES on user emulation

2024-12-19 Thread Philippe Mathieu-Daudé
On 18/12/24 16:12, Philippe Mathieu-Daudé wrote: CONFIG_DEVICES is not generated on user emulation, so do not define it. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Patch queued, thanks.

Re: [PATCH v2 16/27] util/qemu-timer: fix indentation

2024-12-19 Thread Philippe Mathieu-Daudé
On 18/12/24 17:20, Alex Bennée wrote: Purely cosmetic. Signed-off-by: Alex Bennée --- util/qemu-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v11 2/2] tpm: add backend for mssim

2024-12-19 Thread Daniel P . Berrangé
On Thu, Dec 12, 2024 at 12:05:28PM -0500, James Bottomley wrote: > The Microsoft Simulator (mssim) is the reference emulation platform > for the TCG TPM 2.0 specification. > > https://github.com/Microsoft/ms-tpm-20-ref.git > > It exports a fairly simple network socket based protocol on two > sock

Re: [PATCH v3 1/7] meson: Run some compiler checks using -Wno-unused-value

2024-12-19 Thread Philippe Mathieu-Daudé
On 19/12/24 01:37, Nicholas Piggin wrote: On Thu Dec 19, 2024 at 4:21 AM AEST, Philippe Mathieu-Daudé wrote: When running Clang static analyzer on macOS I'm getting: include/qemu/osdep.h:634:8: error: redefinition of 'iovec' 634 | struct iovec { |^ /Library/Develope

Re: [PATCH v2 19/22] tests/qtest/migration: Add migration-test-smoke

2024-12-19 Thread Peter Xu
On Thu, Dec 19, 2024 at 12:38:05PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Dec 18, 2024 at 06:08:01PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Wed, Dec 18, 2024 at 03:13:08PM -0300, Fabiano Rosas wrote: > >> >> Peter Xu writes: > >> >> > >> >> > On

[PATCH v3 03/14] s390x/s390-virtio-hcall: prepare for more diag500 hypercalls

2024-12-19 Thread David Hildenbrand
Let's generalize, abstracting the virtio bits. diag500 is now a generic hypercall to handle QEMU/KVM specific things. Explicitly specify all already defined subcodes, including legacy ones (so we know what we can use for new hypercalls). Move the PGM_SPECIFICATION injection into the renamed functi

[RFC PATCH 04/10] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO_DEVICE

2024-12-19 Thread Philippe Mathieu-Daudé
Follow the assumed QOM type definition style, prefixing with 'TYPE_'. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/vmcoreinfo.h | 6 +++--- hw/misc/vmcoreinfo.c | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/hw/misc/vmcoreinfo.h b/includ

[PATCH] rust: fix --enable-debug-mutex

2024-12-19 Thread Paolo Bonzini
--feature is an option for cargo but not for rustc. Reported-by: Bernhard Beschow Signed-off-by: Paolo Bonzini --- rust/qemu-api/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.build index bb779364cb2..0c08d2e51f5 1

[PATCH v2 2/2] target/loongarch: Use auto method with LASX feature

2024-12-19 Thread Bibo Mao
Like LSX feature, add type OnOffAuto for LASX feature setting. Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 50 +++ target/loongarch/cpu.h | 2 ++ target/loongarch/kvm/kvm.c | 53 ++ 3 files changed, 89 insertio

[PATCH 05/10] rust: qom: automatically use Drop trait to implement instance_finalize

2024-12-19 Thread Paolo Bonzini
Replace the customizable INSTANCE_FINALIZE with a generic function that drops the Rust object. Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/qom.rs | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rust/qemu-api/src/qom.rs b/rust/qemu-

[PATCH 03/10] rust: macros: check that the first field of a #[derive(Object)] struct is a ParentField

2024-12-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- rust/qemu-api-macros/src/lib.rs | 61 +++-- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/rust/qemu-api-macros/src/lib.rs b/rust/qemu-api-macros/src/lib.rs index 74a8bc7503e..778b698be45 100644 --- a/rust/qemu-api-macr

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, 19 Dec, 2024, 9:16 pm Philippe Mathieu-Daudé, wrote: > On 19/12/24 15:07, Ani Sinha wrote: > > On Thu, Dec 19, 2024 at 6:25 PM Marc-André Lureau > > wrote: > >> > >> Hi > >> > >> On Thu, Dec 19, 2024 at 2:03 PM Philippe Mathieu-Daudé > >> wrote: > >> +static const TypeInfo vmfwupdat

[PATCH v3 09/14] s390x/s390-skeys: prepare for memory devices

2024-12-19 Thread David Hildenbrand
With memory devices, we will have storage keys for memory that exceeds the initial ram size. The TODO already states that current handling is subopimal, but we won't worry about improving that (TCG-only) thing for now. Message-ID: <20241008105455.2302628-10-da...@redhat.com> Acked-by: Michael S.

[RFC PATCH 00/10] hw/misc/vmcoreinfo: Convert from QDev to plain Object

2024-12-19 Thread Philippe Mathieu-Daudé
No reason for vmcoreinfo to be based on QDev, since it doesn't use any QDev API. Demote to plain Object. Since we can only register one type, introduce a new one for object: 'vmcore-info' (dash separator), keeping 'vmcoreinfo' device during the deprecation period. Philippe Mathieu-Daudé (10): h

[PATCH 3/3] docs: Replace 'since' -> 'removed in' in removed-features.rst

2024-12-19 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- docs/about/removed-features.rst | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index e3a87f3f555..cb1388049a8 100644 --- a/docs/about/removed-fea

[PATCH 2/3] docs: Correct release of TCG trace-events removal

2024-12-19 Thread Philippe Mathieu-Daudé
TCG trace-events were deprecated before the v6.2 release, and removed for v7.0. Signed-off-by: Philippe Mathieu-Daudé --- docs/about/removed-features.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst inde

Re: [RFC PATCH 00/10] hw/misc/vmcoreinfo: Convert from QDev to plain Object

2024-12-19 Thread Daniel P . Berrangé
On Thu, Dec 19, 2024 at 04:38:47PM +0100, Philippe Mathieu-Daudé wrote: > No reason for vmcoreinfo to be based on QDev, since it > doesn't use any QDev API. Demote to plain Object. I'm not especially convinced by that rationale, at least in the short term[1]. As a user of QEMU, I would tend to vi

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, 19 Dec, 2024, 9:22 pm Philippe Mathieu-Daudé, wrote: > On 16/12/24 12:48, Ani Sinha wrote: > > > diff --git a/hw/misc/meson.build b/hw/misc/meson.build > > index d02d96e403..4c5bdb0de2 100644 > > --- a/hw/misc/meson.build > > +++ b/hw/misc/meson.build > > @@ -148,6 +148,8 @@ specific_ss.a

Re: [PATCH V4 16/19] tests/qtest: defer connection

2024-12-19 Thread Peter Xu
On Mon, Dec 02, 2024 at 05:20:08AM -0800, Steve Sistare wrote: > Add an option to defer making the connecting to the monitor and qtest > sockets when calling qtest_init_with_env. The client makes the connection > later by calling qtest_connect_deferred and qtest_qmp_handshake. > > A test cannot s

Re: [PULL 00/15] Host Memory Backends and Memory devices queue 2024-12-18

2024-12-19 Thread David Hildenbrand
On 19.12.24 13:20, Thomas Huth wrote: On 19/12/2024 12.57, David Hildenbrand wrote: On 19.12.24 12:43, Christian Borntraeger wrote: Am 19.12.24 um 12:18 schrieb David Hildenbrand: The following on top seems to make everything happy. I wish the CONFIG_S390_CCW_VIRTIO stuff would't have to be so

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-19 Thread Ani Sinha
On Thu, Dec 19, 2024 at 6:25 PM Marc-André Lureau wrote: > > Hi > > On Thu, Dec 19, 2024 at 2:03 PM Philippe Mathieu-Daudé > wrote: > > >>> +static const TypeInfo vmfwupdate_device_info = { > > >>> +.name = TYPE_VMFWUPDATE, > > >>> +.parent= TYPE_DEVICE, > > >> > > >> Wha

Re: [PATCH] tests/functional: Convert the kvm_xen_guest avocado test

2024-12-19 Thread David Woodhouse
On Thu, 2024-12-19 at 13:24 +0100, Thomas Huth wrote: > On 19/12/2024 09.49, David Woodhouse wrote: > > On 19 December 2024 09:35:13 CET, Thomas Huth wrote: > > > On 18/12/2024 23.14, David Woodhouse wrote: > > > > On Wed, 2024-12-18 at 16:54 +0100, Thomas Huth wrote: > > > > > On 18/12/2024 12.48

[PATCH v2 1/2] target/loongarch: Use auto method with LSX feature

2024-12-19 Thread Bibo Mao
Like LBT feature, add type OnOffAuto for LSX feature setting. Also add LSX feature detection with new VM ioctl command, fallback to old method if it is not supported. Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 38 +++ target/loongarch/cpu.h | 2 ++ targ

Re: [PATCH 2/3] docs: Correct release of TCG trace-events removal

2024-12-19 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > TCG trace-events were deprecated before the v6.2 release, > and removed for v7.0. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PATCH v3 00/14] s390x: virtio-mem support

2024-12-19 Thread David Hildenbrand
Resending it with minor make-weird-things-compile fixes. Will queue this shortly again + resend the PULL request if there are no comments. Based on current master. There is really not much left to do on s390x, because virtio-mem already implements most things we need today (e.g., early-migration,

Re: [PATCH] hw/virtio: reset virtio balloon stats on machine reset

2024-12-19 Thread Daniel P . Berrangé
On Thu, Dec 19, 2024 at 02:51:21PM +0100, David Hildenbrand wrote: > On 18.12.24 18:29, Daniel P. Berrangé wrote: > > When a machine is first booted, all virtio balloon stats are initialized > > to their default value -1 (18446744073709551615 when represented as > > unsigned). > > > > They remain

[PATCH v3 11/14] s390x/pv: prepare for memory devices

2024-12-19 Thread David Hildenbrand
Let's avoid checking for the maxram_size, and instead rely on the memory limit determined in s390_memory_init(), that might be larger than maxram_size, for example due to alignment purposes. This check now correctly mimics what the kernel will check in kvm_s390_pv_set_aside(), whereby a VM <= 2 Gi

  1   2   3   4   >