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

2025-02-04 Thread Cédric Le Goater
On 2/4/25 07:09, Jamin Lin wrote: QEMU supports GICv3 Non-maskable Interrupt, adds to support Non-maskable Interrupt for AST2700. Reference: https://github.com/qemu/qemu/commit/b36a32ead Signed-off-by: Jamin Lin Applied to aspeed-next. Thanks, C. --- hw/arm/aspeed_ast27x0.c | 4

Re: [PATCH 0/5] tests/functional: Update Aspeed OpenBMC images (resend)

2025-02-04 Thread Cédric Le Goater
On 1/29/25 08:18, Cédric Le Goater wrote: Hello, This series updates the OpenBMC firmware images to the latest version for existing tests and also adds 2 new tests for Aspeed machines which were not tested before : witherspoon and bletchley. Thanks, C. Cédric Le Goater (5): tests/functiona

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

2025-02-04 Thread Thomas Huth
On 04/02/2025 21.09, 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:

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

2025-02-04 Thread Jamin Lin
Hi Andrew, > From: Andrew Jeffery > Sent: Wednesday, February 5, 2025 11:51 AM > To: Jamin Lin ; Cédric Le Goater ; > Peter Maydell ; Steven Lee > ; Troy Lee ; Joel Stanley > ; open list:ASPEED BMCs ; open > list:All patches CC here > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PATCH v1 12/18

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

2025-02-04 Thread Thomas Huth
On 04/02/2025 21.09, 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 05/12] meson: Disallow 64-bit on 32-bit Xen emulation

2025-02-04 Thread Thomas Huth
On 04/02/2025 22.53, Richard Henderson wrote: 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(-) Reviewed-by: Thomas Huth

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

2025-02-04 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > 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/

Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP

2025-02-04 Thread Markus Armbruster
Eric Blake writes: > Although defaulting the handshake limit to 10 seconds was a nice QoI > change to weed out intentionally slow clients, it can interfere with > integration testing done with manual NBD_OPT commands over 'nbdsh > --opt-mode'. Expose a QMP knob 'handshake-max-secs' to allow the

Re: [PATCH v3 10/12] meson: Disallow 64-bit on 32-bit emulation

2025-02-04 Thread Thomas Huth
On 04/02/2025 22.53, Richard Henderson wrote: For system mode, we can rarely support the amount of RAM that the guest requires. TCG emulation is restricted to round-robin mode, which solves many of the atomicity issues, but not those associated with virtio. In any case, round-robin does nothing

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

2025-02-04 Thread Thomas Huth
On 04/02/2025 22.53, Richard Henderson wrote: 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 insertio

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

2025-02-04 Thread Thomas Huth
On 04/02/2025 22.53, Richard Henderson wrote: 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(-) Reviewed-by: Thomas Huth

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

2025-02-04 Thread Gavin Shan
On 2/5/25 2:19 PM, Matthew R. Ochs wrote: 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 amou

Re: [PATCH] hw/cxl: Support aborting background commands

2025-02-04 Thread Davidlohr Bueso
On Mon, 03 Feb 2025, Jonathan Cameron wrote: On Tue, 22 Oct 2024 18:00:30 +0100 Jonathan Cameron wrote: On Mon, 21 Oct 2024 20:23:46 -0700 Davidlohr Bueso wrote: > On Tue, 27 Aug 2024, Jonathan Cameron wrote:\n > >No comments inline and LGTM. I'll queue it on my tree and push > >that out on

