Re: [PATCH] qemu-options: Deprecate -old-param command line option

2025-02-04 Thread Daniel P . Berrangé
On Mon, Jan 27, 2025 at 12:31:13PM +, Peter Maydell wrote: > The '-old-param' command line option is specific to Arm targets; it > is very briefly documented as "old param mode". What this option > actually does is change the behaviour when directly booting a guest > kernel, so that command li

Re: [PATCH v7 3/6] accel/kvm: Report the loss of a large memory page

2025-02-04 Thread Peter Xu
On Sat, Feb 01, 2025 at 09:57:23AM +, “William Roche wrote: > From: William Roche > > In case of a large page impacted by a memory error, provide an > information about the impacted large page before the memory > error injection message. > > This message would also appear on ras enabled ARM

[RFC PATCH v2 5/5] s390: implementing CHSC SEI for AP config change

2025-02-04 Thread Rorie Reyes
Handle interception of the CHSC SEI instruction for requests indicating the guest's AP configuration has changed. Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak Tested-by: Anthony Krowiak --- target/s390x/ioinst.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff

[RFC PATCH v2 0/5] Report vfio-ap configuration changes

2025-02-04 Thread Rorie Reyes
Changelog: v2: - removed warnings that weren't needed - added unregister function - removed whitelines - changed variable names for consistency - removed rc variable and returning 1 or 0 outright - reversed logics for if statements - using g_free() instead of free() - replaced hardcoded numeric va

[RFC PATCH v2 3/5] hw/vfio/ap: store object indicating AP config changed in a queue

2025-02-04 Thread Rorie Reyes
Creates an object indicating that an AP configuration change event has been received and stores it in a queue. These objects will later be used to store event information for an AP configuration change when the CHSC instruction is intercepted. Signed-off-by: Rorie Reyes --- hw/vfio/ap.c | 14 +++

Re: [PATCH v7 2/6] system/physmem: poisoned memory discard on reboot

2025-02-04 Thread Peter Xu
On Sat, Feb 01, 2025 at 09:57:22AM +, “William Roche wrote: > From: William Roche > > Repair poisoned memory location(s), calling ram_block_discard_range(): > punching a hole in the backend file when necessary and regenerating > a usable memory. > If the kernel doesn't support the madvise cal

[RFC PATCH v2 2/5] hw/vfio/ap: notification handler for AP config changed event

2025-02-04 Thread Rorie Reyes
Register an event notifier handler to process AP configuration change events by queuing the event and generating a CRW to let the guest know its AP configuration has changed Signed-off-by: Rorie Reyes --- hw/vfio/ap.c | 29 + 1 file changed, 29 insertions(+) diff --g

[RFC PATCH v2 1/5] linux-headers: NOTFORMERGE - placeholder uapi updates for AP config change

2025-02-04 Thread Rorie Reyes
This patch adds enumeration constant VFIO_AP_CFG_CHG_IRQ_INDEX to specify an IRQ index for signaling that a change has been made to the guest's AP configuration. This is a placeholder for QEMU patches that use this value since it is a linux-headers update which includes changes that aren't merged i

[RFC PATCH v2 4/5] hw/vfio/ap: Storing event information for an AP configuration change event

2025-02-04 Thread Rorie Reyes
These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes --- hw/vfio/ap.c | 38 inc

Re: [PATCH v2 12/15] nbd/server: Support inactive nodes

2025-02-04 Thread Kevin Wolf
Am 03.02.2025 um 20:19 hat Stefan Hajnoczi geschrieben: > On Fri, Jan 31, 2025 at 10:50:48AM +0100, Kevin Wolf wrote: > > In order to support running an NBD export on inactive nodes, we must > > make sure to return errors for any operations that aren't allowed on > > inactive nodes. Reads are the o

Re: [PATCH v7 1/6] system/physmem: handle hugetlb correctly in qemu_ram_remap()

2025-02-04 Thread Peter Xu
On Sat, Feb 01, 2025 at 09:57:21AM +, “William Roche wrote: > From: William Roche > > The list of hwpoison pages used to remap the memory on reset > is based on the backend real page size. > To correctly handle hugetlb, we must mmap(MAP_FIXED) a complete > hugetlb page; hugetlb pages cannot b

Re: [PATCH v2] sched_attr: Do not define for glibc >= 2.41

