Re: [PATCH v2] docs: Explain how to use passt

2025-03-20 Thread Laurent Vivier
Hi, I think it could be interesting to have this information in the current release. Thanks, Laurent On 14/03/2025 09:43, Laurent Vivier wrote: cc: trivial On 11/03/2025 14:27, Laurent Vivier wrote: Add a chapter to explain how to use passt(1) instead of '-net user'. passt(1) can be connecte

Re: [PATCH for-10.1 07/32] vfio: Introduce a new header file for VFIOdisplay declarations

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:50AM +0100, Cédric Le Goater wrote: > Gather all VFIOdisplay related declarations into "display.h" to > reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH 1/1] target/loongarch: fix bad shift in check_ps()

2025-03-20 Thread gaosong
在 2025/3/20 下午4:49, bibo mao 写道: On 2025/3/19 上午9:41, Song Gao wrote:   In expression 1ULL << tlb_ps, left shifting by more than 63 bits has undefined behavior. The shift amount, tlb_ps, is as much as 64. check "tlb_ps >=64" to fix. Resolves: Coverity CID 1593475 Fixes: d882c284a3 ("target/

Re: [PATCH for-10.1 12/32] vfio: Make vfio_group_list static

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:55AM +0100, Cédric Le Goater wrote: > vfio_group_list is only used in file "container.c". > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH] host/include/loongarch64: Fix inline assembly compatibility with Clang

2025-03-20 Thread gaosong
在 2025/3/14 上午11:31, Yao Zi 写道: Clang on LoongArch only accepts fp register names in the dollar-prefixed form, while GCC allows omitting the dollar. Change registers in ASM clobbers to the dollar-prefixed form to make user emulators buildable with Clang on loongarch64. No functional change invovl

RE: [PATCH for-10.1 17/32] vfio: Move vfio_kvm_device_add/del_fd() to helpers.c

2025-03-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 17/32] vfio: Move vfio_kvm_device_add/del_fd() to >helpers.c > >vfio_kvm_device_add/del_fd() are low level routines. Move them with >the other helpers. > >Signed-off-by: Cédric Le Goater Reviewed-by: Zhenzhong Duan

RE: [PATCH for-10.1 18/32] vfio: Move vfio_get_device_info() to helpers.c

2025-03-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 18/32] vfio: Move vfio_get_device_info() to helpers.c > >vfio_get_device_info() is a low level routine. Move it with the other >helpers. > >Signed-off-by: Cédric Le Goater Reviewed-by: Zhenzhong Duan Thanks Zhenzho

Re: [PATCH for-10.1 21/32] vfio: Move vfio_kvm_device_fd() into helpers.c

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:04AM +0100, Cédric Le Goater wrote: > The vfio_kvm_device_add/del_fd() routines opening the VFIO pseudo > device are defined in "helpers.c". Move 'vfio_kvm_device_fd' > definition there and its declaration into "helpers.h" to reduce > exposure of VFIO internals in "hw

RE: [PATCH for-10.1 14/32] vfio: Move Host IOMMU type declarations into their respective files

2025-03-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 14/32] vfio: Move Host IOMMU type declarations into >their respective files > >These definitions don't have any use outside of their respective >submodules. There is no need to expose them externally. Keep them >priva

Re: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking definitions and declarations

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:07AM +0100, Cédric Le Goater wrote: > File "common.c" has been emptied of most of its definitions by the > previous changes and the only definitions left are related to dirty > tracking. Rename it to "dirty-tracking.c" and introduce its associated > "dirty-tracking.h"

Re: [PATCH for-10.1 31/32] vfio: Introduce vfio_dirty_tracking_un/register() routines

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:14AM +0100, Cédric Le Goater wrote: > This hides the MemoryListener implementation and makes the code common > to both IOMMU backends, legacy and IOMMUFD. Patch itself seems fine but > index > 8e47ccbb9aea748e57271508ddcd10e394abf16c..d7827f7b64adf3e2b41fafd59aab71

RE: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking definitions and declarations

2025-03-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking >definitions and declarations > >File "common.c" has been emptied of most of its definitions by the >previous changes and the only definitions left are related to dir

[PATCH v5 2/6] hw/loongarch/virt: Fix error handling in cpu plug

2025-03-20 Thread Bibo Mao
In function virt_cpu_plug(), it will send cpu plug message to interrupt controller extioi and ipi irqchip. If there is problem in this function, system should continue to run and keep state the same before cpu is added. Object cpuslot::cpu is set at last only when there is no any error. If there i

[PATCH] qdev, rust/hpet: fix type of HPET "timers" property

2025-03-20 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.c | 35 ++ rust/hw/timer/hpet/src/hpet.rs | 6 +++--- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/include/hw/qdev-properties.h b/include/hw/qde

[PATCH 1/1] hw/intc/aspeed: Fix IRQ handler mask check

2025-03-20 Thread Steven Lee via
Updated the IRQ handler mask check to AND with select variable. This ensures that the interrupt service routine is correctly triggered for the interrupts within the same irq group. For example, both `eth0` and the debug UART are handled in `GICINT132`. Without this fix, the debug console may hang