[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

[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 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 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 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 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 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 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 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 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

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 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

[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 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 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

Re: [PATCH] hw/i386/amd_iommu: Allow migration

2025-02-04 Thread Suthikulpanit, Suravee
On 11/29/2024 12:14 AM, Joao Martins wrote: On 21/11/2024 11:42, Joao Martins wrote:> On 20/11/2024 07:31, Suravee Suthikulpanit wrote: Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Sig

Re: [PATCH] hw/i386/amd_iommu: Allow migration

2025-02-04 Thread Suthikulpanit, Suravee
On 11/21/2024 6:42 PM, Joao Martins wrote: On 20/11/2024 07:31, Suravee Suthikulpanit wrote: Add migration support for AMD IOMMU model by saving necessary AMDVIState parameters for MMIO registers, device table, command buffer, and event buffers. Signed-off-by: Suravee Suthikulpanit --- hw/

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

2025-02-04 Thread Anton Johansson via
On 04/02/25, Philippe Mathieu-Daudé wrote: > 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 a

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

2025-02-04 Thread Nicolin Chen
On Tue, Feb 04, 2025 at 06:49:15PM +0100, Eric Auger wrote: > > In summary, we will have the following series: > > 1) HWPT uAPI patches in backends/iommufd.c (Zhenzhong or Shameer) > > > > https://lore.kernel.org/qemu-devel/sj0pr11mb6744943702eb5798ec9b3b9992...@sj0pr11mb6744.namprd11.prod.outl

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

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

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

2025-02-04 Thread Richard Henderson
For system mode, we can rarely support the amount of RAM that the guest requires. TCG emulation is restricted to round-robin mode, which solves many of the atomicity issues, but not those associated with virtio. In any case, round-robin does nothing to help the speed of emulation. For user mode,

[PATCH 3/6] artist: Allow disabling artist on command line

2025-02-04 Thread deller
From: Helge Deller Allow users to disable the artist graphic card on the command line with the option "-global artist.disable=true". This change allows to use other graphic cards when using Linux, e.g. by adding "-device ati-vga". Signed-off-by: Helge Deller --- hw/display/artist.c | 9 ++-

[PATCH 2/6] hw/hppa: Wire up Diva GSP card

2025-02-04 Thread deller
From: Helge Deller Until now we used a standard serial-pci device to emulate a HP serial console. This worked nicely with 32-bit Linux and 32-bit HP-UX, but 64-bit HP-UX crashes with it and expects either a Diva GSP card, or a real 64-bit capable PCI graphic card (which we don't have yet). In or

[PATCH 6/6] target/hppa: Update SeaBIOS-hppa

2025-02-04 Thread deller
From: Helge Deller Update to lastest SeaBIOS-hppa which sets up the LMMIO range for the internal artist graphic card. Signed-off-by: Helge Deller --- roms/seabios-hppa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/seabios-hppa b/roms/seabios-hppa index 1c516b4813..33

[PATCH 0/6] HPPA graphics and serial console enhancements

2025-02-04 Thread deller
From: Helge Deller A small series of patches which enhances the graphics output on 64-bit hppa machines. Allows to disable the artist graphic card and introduces drivers for the Diva GSP (remote management) cards which are used in later 64-bit machines and which we now use for serial console outp

[PATCH 5/6] hw/pci-host/astro: Add LMMIO range support

2025-02-04 Thread deller
From: Helge Deller Each Astro on 64-bit machines supports up to four LMMIO regions. Those regions are used by graphic cards and other PCI devices which need to map huge memory areas. The LMMIO regions are configured and set up by SeaBIOS-hppa and then used as-is by the operating systems (Linux, H

[PATCH 1/6] hw/char: Add emulation of Diva GSP PCI management boards

2025-02-04 Thread deller
From: Helge Deller The Diva GSP ("Guardian Service Processor") PCI boards are Remote Management cards for PA-RISC machines. They come with built-in 16550A UARTs for serial consoles and modem functionalities, as well as a mailbox-like memory area for hardware auto-reboot functionality. Latest ge

[PATCH 4/6] hw/hppa: Avoid creation of artist if disabled on command line

2025-02-04 Thread deller
From: Helge Deller Do not create the artist graphic card if the user disabled it with "-global artist.disable=true" on the command line. Signed-off-by: Helge Deller --- hw/hppa/machine.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa

[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

[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 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 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 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/

[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 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 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 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 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:

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

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

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

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: [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 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-

[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: [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

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

[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

[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 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 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 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 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 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 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 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 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 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 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 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

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

[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 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 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 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 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 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 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 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 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 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 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 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

  1   2   3   4   >