2025-02-04 Thread Peter Maydell
On Fri, 6 Dec 2024 at 16:16, Daniel P. Berrangé wrote: > > ping: this patch hasn't been merged for 9.2.0 afaict, so I > presume we're broken with latest glibc... Whoops, yes, we dropped the ball on this one (and now the new glibc is in Arch Linux, and a user has reported the breakage: https://git

Re: [PATCH v7 4/6] numa: Introduce and use ram_block_notify_remap()

2025-02-04 Thread Peter Xu
On Sat, Feb 01, 2025 at 09:57:24AM +, “William Roche wrote: > From: David Hildenbrand > > Notify registered listeners about the remap at the end of > qemu_ram_remap() so e.g., a memory backend can re-apply its > settings correctly. > > Signed-off-by: David Hildenbrand > Signed-off-by: Willi

Re: [PATCH V1 18/26] vfio/iommufd: define iommufd_cdev_make_hwpt

2025-02-04 Thread Steven Sistare
On 2/4/2025 11:22 AM, Cédric Le Goater wrote: On 1/29/25 15:43, Steve Sistare wrote: Refactor and define iommufd_cdev_make_hwpt, to be called by CPR in a a later patch.  No functional change. Signed-off-by: Steve Sistare ---   hw/vfio/iommufd.c | 69 +---

Re: [PATCH v2 14/14] tcg: Remove TCG_OVERSIZED_GUEST

2025-02-04 Thread Richard Henderson
On 2/3/25 05:59, Alex Bennée wrote: Richard Henderson writes: This is now prohibited in configuration. Signed-off-by: Richard Henderson -#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS Is it worth keeping a compile time assert with a comment so if anyone attempts to hack 32 bit support back

Re: [PATCH v4 0/4] overcommit: introduce mem-lock-onfault

2025-02-04 Thread Daniil Tatianin
On 2/4/25 5:47 PM, Peter Xu wrote: On Tue, Feb 04, 2025 at 11:23:41AM +0300, Daniil Tatianin wrote: On 1/23/25 7:31 PM, Peter Xu wrote: On Thu, Jan 23, 2025 at 04:19:40PM +0300, Daniil Tatianin wrote: Currently, passing mem-lock=on to QEMU causes memory usage to grow by huge amounts: no meml

Re: [PATCH v2 7/8] hw/riscv: Remove all invalid uses of auto_create_sdcard=true

2025-02-04 Thread Thomas Huth
On 04/02/2025 19.07, Philippe Mathieu-Daudé wrote: MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the RISCV machines modified by this commit try to use the IF_SD interface. Signed-off-by

Re: [PATCH v4 19/33] migration: Add save_live_complete_precopy_thread handler

2025-02-04 Thread Maciej S. Szmigiero
On 4.02.2025 18:54, Peter Xu wrote: On Thu, Jan 30, 2025 at 11:08:40AM +0100, Maciej S. Szmigiero wrote: +static int multifd_device_state_save_thread(void *opaque) +{ +struct MultiFDDSSaveThreadData *data = opaque; +int ret; + +ret = data->hdlr(data->idstr, data->instance_id, &send_t

Re: [PATCH v4 09/33] migration: postcopy_ram_listen_thread() needs to take BQL for some calls

2025-02-04 Thread Maciej S. Szmigiero
On 4.02.2025 16:39, Peter Xu wrote: On Tue, Feb 04, 2025 at 03:57:37PM +0100, Maciej S. Szmigiero wrote: The vfio_migration_cleanup() used to just close a migration FD, while RAM might end up calling qemu_ram_msync(), which sounds like something that should be called under BQL. But I am not sur

Re: [PATCH v4 08/33] migration/multifd: Allow premature EOF on TLS incoming channels

2025-02-04 Thread Maciej S. Szmigiero
On 4.02.2025 19:25, Fabiano Rosas wrote: Peter Xu writes: On Tue, Feb 04, 2025 at 03:08:02PM +, Daniel P. Berrangé wrote: On Mon, Feb 03, 2025 at 01:20:01PM -0500, Peter Xu wrote: On Thu, Jan 30, 2025 at 11:08:29AM +0100, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" Multifd

Re: [PATCH 0/2] qemu/timer: Clarify QEMUTimer new/free API

2025-02-04 Thread Philippe Mathieu-Daudé
ping? On 25/1/25 19:24, Philippe Mathieu-Daudé wrote: Update few QEMUTimer docstring and add a sanity check during timer initialization. Noticed trying to understand leaks in QDev Realize -> Unrealize -> Realize transition. Philippe Mathieu-Daudé (2): qemu/timer: Clarify timer_new*() must b

[PATCH v3 08/12] configure: Define TARGET_LONG_BITS in configs/targets/*.mak

2025-02-04 Thread Richard Henderson
Define TARGET_LONG_BITS in each target's configure fragment. Do this without removing the define in target/*/cpu-param.h so that errors are caught like so: In file included from .../src/include/exec/cpu-defs.h:26, from ../src/target/hppa/cpu.h:24, from ../src/linu

[PATCH v3 03/12] plugins: Uninline qemu_plugin_add_opts

2025-02-04 Thread Richard Henderson
No need to expand this function inline. Unexport qemu_plugin_opts to match. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 9 + plugins/loader.c | 7 ++- 2 files changed, 7 insertions(+), 9 deletions(-) diff --gi

[PATCH v3 07/12] gitlab-ci: Replace aarch64 with arm in cross-i686-tci build

2025-02-04 Thread Richard Henderson
Configuration of 64-bit host on 32-bit guest will shortly be denied. Use a 32-bit guest instead. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- .gitlab-ci.d/crossbuilds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d

[PATCH v3 12/12] tcg: Remove TCG_OVERSIZED_GUEST

2025-02-04 Thread Richard Henderson
This is now prohibited in configuration. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/qemu/atomic.h | 18 +++-- include/tcg/oversized-guest.h | 23 -- accel/tcg/cputlb.c | 7 --- accel/tcg/tcg-all.c

[PATCH v3 06/12] meson: Disallow 64-bit on 32-bit HVF/NVMM/WHPX emulation

2025-02-04 Thread Richard Henderson
Require a 64-bit host binary to spawn a 64-bit guest. For HVF this is trivially true because macOS 11 dropped support for 32-bit applications entirely. Signed-off-by: Richard Henderson --- meson.build | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meson.build b/

Re: [PATCH] smbios: make memory device size configurable per Machine

2025-02-04 Thread Philippe Mathieu-Daudé
On 11/7/24 10:42, Igor Mammedov wrote: On Thu, 11 Jul 2024 10:19:27 +0200 Philippe Mathieu-Daudé wrote: Hi Igor, On 11/7/24 09:48, Igor Mammedov wrote: Currently SMBIOS maximum memory device chunk is capped at 16Gb, which is fine for the most cases (QEMU uses it to describe initial RAM (type

[PATCH v3 09/12] target/*: Remove TARGET_LONG_BITS from cpu-param.h

2025-02-04 Thread Richard Henderson
This is now handled by the configs/targets/*.mak fragment. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/alpha/cpu-param.h | 2 -- target/arm/cpu-param.h| 2 -- target/avr/cpu-param.h| 1 -

[PATCH v3 00/12] meson: Deprecate 32-bit host support

2025-02-04 Thread Richard Henderson
v1: 20250128004254.33442-1-richard.hender...@linaro.org v2: 20250203031821.741477-1-richard.hender...@linaro.org For v3, immediately disable 64-on-32 for all accelerators. This eliminates most of the hoops through which v2 jumped. r~ Richard Henderson (12): meson: Drop tcg as a module tcg:

[PATCH v3 02/12] tcg: Move stubs in tcg/perf.h to tcg/perf-stubs.c

2025-02-04 Thread Richard Henderson
These are not called so frequently as to be performance sensitive. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/tcg/perf.h | 23 --- tcg/perf-stubs.c | 26 ++ tcg/meson.build| 2 ++ 3 files cha

[PATCH v3 01/12] meson: Drop tcg as a module

2025-02-04 Thread Richard Henderson
This reverts commit dae0ec159f9 ("accel: build tcg modular"). The attempt was only enabled for x86, only modularized a small portion of tcg, and in more than 3 years there have been no follow-ups to improve the situation. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Reviewed-by: Philippe Ma

[PATCH v3 05/12] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-04 Thread Richard Henderson
Require a 64-bit host binary to spawn a 64-bit guest. Signed-off-by: Richard Henderson --- meson.build | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 5a40a2a629..0ca83135e2 100644 --- a/meson.build +++ b/meson.build @@ -304,9 +304,14

[PATCH v3 04/12] meson: Disallow 64-bit on 32-bit KVM emulation

2025-02-04 Thread Richard Henderson
Require a 64-bit host binary to spawn a 64-bit guest. Signed-off-by: Richard Henderson --- meson.build | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index b72114819b..5a40a2a629 100644 --- a/meson.build +++ b/meson.build @@ -277

[PATCH v3 11/12] meson: Deprecate 32-bit host support

2025-02-04 Thread Richard Henderson
We deprecated i686 system mode support for qemu 8.0. However, to make real cleanups to TCG we need to deprecate all 32-bit hosts. Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- docs/about/deprecated.rst | 7 +++ meson.build | 8 +++

[PATCH] build: Replace meson introspection argument with a builddir

2025-02-04 Thread Joel Granados
eson.build | $(PYTHON) \ + $(MESON) introspect --buildoptions $(BUILD_DIR) | $(PYTHON) \ scripts/meson-buildoptions.py > $@.tmp && mv $@.tmp $@ endif --- base-commit: d922088eb4ba6bc31a99f17b32cf75e59dd306cd change-id: 20250204-jag-fix_meson-43db4d290315 Best regards, -- Joel Granados

Re: [PATCH v2 05/18] hw/arm/fsl-imx8mp: Implement clock tree

2025-02-04 Thread Bernhard Beschow
Am 4. Februar 2025 09:20:59 UTC schrieb Bernhard Beschow : >Fixes quite a few stack traces during the Linux boot process. Also provides the >clocks for devices added later, e.g. enet1. > >Signed-off-by: Bernhard Beschow >--- > MAINTAINERS | 2 + > docs/system/arm/imx8mp-evk

Re: [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-04 Thread Bernhard Beschow
Am 4. Februar 2025 21:25:46 UTC schrieb "Philippe Mathieu-Daudé" : >Hi Bernhard, > >On 27/1/25 10:46, Bernhard Beschow wrote: >> Am 25. Januar 2025 18:13:43 UTC schrieb "Philippe Mathieu-Daudé" >> : >>> Because the legacy Xen backend devices can optionally be plugged on the >>> TYPE_PLATFORM_B

[PATCH v2 1/3] hw/loongarch/virt: Set iocsr address space when CPU is created

2025-02-04 Thread Bibo Mao
There is only one iocsr address space for the whole virt-machine board. When CPU is created, the one of percpu points to that of the board. Here set iocsr address space when CPU is created rather than IPI creation stage. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 2 +- 1 file changed, 1

[PATCH v2 3/3] hw/loongarch/virt: CPU irq line connection improvement

2025-02-04 Thread Bibo Mao
Interrupt controller extioi and ipi connect to CPU with irq line method. With command -smp x, -device la464-loongarch-cpu, smp.cpus is not accurate for all possible CPU objects, possible_cpu_arch_ids() is used. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 60 ++--

[PATCH v2 2/3] hw/loongarch/virt: Remove unused ipistate

2025-02-04 Thread Bibo Mao
Field ipistate in LoongArch CPU object is not used any more, remove it here. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c| 5 - target/loongarch/cpu.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 15022505c7..97c7da4815 100644 --

[PATCH v2 0/3] hw/loongarch/virt: CPU irq line connection improvement

2025-02-04 Thread Bibo Mao
Interrupt controller extioi and ipi connect to multiple CPUs with irq line method. With command -smp x, -device la464-loongarch-cpu, CPU object may be created with cold-plug method. smp.cpus is not accurate for all possible CPU objects, possible_cpu_arch_ids() is used here. --- v1 ... v2: 1. R

Re: [PATCH v1 12/18] hw/arm/aspeed_ast27x0: Support two levels of INTC controllers for AST2700 A1

2025-02-04 Thread Andrew Jeffery
On Tue, 2025-02-04 at 09:43 +, Jamin Lin wrote: > Hi Andrew, > > > -Original Message- > > From: Andrew Jeffery > > Sent: Thursday, January 30, 2025 12:20 PM > > To: Jamin Lin ; Cédric Le Goater ; > > Peter Maydell ; Steven Lee > > ; Troy Lee ; Joel Stanley > > ; open list:ASPEED BMCs

[PATCH 03/11] tcg/arm: Drop addrhi from prepare_host_addr

2025-02-04 Thread Richard Henderson
The guest address will now always be TCG_TYPE_I32. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 63 ++-- 1 file changed, 21 insertions(+), 42 deletions(-) diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index 05bb367a39..25

[PATCH 08/11] plugins: Fix qemu_plugin_read_memory_vaddr parameters

2025-02-04 Thread Richard Henderson
The declaration uses uint64_t for addr. Signed-off-by: Richard Henderson --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plugins/api.c index 4110cfaa23..cf8cdf076a 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -561,7 +561,7 @@ GArray *qem

[PATCH 02/11] tcg: Merge INDEX_op_qemu_*_{a32,a64}_*

2025-02-04 Thread Richard Henderson
Since 64-on-32 is now unsupported, guest addresses always fit in one host register. Drop the replication of opcodes. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 28 ++-- tcg/optimize.c | 21 ++ tcg/tcg-op-ldst.c| 82 +-

[PATCH 01/11] tcg: Drop support for two address registers in gen_ldst

2025-02-04 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tcg-op-ldst.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/tcg/tcg-op-ldst.c b/tcg/tcg-op-ldst.c index 77271e0193..c3e9bf992a 100644 --- a/tcg/tcg-op-ldst.c +++ b/tcg/tcg-op-ldst.c @@ -91,25 +91,11 @@ static M

[PATCH 00/11] tcg: Cleanups after disallowing 64-on-32

2025-02-04 Thread Richard Henderson
This is not complete by any means, but it's a start. r~ Based-on: 20250204215359.1238808-1-richard.hender...@linaro.org ("[PATCH v3 00/12] meson: Deprecate 32-bit host support") Richard Henderson (11): tcg: Drop support for two address registers in gen_ldst tcg: Merge INDEX_op_qemu_*_{a32

[PATCH 04/11] tcg/i386: Drop addrhi from prepare_host_addr

2025-02-04 Thread Richard Henderson
The guest address will now always fit in one register. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 56 ++- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index ca6e8abc

[PATCH 07/11] tcg: Replace addr{lo, hi}_reg with addr_reg in TCGLabelQemuLdst

2025-02-04 Thread Richard Henderson
There is now always only one guest address register. Signed-off-by: Richard Henderson --- tcg/tcg.c| 18 +- tcg/aarch64/tcg-target.c.inc | 4 ++-- tcg/arm/tcg-target.c.inc | 4 ++-- tcg/i386/tcg-target.c.inc| 4 ++-- tcg/loongarch64/

[PATCH 10/11] include/exec: Change vaddr to uintptr_t

2025-02-04 Thread Richard Henderson
Since we no longer support 64-bit guests on 32-bit hosts, we can use a 32-bit type on a 32-bit host. Signed-off-by: Richard Henderson --- include/exec/vaddr.h | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/exec/vaddr.h b/include/exec/vaddr.h index b9

[PATCH 11/11] include/exec: Use uintptr_t in CPUTLBEntry

2025-02-04 Thread Richard Henderson
Since we no longer support 64-bit guests on 32-bit hosts, we can use a 32-bit type on a 32-bit host. This shrinks the size of the structure to 16 bytes on a 32-bit host. Signed-off-by: Richard Henderson --- include/exec/tlb-common.h | 10 +- accel/tcg/cputlb.c | 21

[PATCH 05/11] tcg/mips: Drop addrhi from prepare_host_addr

2025-02-04 Thread Richard Henderson
The guest address will now always fit in one register. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c.inc | 62 ++- 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index b1d512ca

[PATCH 06/11] tcg/ppc: Drop addrhi from prepare_host_addr

2025-02-04 Thread Richard Henderson
The guest address will now always fit in one register. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 75 1 file changed, 23 insertions(+), 52 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 801cb6f3cb

[PATCH 09/11] accel/tcg: Fix tlb_set_page_with_attrs, tlb_set_page

2025-02-04 Thread Richard Henderson
The declarations use vaddr for size. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 17e2251695..75d075d044 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1

[PATCH v2] hw/arm/virt: Support larger highmem MMIO regions

2025-02-04 Thread Matthew R. Ochs
The MMIO region size required to support virtualized environments with large PCI BAR regions can exceed the hardcoded limit configured in QEMU. For example, a VM with multiple NVIDIA Grace-Hopper GPUs passed through requires more MMIO memory than the amount provided by VIRT_HIGH_PCIE_MMIO (currentl

Re: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2025-02-04 Thread Eric Auger
Hi Nicolin, Shameer, On 2/3/25 7:50 PM, Nicolin Chen wrote: > On Fri, Jan 31, 2025 at 05:54:56PM +0100, Eric Auger wrote: >> On 1/9/25 5:45 AM, Nicolin Chen wrote: >>> On Mon, Dec 16, 2024 at 10:01:29AM +, Shameerali Kolothum Thodi wrote: And patches prior to this commit adds that support

Re: [PATCH v4 19/33] migration: Add save_live_complete_precopy_thread handler

2025-02-04 Thread Peter Xu
On Thu, Jan 30, 2025 at 11:08:40AM +0100, Maciej S. Szmigiero wrote: > +static int multifd_device_state_save_thread(void *opaque) > +{ > +struct MultiFDDSSaveThreadData *data = opaque; > +int ret; > + > +ret = data->hdlr(data->idstr, data->instance_id, &send_threads_abort, > +

Re: [PATCH 1/1] Added support for get/set alert configuration commands

2025-02-04 Thread Fan Ni
On Mon, Feb 03, 2025 at 05:14:45PM +0530, Sweta Kumari wrote: > Signed-off-by: Sweta Kumari > Reviewed-by: Alok Rathore > Reviewed-by: Krishna Kanth Reddy Hi Sweta, Since this series only have one patch, you do not need a cover letter. Move the commit comment in the first patch to this one and r

Re: [PATCH v3 7/7] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus

2025-02-04 Thread Thomas Huth
On 04/02/2025 19.29, Philippe Mathieu-Daudé wrote: Using the auto_create_sdcard feature without SD Bus is irrelevant. Signed-off-by: Philippe Mathieu-Daudé --- system/vl.c | 8 1 file changed, 8 insertions(+) diff --git a/system/vl.c b/system/vl.c index 5ff461ea4ca..dd8053e1e79 100

Re: [PATCH v7 6/6] hostmem: Handle remapping of RAM

2025-02-04 Thread David Hildenbrand
On 04.02.25 18:58, Peter Xu wrote: On Tue, Feb 04, 2025 at 06:50:17PM +0100, David Hildenbrand wrote: /* @@ -595,6 +628,7 @@ static const TypeInfo host_memory_backend_info = { .instance_size = sizeof(HostMemoryBackend), .instance_init = host_memory_backend_init, .inst

[PATCH v3 00/16] block: Managing inactive nodes (QSD migration)

2025-02-04 Thread Kevin Wolf
This series adds a mechanism that allows the user or management tool to manually activate and inactivate block nodes instead of fully relying on the automatic management in the migration code. One case where this is needed is for migration with shared storage and devices backed by qemu-storage-dae

[PATCH v3 01/16] block: Add 'active' field to BlockDeviceInfo

2025-02-04 Thread Kevin Wolf
This allows querying from QMP (and also HMP) whether an image is currently active or inactive (in the sense of BDRV_O_INACTIVE). Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- qapi/block-core.json | 6 +- include/b

[PATCH v3 08/16] block: Add blockdev-set-active QMP command

2025-02-04 Thread Kevin Wolf
The system emulator tries to automatically activate and inactivate block nodes at the right point during migration. However, there are still cases where it's necessary that the user can do this manually. Images are only activated on the destination VM of a migration when the VM is actually resumed

[PATCH v3 10/16] block/export: Don't ignore image activation error in blk_exp_add()

2025-02-04 Thread Kevin Wolf
Currently, block exports can't handle inactive images correctly. Incoming write requests would run into assertion failures. Make sure that we return an error when creating an export can't activate the image. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Reviewed-by:

[PATCH v3 06/16] block: Fix crash on block_resize on inactive node

2025-02-04 Thread Kevin Wolf
In order for block_resize to fail gracefully on an inactive node instead of crashing with an assertion failure in bdrv_co_write_req_prepare() (called from bdrv_co_truncate()), we need to check for inactive nodes also when they are attached as a root node and make sure that BLK_PERM_RESIZE isn't amo

[PATCH v3 05/16] block: Don't attach inactive child to active node

2025-02-04 Thread Kevin Wolf
An active node makes unrestricted use of its children and would possibly run into assertion failures when it operates on an inactive child node. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 5 + 1 file changed, 5 inse

[PATCH v3 12/16] block/export: Add option to allow export of inactive nodes

2025-02-04 Thread Kevin Wolf
Add an option in BlockExportOptions to allow creating an export on an inactive node without activating the node. This mode needs to be explicitly supported by the export type (so that it doesn't perform any operations that are forbidden for inactive nodes), so this patch alone doesn't allow this op

[PATCH v3 02/16] block: Allow inactivating already inactive nodes

2025-02-04 Thread Kevin Wolf
What we wanted to catch with the assertion is cases where the recursion finds that a child was inactive before its parent. This should never happen. But if the user tries to inactivate an image that is already inactive, that's harmless and we don't want to fail the assertion. Signed-off-by: Kevin

[PATCH v3 07/16] block: Add option to create inactive nodes

2025-02-04 Thread Kevin Wolf
In QEMU, nodes are automatically created inactive while expecting an incoming migration (i.e. RUN_STATE_INMIGRATE). In qemu-storage-daemon, the notion of runstates doesn't exist. It also wouldn't necessarily make sense to introduce it because a single daemon can serve multiple VMs that can be in di

[PATCH v3 16/16] iotests: Add (NBD-based) tests for inactive nodes

2025-02-04 Thread Kevin Wolf
This tests different types of operations on inactive block nodes (including graph changes, block jobs and NBD exports) to make sure that users manually activating and inactivating nodes doesn't break things. Support for inactive nodes in other export types will have to come with separate test case

[PATCH v3 03/16] block: Inactivate external snapshot overlays when necessary

2025-02-04 Thread Kevin Wolf
Putting an active block node on top of an inactive one is strictly speaking an invalid configuration and the next patch will turn it into a hard error. However, taking a snapshot while disk images are inactive after completing migration has an important use case: After migrating to a file, taking

[PATCH v3 09/16] block: Support inactive nodes in blk_insert_bs()

2025-02-04 Thread Kevin Wolf
Device models have a relatively complex way to set up their block backends, in which blk_attach_dev() sets blk->disable_perm = true. We want to support inactive images in exports, too, so that qemu-storage-daemon can be used with migration. Because they don't use blk_attach_dev(), they need another

[PATCH v3 11/16] block: Drain nodes before inactivating them

2025-02-04 Thread Kevin Wolf
So far the assumption has always been that if we try to inactivate a node, it is already idle. This doesn't hold true any more if we allow inactivating exported nodes because we can't know when new external requests come in. Drain the node around setting BDRV_O_INACTIVE so that requests can't star

[PATCH v3 15/16] iotests: Add qsd-migrate case

2025-02-04 Thread Kevin Wolf
Test that it's possible to migrate a VM that uses an image on shared storage through qemu-storage-daemon. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake --- tests/qemu-iotests/tests/qsd-migrate | 140 +++ tests/qemu-iotests/tests/qsd-migrate.o

[PATCH v3 13/16] nbd/server: Support inactive nodes

2025-02-04 Thread Kevin Wolf
In order to support running an NBD export on inactive nodes, we must make sure to return errors for any operations that aren't allowed on inactive nodes. Reads are the only operation we know we need for inactive images, so to err on the side of caution, return errors for everything else, even if so

[PATCH v3 04/16] migration/block-active: Remove global active flag

2025-02-04 Thread Kevin Wolf
Block devices have an individual active state, a single global flag can't cover this correctly. This becomes more important as we allow users to manually manage which nodes are active or inactive. Now that it's allowed to call bdrv_inactivate_all() even when some nodes are already inactive, we can

Re: [PATCH v2 6/8] hw/arm: Remove all invalid uses of auto_create_sdcard=true

2025-02-04 Thread Philippe Mathieu-Daudé
On 4/2/25 19:44, Thomas Huth wrote: On 04/02/2025 19.07, Philippe Mathieu-Daudé wrote: MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the ARM machines modified by this commit try to use

Re: [PATCH] target/sparc: Fix register selection for the fdtox and fqtox instructions

2025-02-04 Thread Richard Henderson
On 2/4/25 04:43, Git wrote: Thank you Richard for noticing the issue. I have been able to create tests that show the malfunction of the FsTOx instruction as well. I am however not yet able to prove(through tests) the malfunction of the FxTO{s,d,q} instructions. Destination register 32 should

Re: [PATCH V1 16/26] vfio: return mr from vfio_get_xlat_addr

2025-02-04 Thread Steven Sistare
On 2/4/2025 10:47 AM, Cédric Le Goater wrote: + John (for vfio-user) On 1/29/25 15:43, Steve Sistare wrote: Return the memory region that the translated address is found in, for use in a subsequent patch.  No functional change. Keeping a reference on this memory region could be risky. What fo

Re: [PATCH v7 6/6] hostmem: Handle remapping of RAM

2025-02-04 Thread David Hildenbrand
/* @@ -595,6 +628,7 @@ static const TypeInfo host_memory_backend_info = { .instance_size = sizeof(HostMemoryBackend), .instance_init = host_memory_backend_init, .instance_post_init = host_memory_backend_post_init, +.instance_finalize = host_memory_backend_finalize,

Re: [PATCH v2 3/8] hw/boards: Rename no_sdcard -> auto_create_sdcard

2025-02-04 Thread Thomas Huth
On 04/02/2025 19.07, Philippe Mathieu-Daudé wrote: Invert the 'no_sdcard' logic, renaming it as the more explicit "auto_create_sdcard". Machines are supposed to create a SD Card drive when this flag is set. In many cases it doesn't make much sense (as boards don't expose SD Card host controller),

Re: [PATCH v3 5/7] hw/arm: Remove all invalid uses of auto_create_sdcard=true

2025-02-04 Thread Philippe Mathieu-Daudé
On 4/2/25 19:29, Philippe Mathieu-Daudé wrote: MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the ARM machines modified by this commit try to use the IF_SD interface. Signed-off-by: Phil

Re: [PATCH] hw/*/xen*: Prefer QOM cast for XenLegacyDevice

2025-02-04 Thread Philippe Mathieu-Daudé
On 27/1/25 10:41, Bernhard Beschow wrote: Makes the code less sensitive regarding changes in the class hierarchy which will be performed in the next patch. Signed-off-by: Bernhard Beschow --- hw/usb/xen-usb.c| 6 +++--- hw/xen/xen-legacy-backend.c | 2 +- hw/xen/xen_pvdev.c

Re: [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE

2025-02-04 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 27/1/25 10:46, Bernhard Beschow wrote: Am 25. Januar 2025 18:13:43 UTC schrieb "Philippe Mathieu-Daudé" : Because the legacy Xen backend devices can optionally be plugged on the TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE. Remove the implicit TYPE_XENS

[PATCH v3 14/16] iotests: Add filter_qtest()

2025-02-04 Thread Kevin Wolf
The open-coded form of this filter has been copied into enough tests that it's better to move it into iotests.py. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake --- tests/qemu-iotests/iotests.py | 4 tests/qemu-iotests/041

Re: [PATCH v3 10/17] hw/arm/xlnx-zynqmp: Use &error_abort for programming errors

2025-02-04 Thread Philippe Mathieu-Daudé
ping for trivial review? On 8/11/24 16:43, Philippe Mathieu-Daudé wrote: When a property value is static (not provided by QMP or CLI), error shouldn't happen, otherwise it is a programming error. Therefore simplify and use &error_abort as this can't fail. Reported-by: Richard Henderson Signed-

Re: [PATCH] hw/i386/pc: Fix crash that occurs when introspecting TYPE_PC_MACHINE machines

2025-02-04 Thread Philippe Mathieu-Daudé
On 4/2/25 09:57, Thomas Huth wrote: On 29/01/2025 21.04, Michael S. Tsirkin wrote: On Wed, Jan 29, 2025 at 08:00:40AM +0100, Thomas Huth wrote: On 17/01/2025 20.21, Thomas Huth wrote: QEMU currently crashes when you try to inspect the machines based on TYPE_PC_MACHINE for their properties:   

Re: [PATCH v1 1/1] aspeed/soc: Support Non-maskable Interrupt for AST2700

2025-02-04 Thread Philippe Mathieu-Daudé
On 4/2/25 07:09, Jamin Lin via wrote: QEMU supports GICv3 Non-maskable Interrupt, adds to support Non-maskable Interrupt for AST2700. Reference: https://github.com/qemu/qemu/commit/b36a32ead Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daudé

Re: Subject: [PATCH] loader: Add register setting support via cli

2025-02-04 Thread Philippe Mathieu-Daudé
Cc'ing Alex/Pierrick On 31/1/25 01:27, Alistair Francis wrote: On Fri, Jan 10, 2025 at 3:33 PM Sam Price wrote: Yes that is true a boot loader will do more than just set registers. Ill rework the text a bit on the next update. In my case i need to set the r5 register that specifies the memory

[PATCH v4 7/7] hw/boards: Ensure machine setting auto_create_sdcard expose a SD Bus

2025-02-04 Thread Philippe Mathieu-Daudé
Using the auto_create_sdcard feature without SD Bus is irrelevant. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- system/vl.c | 16 1 file changed, 16 insertions(+) diff --git a/system/vl.c b/system/vl.c index 5ff461ea4ca..a904687b57c 100644 --- a/system/vl

[PATCH v4 5/7] hw/arm: Remove all invalid uses of auto_create_sdcard=true

2025-02-04 Thread Philippe Mathieu-Daudé
MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the ARM machines modified by this commit try to use the IF_SD interface. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/aspeed.c

[PATCH v4 2/7] hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF

2025-02-04 Thread Philippe Mathieu-Daudé
Update MachineClass::no_sdcard default implicit AUTO initialization to explicit OFF. This flag is consumed in system/vl.c::qemu_disable_default_devices(). Use this place to assert we don't have anymore AUTO state. In hw/ppc/e500.c we add the ppce500_machine_class_init() method to initialize once a

[PATCH v4 3/7] hw/boards: Rename no_sdcard -> auto_create_sdcard

2025-02-04 Thread Philippe Mathieu-Daudé
Invert the 'no_sdcard' logic, renaming it as the more explicit "auto_create_sdcard". Machines are supposed to create a SD Card drive when this flag is set. In many cases it doesn't make much sense (as boards don't expose SD Card host controller), but this is patch only aims to expose that nonsense;

[PATCH v4 4/7] hw/boards: Remove all invalid uses of auto_create_sdcard=true

2025-02-04 Thread Philippe Mathieu-Daudé
MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. Only the ARM and RISCV targets use such feature: $ git grep -wl IF_SD hw | cut -d/ -f-2 | sort -u hw/arm hw/riscv $ Remove all other uses. Sign

[PATCH v4 1/7] hw/boards: Convert no_sdcard flag to OnOffAuto tri-state

2025-02-04 Thread Philippe Mathieu-Daudé
MachineClass::no_sdcard is initialized as false by default. To catch all uses, convert it to a tri-state, having the current default (false) becoming AUTO. No logical change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/hw/boards.h| 2 +- hw/arm/x

[PATCH v4 6/7] hw/riscv: Remove all invalid uses of auto_create_sdcard=true

2025-02-04 Thread Philippe Mathieu-Daudé
MachineClass::auto_create_sdcard is only useful to automatically create a SD card, attach a IF_SD block drive to it and plug the card onto a SD bus. None of the RISCV machines modified by this commit try to use the IF_SD interface. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth -

[PATCH v4 0/7] hw/boards: Try to make sense of MachineClass::no_sdcard flag

2025-02-04 Thread Philippe Mathieu-Daudé
Invert MachineClass 'no_sdcard' flag logic and rename it to 'create_default_sdcard_drive' to make sense of this default value applied to all machines. We use the OnOffAuto tri-state to catch implicit default values. Then we toggle the logic and remove invalid uses. No logical change intended (excep

Re: [PATCH v4 19/33] migration: Add save_live_complete_precopy_thread handler

2025-02-04 Thread Peter Xu
On Tue, Feb 04, 2025 at 08:32:15PM +0100, Maciej S. Szmigiero wrote: > On 4.02.2025 18:54, Peter Xu wrote: > > On Thu, Jan 30, 2025 at 11:08:40AM +0100, Maciej S. Szmigiero wrote: > > > +static int multifd_device_state_save_thread(void *opaque) > > > +{ > > > +struct MultiFDDSSaveThreadData *da

Re: [PATCH v7 6/6] hostmem: Handle remapping of RAM

2025-02-04 Thread Peter Xu
On Tue, Feb 04, 2025 at 07:55:52PM +0100, David Hildenbrand wrote: > Ah, and now I remember where these 3 patches originate from: virtio-mem > handling. > > For virtio-mem I want to register also a remap handler, for example, to > perform the custom preallocation handling. > > So there will be at

Re: [RFC PATCH v12 qemu 2/2] qtest/cxl: Add aarch64 virt test for CXL

2025-02-04 Thread Itaru Kitayama
> On Feb 4, 2025, at 18:29, Jonathan Cameron > wrote: > > On Tue, 4 Feb 2025 14:16:19 +0900 > Itaru Kitayama wrote: > >> Jonathan, >> >>> On Feb 4, 2025, at 2:30, Jonathan Cameron >>> wrote: >>> >>> Add a single complex case for aarch64 virt machine. >>> Given existing much more compreh

<    1   2   3   4   >