RE: [PATCH for-10.1 11/32] vfio: Introduce a new header file for VFIOcontainer declarations

2025-03-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 11/32] vfio: Introduce a new header file for >VFIOcontainer declarations > >Gather all VFIOcontainer related declarations into "container.h" to >reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > >These de

[PATCH 0/1] hw/intc/aspeed: Fix IRQ handler mask check

2025-03-20 Thread Steven Lee via
Dear maintainers, This patch addresses an issue in the ast27x0 interrupt controller where the IRQ handler mask check does not correctly apply the select variable. The fix ensures that the interrupt service routine (ISR) is triggered appropriately for interrupts within the same IRQ group. Please h

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-20 Thread Daniel P . Berrangé
On Wed, Mar 19, 2025 at 02:42:21PM -0500, Corey Minyard wrote: > On Wed, Mar 19, 2025 at 08:21:20PM +0100, Markus Armbruster wrote: > > Corey Minyard writes: > > > > > Is this official coding style? I'm not a big fan of having return > > > statements in the middle of functions, I generally only

Re: [PATCH for-10.1 22/32] vfio: Move vfio_device_list into device.c

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:05AM +0100, Cédric Le Goater wrote: > 'vfio_device_list' is VFIODevice related. Move its definitions into > "device.c". > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH for-10.1 27/32] vfio: Rename VFIODevice related services

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:10AM +0100, Cédric Le Goater wrote: > index > 4fdb74e33c427595a9b0a4d28b2b5a70df951e4e..9000702aed960ccb69ca67ec052f1ebe11ee1919 > 100644 > --- a/hw/vfio/ap.c > +++ b/hw/vfio/ap.c > @@ -117,7 +117,7 @@ static bool vfio_ap_register_irq_notifier(VFIOAPDevice > *vapde

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

2025-03-20 Thread Jörg Rödel
(Excuse my delayed reply, still suffering from some flu or whatever...) On Mon, Mar 17, 2025 at 10:56:04AM +0100, Gerd Hoffman wrote: > Yep. But we have to sort the details. > > (1) How we are going to load kernel + initrd in case the firmware is > igvm? Just update the igvm to also inclu

[PATCH 0/2] rust: Kconfig: factor out Rust vs C impl choice

2025-03-20 Thread Peter Maydell
This patchset fixes a compilation failure if CONFIG_VMAPPLE is enabled in a Rust build, which happens because hw/vmapple/Kconfig didn't have the "pick the Rust PL011 if Rust is enabled" logic in it. Rather than just adding that to yet another PL011-using board model, this patchset refactors how we

Re: [PATCH 1/1] target/loongarch: fix bad shift in check_ps()

2025-03-20 Thread bibo mao
On 2025/3/19 上午9:41, Song Gao wrote: In expression 1ULL << tlb_ps, left shifting by more than 63 bits has undefined behavior. The shift amount, tlb_ps, is as much as 64. check "tlb_ps >=64" to fix. Resolves: Coverity CID 1593475 Fixes: d882c284a3 ("target/loongarch: check tlb_ps") Suggest

Re: [PATCH v5 23/24] hw/uefi: add MAINTAINERS entry

2025-03-20 Thread Philippe Mathieu-Daudé
On 25/2/25 17:30, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1911949526ce..451fc33306dc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2807,6 +2807,12 @@ F: hw/misc/ivshmem-flat.c

Re: [PATCH 02/10] gdbstub: introduce target independent gdb register helper

2025-03-20 Thread Philippe Mathieu-Daudé
Hi Alex, On 19/3/25 19:22, Alex Bennée wrote: The current helper.h functions rely on hard coded assumptions about target endianess to use the tswap macros. We also end up double swapping a bunch of values if the target can run in multiple endianess modes. Avoid this by getting the target to pass

Re: [PATCH 02/10] gdbstub: introduce target independent gdb register helper

2025-03-20 Thread Akihiko Odaki
On 2025/03/20 3:22, Alex Bennée wrote: The current helper.h functions rely on hard coded assumptions about target endianess to use the tswap macros. We also end up double swapping a bunch of values if the target can run in multiple endianess modes. Avoid this by getting the target to pass the end

Re: [PATCH v5 2/6] hw/loongarch/virt: Fix error handling in cpu plug

2025-03-20 Thread bibo mao
On 2025/3/20 下午3:25, Markus Armbruster wrote: bibo mao writes: On 2025/3/20 下午2:16, Markus Armbruster wrote: Bibo Mao writes: In function virt_cpu_plug(), it will send cpu plug message to interrupt controller extioi and ipi irqchip. If there is problem in this function, system should con

Re: [PATCH for-10.1 19/32] vfio: Introduce a new file for VFIODevice definitions

2025-03-20 Thread Cédric Le Goater
On 3/19/25 17:42, John Levon wrote: On Tue, Mar 18, 2025 at 10:54:02AM +0100, Cédric Le Goater wrote: diff --git a/hw/vfio/device.c b/hw/vfio/device.c new file mode 100644 index ..daa5bae59ca9c65ef23aa193d4e63976fcefdde0 --- /dev/null +++ b/hw/vfio/devic

Re: VDPA MAC address problem

2025-03-20 Thread Cindy Lu
Hi Konstantin yes, we have found this kind of issue in this upstream So here is a fix for this problem in kernel https://lore.kernel.org/kvm/caclfguuyny6-1cyabsgs+qtdzo+mkp3o09t_gt-bmm4jgdp...@mail.gmail.com/T/ vdpa: support set mac address from vdpa tool This tool allows the user to change the M

RE: [PATCH for-10.1 09/32] vfio: Introduce a new header file for VFIOIOMMUFD declarations

2025-03-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 09/32] vfio: Introduce a new header file for >VFIOIOMMUFD declarations > >Gather all VFIOIOMMUFD related declarations into "iommufd.h" to >reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > >Signed-off-by:

Re: [PATCH 10/10] target/microblaze: convert gdbstub to new helper

2025-03-20 Thread Philippe Mathieu-Daudé
On 19/3/25 19:22, Alex Bennée wrote: This is a pretty simple conversion which will be trivial to update once TARGET_BIGENDIAN is replaced with a helper function. Signed-off-by: Alex Bennée --- target/microblaze/gdbstub.c | 44 ++--- 1 file changed, 17 insertio

Re: [PATCH v5 0/6] target/loongarch: Fix some issues reported from coccinelle

2025-03-20 Thread bibo mao
On 2025/3/20 下午3:01, Markus Armbruster wrote: Bibo Mao writes: This patch set solves errors reported by coccinelle tool with commands: spatch --sp-file scripts/coccinelle/*.cocci --dir target/loongarch/ spatch --sp-file scripts/coccinelle/*.cocci --dir hw/loongarch/ The main problem

Re: [PATCH v5 2/6] hw/loongarch/virt: Fix error handling in cpu plug

2025-03-20 Thread Markus Armbruster
bibo mao writes: On 2025/3/20 下午2:16, Markus Armbruster wrote: >> Bibo Mao writes: >> >>> In function virt_cpu_plug(), it will send cpu plug message to interrupt >>> controller extioi and ipi irqchip. If there is problem in this function, >>> system should continue to run and keep state the sam

[PATCH] virtio-gpu-virgl: fix a bug in context create

2025-03-20 Thread liweishi
From: Weishi Li When VIRGL_VERSION_MAJOR<1, virtio_gpu_context_init_enabled will always return false, causing virgl_cmd_context_create to always return error. Therefore, it is necessary to also include the virtio_gpu_context_init_enabled segment in the VIRGL_VERSION_MAJOR judgment to ensure that

Re: [PATCH 09/10] include/exec: fix assert in size_memop

2025-03-20 Thread Philippe Mathieu-Daudé
On 20/3/25 07:29, Akihiko Odaki wrote: Updating the email address of Juan Quintela according to .mailmap. On 2025/03/20 3:22, Alex Bennée wrote: We can handle larger sized memops now, expand the range of the assert. Fixes: 4b473e0c60 (tcg: Expand MO_SIZE to 3 bits) Signed-off-by: Alex Bennée

Re: [PATCH v2 1/2] util/qemu-sockets: Add support for keep-alive flag to passive sockets

2025-03-20 Thread Vladimir Sementsov-Ogievskiy
On 19.03.25 19:36, Juraj Marcin wrote: From: Juraj Marcin Commit aec21d3175 (qapi: Add InetSocketAddress member keep-alive) introduces the keep-alive flag, which enables the SO_KEEPALIVE socket option, but only on client-side sockets. However, this option is also useful for server-side sockets,

Re: [PATCH v2 2/2] utils/qemu-sockets: Introduce keep-alive-idle-period inet socket option

2025-03-20 Thread Vladimir Sementsov-Ogievskiy
On 19.03.25 19:36, Juraj Marcin wrote: From: Juraj Marcin The default idle period for TCP connection could be even 2 hours. However, in some cases, the application needs to be aware of a connection issue much sooner. This is the case, for example, for postcopy live migration. If there is no tra

Re: [PULL 19/25] rust: pl011: switch to safe chardev operation

2025-03-20 Thread Peter Maydell
On Wed, 19 Mar 2025 at 20:51, Paolo Bonzini wrote: > > On 3/19/25 20:25, Peter Maydell wrote: > > Hi -- this commit seems to have broken use of the PL011 in > > boards/SoCs that directly embed it in their state structs, so > > "qemu-system-arm -M raspi2b -display none" now asserts on startup. > >

[PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static

2025-03-20 Thread Alex Bennée
It's not used outside of the gdbstub code. Signed-off-by: Alex Bennée --- target/ppc/cpu.h | 1 - target/ppc/gdbstub.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 1e833ade04..950bb6e06c 100644 --- a/target/ppc/cpu.h +++ b/ta

Re: [PATCH v2 4/4] docs/firmware: add feature flag for qemu variable store

2025-03-20 Thread Daniel P . Berrangé
On Wed, Mar 19, 2025 at 02:03:09PM +0100, Gerd Hoffmann wrote: > Hi, > > > > > > There is 'stateless' already for 'firmware image in r/o flash'. > > > > > > > > What's the behaviour of UEFI if build with JSON vars support, but > > > > without > > > > QEMU providing any JSON vars backend ? > >

ANN: working on an accelerator for MSHV

2025-03-20 Thread Magnus Kulke
Hi all, We would like to informally announce an effort we started at Microsoft to expose the Microsoft Hypervisor (MSHV) as an alternative accelerator in Qemu on Linux hosts. L1 VMs that have been launched on Azure or HyperV will be able to use a /dev/mshv device to accelerate the operation of L2

Re: [PATCH v2 1/3] virtio: add VM state change cb with return value

2025-03-20 Thread Haoqian He
> 2025年3月19日 22:50,Stefano Garzarella 写道: > > On Fri, Mar 14, 2025 at 06:15:32AM -0400, Haoqian He wrote: >> This patch contains two changes: >> >> 1. Add VM state change cb type VMChangeStateHandlerExt which has return >> value for virtio devices VMChangeStateEntry. When VM state changes, >>

Re: [PATCH v2 2/3] vhost: return failure if stop virtqueue failed in vhost_dev_stop

2025-03-20 Thread Haoqian He
> 2025年3月19日 23:11,Stefano Garzarella 写道: > > On Fri, Mar 14, 2025 at 06:15:33AM -0400, Haoqian He wrote: >> The backend maybe crash when vhost_dev_stop and GET_VRING_BASE >> would fail, we can return failure to indicate the connection >> with the backend is broken. >> >> Signed-off-by: Haoqia

Re: [PATCH v2 3/3] vhost-user: return failure if backend crash when live migration

2025-03-20 Thread Haoqian He
> 2025年3月19日 23:20,Stefano Garzarella 写道: > > On Fri, Mar 14, 2025 at 06:15:34AM -0400, Haoqian He wrote: >> Live migration should be terminated if the backend crashes before >> the migration completes. >> >> Since the vhost device will be stopped when VM is stopped before >> the end of the l

[PATCH] target/ppc: Fix facility interrupt checks for VSX

2025-03-20 Thread Nicholas Piggin
Facility interrupt checks in general should come after the ISA version check, because the facility interrupt and facility type themselves are ISA dependent and should not appear on CPUs where the instruction does not exist at all. This resolves a QEMU crash booting NetBSD/macppc due to qemu: fa

[PATCH 0/3] rust: Fix PL011State size mismatch assert

2025-03-20 Thread Peter Maydell
We have some users of the PL011 struct which embed it directly into their own state structs. This means that the Rust version of the device must have a state struct that is the same size or smaller than the C struct. In commit 9b642097d6b7 ("rust: pl011: switch to safe chardev operation") the Rust

[PATCH 1/3] rust: assertions: add static_assert

2025-03-20 Thread Peter Maydell
From: Paolo Bonzini Add a new assertion that is similar to "const { assert!(...) }" but can be used outside functions and with older versions of Rust. A similar macro is found in Linux, whereas the "static_assertions" crate has a const_assert macro that produces worse error messages. Suggested-

[PATCH 3/3] rust: pl011: Check size of state struct at compile time

2025-03-20 Thread Peter Maydell
The PL011 device's C implementation exposes its PL011State struct to users of the device, and one common usage pattern is to embed that struct into the user's own state struct. (The internals of the struct are technically visible to the C user of the device, but in practice are treated as implemen

[PATCH 2/3] hw/char/pl011: Pad PL011State struct to same size as Rust impl

2025-03-20 Thread Peter Maydell
We have some users of the PL011 struct which embed it directly into their own state structs. This means that the Rust version of the device must have a state struct that is the same size or smaller than the C struct. In commit 9b642097d6b7 ("rust: pl011: switch to safe chardev operation") the Rust

Re: [PATCH v2] rust: assertions: add static_assert

2025-03-20 Thread Peter Maydell
On Thu, 20 Mar 2025 at 11:55, Paolo Bonzini wrote: > > Add a new assertion that is similar to "const { assert!(...) }" but can be > used > outside functions and with older versions of Rust. A similar macro is found > in > Linux, whereas the "static_assertions" crate has a const_assert macro tha

Re: [PATCH v3 3/3] target/riscv/kvm: add missing KVM CSRs

2025-03-20 Thread Andrea Bolognani
On Mon, Mar 03, 2025 at 01:46:53PM +1000, Alistair Francis wrote: > On Mon, Feb 24, 2025 at 10:32 PM Daniel Henrique Barboza > wrote: > > We're missing scounteren and senvcfg CSRs, both already present in the > > KVM UAPI. > > > > Signed-off-by: Daniel Henrique Barboza > > Reviewed-by: Andrew Jo

Re: [PATCH for-10.1 15/32] vfio: Introduce a new header file for helper services

2025-03-20 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:58AM +0100, Cédric Le Goater wrote: > Gather all helper routine declarations into "helpers.h" to reduce > exposure of VFIO internals in "hw/vfio/vfio-common.h". > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon but > +struct vfio_info_cap_header * > +v

Re: [PATCH 09/10] include/exec: fix assert in size_memop

2025-03-20 Thread Akihiko Odaki
Updating the email address of Juan Quintela according to .mailmap. On 2025/03/20 3:22, Alex Bennée wrote: We can handle larger sized memops now, expand the range of the assert. Fixes: 4b473e0c60 (tcg: Expand MO_SIZE to 3 bits) Signed-off-by: Alex Bennée --- include/exec/memop.h | 4 ++-- 1

[PATCH] load_aout: replace bswap_needed with big_endian

2025-03-20 Thread Paolo Bonzini
Targets know whether they are big-endian more than they know if the endianness is different from the host: the former is mostly a constant, at least in machine creation code, while the latter has to be computed with TARGET_BIG_ENDIAN != HOST_BIG_ENDIAN or something like that. load_aout, however, t

Re: [PATCH for-10.1 09/32] vfio: Introduce a new header file for VFIOIOMMUFD declarations

2025-03-20 Thread Cédric Le Goater
On 3/20/25 10:18, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Subject: [PATCH for-10.1 09/32] vfio: Introduce a new header file for VFIOIOMMUFD declarations Gather all VFIOIOMMUFD related declarations into "iommufd.h" to reduce exposure of VFIO internals in "hw/v

Re: [PATCH v2] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Greg Kurz
On Thu, 20 Mar 2025 13:16:20 +0100 Christian Schoenebeck wrote: > According to 'man 2 close' errors returned by close() should only be used > for either diagnostic purposes or for catching data loss due to a previous > write error, as an error result of close() usually indicates a deferred > erro

Re: [PATCH v3 3/3] target/riscv/kvm: add missing KVM CSRs

2025-03-20 Thread Daniel Henrique Barboza
On 3/20/25 11:25 AM, Andrea Bolognani wrote: On Mon, Mar 03, 2025 at 01:46:53PM +1000, Alistair Francis wrote: On Mon, Feb 24, 2025 at 10:32 PM Daniel Henrique Barboza wrote: We're missing scounteren and senvcfg CSRs, both already present in the KVM UAPI. Signed-off-by: Daniel Henrique Ba

Re: [PATCH 1/2] migration: Add some documentation for multifd

2025-03-20 Thread Fabiano Rosas
Prasad Pandit writes: > Hello Fabiano, > > * First big thank you for starting/writing this document. It is a > great resource. > > On Fri, 7 Mar 2025 at 19:13, Fabiano Rosas wrote: >> +++ b/docs/devel/migration/multifd.rst >> @@ -0,0 +1,254 @@ >> +Multifd >> +Multifd is the name given for the mi

[PULL 2/3] docs/system: Add entry for LoongArch system

2025-03-20 Thread Bibo Mao
Add index entry for LoongArch system and do some small modification with LoongArch document with rst syntax. Signed-off-by: Bibo Mao Reviewed-by: Song Gao --- docs/system/loongarch/virt.rst | 31 ++- docs/system/target-loongarch.rst | 19 +++ docs/

[PULL 1/3] host/include/loongarch64: Fix inline assembly compatibility with Clang

2025-03-20 Thread Bibo Mao
From: Yao Zi Clang on LoongArch only accepts fp register names in the dollar-prefixed form, while GCC allows omitting the dollar. Change registers in ASM clobbers to the dollar-prefixed form to make user emulators buildable with Clang on loongarch64. No functional change invovled. Cc: qemu-sta..

[PULL 0/3] loongarch-to-apply queue

2025-03-20 Thread Bibo Mao
The following changes since commit 1dae461a913f9da88df05de6e2020d3134356f2e: Update version for v10.0.0-rc0 release (2025-03-18 10:18:14 -0400) are available in the Git repository at: https://gitlab.com/bibo-mao/qemu.git tags/pull-loongarch-20250321 for you to fetch changes up to b8d5503a3e

[PATCH v2 14/30] exec/cpu-all: remove cpu include

2025-03-20 Thread Pierrick Bouvier
Now we made sure important defines are included using their direct path, we can remove cpu.h from cpu-all.h. Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 2 -- accel/tcg/cpu-exec.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/cpu-all.h b/inc

[PATCH v2 00/30] single-binary: start make hw/arm/ common

2025-03-20 Thread Pierrick Bouvier
This series focuses on removing compilation units duplication in hw/arm. We start with this architecture because it should not be too hard to transform it, and should give us some good hints on the difficulties we'll meet later. We first start by making changes in global headers to be able to not

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

2025-03-20 Thread Ani Sinha
On Thu, Mar 20, 2025 at 7:24 PM Alexander Graf wrote: > > Hey Gerd, > > On 18.03.25 12:11, Gerd Hoffman wrote: > >Hi, > > > >> Maybe not from the user's point of view, but surely for the vmfwupdate > >> interface design and for the launch measurement calculations. > >> > >> When using igvm par

Re: [PATCH 05/10] target/ppc: expand comment on FP/VMX/VSX access functions

2025-03-20 Thread Pierrick Bouvier
On 3/19/25 11:22, Alex Bennée wrote: Mainly as an aid to myself getting confused too many bswaps deep into the code. Signed-off-by: Alex Bennée --- target/ppc/cpu.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index efab54a068.

Re: [PATCH 02/10] gdbstub: introduce target independent gdb register helper

2025-03-20 Thread Pierrick Bouvier
On 3/19/25 11:22, Alex Bennée wrote: The current helper.h functions rely on hard coded assumptions about target endianess to use the tswap macros. We also end up double swapping a bunch of values if the target can run in multiple endianess modes. Avoid this by getting the target to pass the endia

Re: [PATCH 02/10] gdbstub: introduce target independent gdb register helper

2025-03-20 Thread Pierrick Bouvier
On 3/20/25 12:30, Pierrick Bouvier wrote: On 3/19/25 11:22, Alex Bennée wrote: The current helper.h functions rely on hard coded assumptions about target endianess to use the tswap macros. We also end up double swapping a bunch of values if the target can run in multiple endianess modes. Avoid t

Re: [PATCH 00/10] gdbstub: conversion to runtime endianess helpers

2025-03-20 Thread Pierrick Bouvier
On 3/19/25 11:22, Alex Bennée wrote: The aim of this work is to get rid of the endian aware helpers in gdbstub/helpers.h which due to their use of tswap() mean target gdbstubs need to be built multiple times. While this series doesn't actually build each stub once it introduces a new helper - gdb

Re: Best practice for issuing blocking calls in response to an event

2025-03-20 Thread Stefan Hajnoczi
On Thu, Mar 20, 2025 at 12:34 PM Miles Glenn wrote: > > Hello, > > I am attempting to simulate a system with multiple CPU > architectures. To do this I am starting a unique QEMU process for each > CPU architecture that is needed. I'm also developing some QEMU code > that aids in transporting MMIO

Re: Raspberry Pi 3B energy consumption

2025-03-20 Thread Peter Maydell
On Thu, 20 Mar 2025 at 20:09, Peter Maydell wrote: > If you need WFE to work, that's certainly feasible and something it would > be nice to see, but potentially quite a bit of work in the guts of QEMU's > arm emulation. (Basically going to sleep on WFE is easy but then making > sure that all the e

RE: [PATCH 22/39] target/hexagon: Implement setprio, resched

2025-03-20 Thread Sid Manning
> -Original Message- > From: ltaylorsimp...@gmail.com > Sent: Thursday, March 20, 2025 2:45 PM > To: 'Brian Cain' ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; Matheus Bernardino > (QUIC) ; a...@rev.ng; a...@rev.ng; Marco > Liebel (QUIC) ; alex.ben...@lin

Re: [PATCH 04/10] target/arm: convert 64 bit gdbstub to new helper

2025-03-20 Thread Pierrick Bouvier
On 3/19/25 11:22, Alex Bennée wrote: For some of the helpers we need a temporary variable to copy from although we could add some helpers to return pointers into env in those cases if we wanted to. Signed-off-by: Alex Bennée --- target/arm/gdbstub64.c | 53 ++--

RE: [PATCH 28/38] target/hexagon: Initialize htid, modectl regs

2025-03-20 Thread Sid Manning
> -Original Message- > From: Richard Henderson > Sent: Thursday, March 20, 2025 10:34 AM > To: Sid Manning ; ltaylorsimp...@gmail.com; > 'Philippe Mathieu-Daudé' ; 'Brian Cain' > ; qemu-devel@nongnu.org > Cc: Matheus Bernardino (QUIC) ; > a...@rev.ng; a...@rev.ng; Marco Liebel (QUIC) > ;

Re: [PATCH] contrib/plugins: Install plugins to moddir

2025-03-20 Thread Alex Bennée
Christoph Müllner writes: > On Mon, Mar 3, 2025 at 11:24 AM 汪鹏程 wrote: >> >> What about plugins under `tests/tcg/plugins/`? > > It feels a bit odd to install something from the tests directory. > If certain plugins in tests/tcg/plugins are of general use (not just > for testing) then it might be

Re: [PATCH v3] QIOChannelSocket: Flush zerocopy socket error queue on sendmsg failure due to ENOBUF

2025-03-20 Thread Manish
Hi Daniel, Peter, Please let me know if this latest patch looks good? On 17/03/25 7:22 am, Manish Mishra wrote: We allocate extra metadata SKBs in case of a zerocopy send. This metadata memory is accounted for in the OPTMEM limit. If there is any error while sending zerocopy packets or if zero

[PULL 01/12] ppc/spapr: Fix RTAS stopped state

2025-03-20 Thread Nicholas Piggin
This change takes the CPUPPCState 'quiesced' field added for powernv hardware CPU core controls (used to stop and start cores), and extends it to spapr to model the "RTAS stopped" state. This prevents the schedulers attempting to run stopped CPUs unexpectedly, which can cause hangs and possibly oth

[PULL 04/12] ppc/xive2: Fix logical / bitwise comparison typo

2025-03-20 Thread Nicholas Piggin
The comparison as written is always false (perhaps confusingly, because the functions/macros are not really booleans but return 0 or the tested bit value). Change to use logical-and. Resolves: Coverity CID 1593721 Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/xive2.c

[PULL 02/12] ppc/xive: Fix typo in crowd block level calculation

2025-03-20 Thread Nicholas Piggin
I introduced this bug when "tidying" the original patch, not Frederic. Paper bag for me. Fixes: 9cb7f6ebed60 ("ppc/xive2: Support group-matching when looking for target") Signed-off-by: Nicholas Piggin --- hw/intc/xive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/int

[PULL 05/12] ppc/spapr: Fix possible pa_features memory overflow

2025-03-20 Thread Nicholas Piggin
Coverity reports a possible memory overflow in spapr_dt_pa_features(). This should not be a true bug since DAWR1 cap is only be true for CPU_POWERPC_LOGICAL_3_10. Add an assertion to ensure any bug there is caught. Resolves: Coverity CID 1593722 Fixes: 5f361ea187ba ("ppc: spapr: Enable 2nd DAWR on

[PULL 12/12] target/ppc: Fix e200 duplicate SPRs

2025-03-20 Thread Nicholas Piggin
DSRR0/1 registers are in the BookE ISA not e200 specific, so remove the duplicate e200 register definitions. Cc: Roman Kapl Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2768 Fixes: 0e3bf4890906 ("ppc: add DBCR based debugging") Signed-off-by: Nicholas Piggin

Re: [PATCH 1/1] hw/intc/aspeed: Fix IRQ handler mask check

2025-03-20 Thread Cédric Le Goater
Hello Steven, On 3/21/25 03:54, Steven Lee wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Sent: Thursday, March 20, 2025 11:29 PM To: Steven Lee ; Peter Maydell ; Troy Lee ; Jamin Lin ; Andrew Jeffery ; Joel Stanley ; open list:ASPEED BMCs ; open list:All patches CC here

[PULL 03/12] pnv/xive: Fix possible undefined shift error in group size calculation

2025-03-20 Thread Nicholas Piggin
Coverity discovered a potential shift overflow in group size calculation in the case of a guest error. Add checks and logs to ensure a issues are caught. Make the group and crowd error checking code more similar to one another while here. Resolves: Coverity CID 1593724 Fixes: 9cb7f6ebed60 ("ppc/x

Re: [PATCH for-10.1 v9 0/9] virtio-net: add support for SR-IOV emulation

2025-03-20 Thread Yui Washizu
I tested the following features with this patch series, and there were not  issues: - Creation and deletion of VFs - Communication with an external machine through VFs Thank you. Yui On 2025/03/14 15:14, Akihiko Odaki wrote: Based-on:<20250104-reuse-v18-0-c349eafd8...@daynix.com> ("[PATC

[PULL 08/12] ppc/amigaone: Check blk_pwrite return value

2025-03-20 Thread Nicholas Piggin
From: BALATON Zoltan Coverity reported that return value of blk_pwrite() maybe should not be ignored. We can't do much if this happens other than report an error but let's do that to silence this report. Resolves: Coverity CID 1593725 Signed-off-by: BALATON Zoltan Reviewed-by: Nicholas Piggin

[PATCH v2] rust: assertions: add static_assert

2025-03-20 Thread Paolo Bonzini
Add a new assertion that is similar to "const { assert!(...) }" but can be used outside functions and with older versions of Rust. A similar macro is found in Linux, whereas the "static_assertions" crate has a const_assert macro that produces worse error messages. Suggested-by: Peter Maydell Sup

Re: [PATCH for-10.1 30/32] vfio: Rename VFIO dirty tracking services

2025-03-20 Thread Avihai Horon
On 20/03/2025 13:56, Joao Martins wrote: External email: Use caution opening links or attachments On 20/03/2025 11:45, Avihai Horon wrote: On 20/03/2025 13:18, Joao Martins wrote: External email: Use caution opening links or attachments On 20/03/2025 11:13, Avihai Horon wrote: On 19/03/2

[PATCH] target/ppc: Fix e200 duplicate SPRs

2025-03-20 Thread Nicholas Piggin
DSRR0/1 registers are in the BookE ISA not e200 specific, so remove the duplicate e200 register definitions. Cc: Author: Roman Kapl Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2768 Fixes: 0e3bf4890906 ("ppc: add DBCR based debugging") Signed-off-by: Nicholas Piggin --- target/ppc/cp

Re: [PATCH for-10.1 31/32] vfio: Introduce vfio_dirty_tracking_un/register() routines

2025-03-20 Thread Joao Martins
On 19/03/2025 13:24, Joao Martins wrote: > On 18/03/2025 09:54, Cédric Le Goater wrote: >> This hides the MemoryListener implementation and makes the code common >> to both IOMMU backends, legacy and IOMMUFD. >> >> Signed-off-by: Cédric Le Goater > > Reviewed-by: Joao Martins > After discussin

Re: [PATCH 3/3] rust: pl011: Check size of state struct at compile time

2025-03-20 Thread Zhao Liu
> -use std::{ffi::CStr, ptr::addr_of_mut}; > +use std::{ffi::CStr, mem, ptr::addr_of_mut}; maybe mem::size_of (since there're 2 use cases :-))? > > use qemu_api::{ > +bindings, > chardev::{CharBackend, Chardev, Event}, > +static_assert, This one looks like it breaks the alphabet

Re: [PATCH 1/1] hw/intc/aspeed: Fix IRQ handler mask check

2025-03-20 Thread Cédric Le Goater
Hello Steven, On 3/20/25 10:25, Steven Lee wrote: Updated the IRQ handler mask check to AND with select variable. This ensures that the interrupt service routine is correctly triggered for the interrupts within the same irq group. For example, both `eth0` and the debug UART are handled in `GICI

Re: [PATCH 28/38] target/hexagon: Initialize htid, modectl regs

2025-03-20 Thread Richard Henderson
On 3/19/25 09:08, Sid Manning wrote: -Original Message- From: Richard Henderson Sent: Thursday, March 13, 2025 2:07 PM To: ltaylorsimp...@gmail.com; 'Philippe Mathieu-Daudé' ; 'Brian Cain' ; qemu- de...@nongnu.org Cc: Matheus Bernardino (QUIC) ; a...@rev.ng; a...@rev.ng; Marco Liebel

Re: [PATCH v2 06/42] include/exec: Split out cpu-mmu-index.h

2025-03-20 Thread Pierrick Bouvier
On 3/20/25 07:58, Richard Henderson wrote: On 3/19/25 10:16, Pierrick Bouvier wrote: If I understand correctly, this is simply an (arbitrary) choice related to each target architecture implemented in QEMU, and it does not match any property of a *real* cpu. Is that correct? Correct. In oth

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Christian Schoenebeck
On Wednesday, March 19, 2025 7:52:51 PM CET Greg Kurz wrote: > On Wed, 19 Mar 2025 13:14:27 +0100 > Christian Schoenebeck wrote: > > > On Wednesday, March 19, 2025 11:08:58 AM CET Christian Schoenebeck wrote: > > > According to 'man 2 close' errors returned by close() should only be used > > > fo

Re: [PATCH v3 01/14] arm/cpu: Add sysreg definitions in cpu-sysregs.h

2025-03-20 Thread Sebastian Ott
On Tue, 11 Mar 2025, Cornelia Huck wrote: +++ b/target/arm/cpu.h [...] +/* REG is ID_XXX */ +#define FIELD_DP64_IDREG(ISAR, REG, FIELD, VALUE) \ +({ \ +ARMISARegisters *i_ = (ISAR);

Re: [PATCH v3 00/14] arm: rework id register storage

2025-03-20 Thread Sebastian Ott
On Tue, 11 Mar 2025, Cornelia Huck wrote: Yet another update of the id register series, less changes this time around. Changed from v2: - changed generation of the various register defines via the "DEF" magic suggested by Richard - some kvm-only code moved to kvm.c; some code potentially useful

Re: [PATCH 1/2] migration: Add some documentation for multifd

2025-03-20 Thread Prasad Pandit
On Tue, 11 Mar 2025 at 00:59, Fabiano Rosas wrote: > Peter Xu writes: > > To me, this is a fairly important question to ask. Fundamentally, the very > > initial question is why do we need periodic flush and sync at all. It's > > because we want to make sure new version of pages to land later th

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-20 Thread Greg Kurz
On Thu, 20 Mar 2025 10:48:11 +0100 Christian Schoenebeck wrote: > On Wednesday, March 19, 2025 7:52:51 PM CET Greg Kurz wrote: > > On Wed, 19 Mar 2025 13:14:27 +0100 > > Christian Schoenebeck wrote: > > > > > On Wednesday, March 19, 2025 11:08:58 AM CET Christian Schoenebeck wrote: > > > > Acco

Re: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking definitions and declarations

2025-03-20 Thread Joao Martins
On 20/03/2025 09:52, Duan, Zhenzhong wrote: >> -Original Message- >> From: Cédric Le Goater >> Subject: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking >> definitions and declarations >> >> File "common.c" has been emptied of most of its definitions by the >> previous c

Re: [PATCH 1/2] migration: Add some documentation for multifd

2025-03-20 Thread Prasad Pandit
Hello Fabiano, * First big thank you for starting/writing this document. It is a great resource. On Fri, 7 Mar 2025 at 19:13, Fabiano Rosas wrote: > +++ b/docs/devel/migration/multifd.rst > @@ -0,0 +1,254 @@ > +Multifd > +Multifd is the name given for the migration capability that enables > +dat

Re: [PATCH] load_aout: replace bswap_needed with big_endian

2025-03-20 Thread Philippe Mathieu-Daudé
On 20/3/25 13:43, Paolo Bonzini wrote: Targets know whether they are big-endian more than they know if the endianness is different from the host: the former is mostly a constant, at least in machine creation code, while the latter has to be computed with TARGET_BIG_ENDIAN != HOST_BIG_ENDIAN or so

  1   2   >