]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
6 weeks agohpet: switch to fine-grained device locking
Igor Mammedov [Thu, 14 Aug 2025 16:05:55 +0000 (18:05 +0200)] 
hpet: switch to fine-grained device locking

as a step towards lock-less HPET counter read,
use per device locking instead of BQL.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20250814160600.2327672-4-imammedo@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agoacpi: mark PMTIMER as unlocked
Igor Mammedov [Thu, 14 Aug 2025 16:05:54 +0000 (18:05 +0200)] 
acpi: mark PMTIMER as unlocked

Reading QEMU_CLOCK_VIRTUAL is thread-safe, write access is NOP.

This makes possible to boot Windows with large vCPUs count when
hv-time is not used.

Reproducer:
  -M q35,hpet=off -cpu host -enable-kvm -smp 240,sockets=4 -m 8G WS2025.img
fails to boot within 30min.

With this fix it boots within 2-1min.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20250814160600.2327672-3-imammedo@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agomemory: reintroduce BQL-free fine-grained PIO/MMIO
Igor Mammedov [Thu, 14 Aug 2025 16:05:53 +0000 (18:05 +0200)] 
memory: reintroduce BQL-free fine-grained PIO/MMIO

This patch brings back Jan's idea [1] of BQL-free IO access

This will let us make access to ACPI PM/HPET timers cheaper,
and prevent BQL contention in case of workload that heavily
uses the timers with a lot of vCPUs.

1) 196ea13104f (memory: Add global-locking property to memory regions)
   ... de7ea885c539 (kvm: Switch to unlocked MMIO)

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20250814160600.2327672-2-imammedo@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agoadd cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide
Igor Mammedov [Thu, 21 Aug 2025 15:56:03 +0000 (17:56 +0200)] 
add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide

The helpers form load-acquire/store-release pair and ensure
that appropriate barriers are in place in case checks happen
outside of BQL.

Use them to replace open-coded checkers/setters across the code,
to make sure that barriers are not missed.  Helpers also make code a
bit more readable.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
Link: https://lore.kernel.org/r/20250821155603.2422553-1-imammedo@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agouser-exec: ensure interrupt_request is not used
Paolo Bonzini [Fri, 29 Aug 2025 08:46:48 +0000 (10:46 +0200)] 
user-exec: ensure interrupt_request is not used

cpu_interrupt() is not called anymore except by ARM but even there
it is dead code; disentangling the various cpregs accessors from user-mode
emulation is a work in progress.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/isapc.c: replace rom_memory with system_memory
Mark Cave-Ayland [Thu, 28 Aug 2025 11:10:02 +0000 (12:10 +0100)] 
hw/i386/isapc.c: replace rom_memory with system_memory

Now that we can guarantee the isapc machine will never have a PCI bus, any
instances of rom_memory can be replaced by system_memory and rom_memory
removed completely.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-20-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: replace rom_memory with pci_memory
Mark Cave-Ayland [Thu, 28 Aug 2025 11:10:01 +0000 (12:10 +0100)] 
hw/i386/pc_piix.c: replace rom_memory with pci_memory

Now that we can guarantee the i440fx-pc machine will always have a PCI bus, any
instances of rom_memory can be replaced by pci_memory and rom_memory removed
completely.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-19-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove unused headers after isapc machine split
Mark Cave-Ayland [Thu, 28 Aug 2025 11:10:00 +0000 (12:10 +0100)] 
hw/i386/pc_piix.c: remove unused headers after isapc machine split

The headers for isapc-only devices can be removed from pc_piix.c since they are
no longer used by the i440fx-pc machine.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-18-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386: move isapc machine to separate isapc.c file
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:59 +0000 (12:09 +0100)] 
hw/i386: move isapc machine to separate isapc.c file

Now that pc_init_isa() is independent of any PCI initialisation, move it into a
separate isapc.c file including the ISA IDE variables which are now no longer
needed for the pc-i440fx machine. This enables us to finally fix the dependency
of ISAPC on I440FX in hw/i386/Kconfig.

Note that as part of the move to a separate file we can see that the licence text
is a verbatim copy of the MIT licence. The text originates from commit 1df912cf9e
("VL license of the day is MIT/BSD") so we can be sure that this was the original
intent. As a consequence we can update the file header to use a SPDX tag as per
the current project contribution guidelines.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-17-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: assume pcmc->pci_enabled is always true in pc_init1()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:58 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: assume pcmc->pci_enabled is always true in pc_init1()

PCI is always enabled on the pc-i440fx machine so hardcode the relevant logic
in pc_init1(). Add an assert() to ensure that this is always the case at
runtime as already done in pc_q35_init().

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-16-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: always initialise ISA IDE drives in pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:57 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: always initialise ISA IDE drives in pc_init_isa()

By definition an isapc machine must always use ISA IDE drives so ensure that they
are always enabled. At the same time also remove the surrounding CONFIG_IDE_ISA
define since it will be enabled via the ISAPC Kconfig.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-15-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove pc_system_flash_cleanup_unused() from pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:56 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove pc_system_flash_cleanup_unused() from pc_init_isa()

This function contains 'assert(PC_MACHINE_GET_CLASS(pcms)->pci_enabled)' and so we can
safely assume that it should never be used for the isapc machine.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250828111057.468712-14-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: hardcode hole64_size to 0 in pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:55 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: hardcode hole64_size to 0 in pc_init_isa()

All isapc machines must have 32-bit CPUs and have no PCI 64-bit hole so it can be
hardcoded to 0.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-13-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: simplify RAM size logic in pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:54 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: simplify RAM size logic in pc_init_isa()

All isapc machines must have 32-bit CPUs and so the RAM split logic can be hardcoded
accordingly.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250828111057.468712-12-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove nvdimm initialisation from pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:53 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove nvdimm initialisation from pc_init_isa()

NVDIMMs cannot be used by PCs from a pre-PCI era.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-11-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove SGX initialisation from pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:52 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove SGX initialisation from pc_init_isa()

The Intel SGX instructions only exist on recent CPUs and so would never be available
on a CPU from the pre-PCI era.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-10-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove SMI and piix4_pm initialisation from pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:51 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove SMI and piix4_pm initialisation from pc_init_isa()

These are based upon the PIIX4 PCI chipset and so can never be used on an isapc machine.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-9-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove igvm initialisation from pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:50 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove igvm initialisation from pc_init_isa()

According to the QEMU documentation igvm is only supported for the pc and q35
machines so remove igvm support from the isapc machine.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/r/20250828111057.468712-8-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove pcmc->pci_enabled dependent initialisation from pc_init_isa()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:49 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove pcmc->pci_enabled dependent initialisation from pc_init_isa()

PCI code will never be used for an isapc machine.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-7-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: duplicate pc_init1() into pc_isa_init()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:48 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: duplicate pc_init1() into pc_isa_init()

This is to prepare for splitting the isapc machine into its own separate file.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250828111057.468712-6-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: inline pc_xen_hvm_init_pci() into pc_xen_hvm_init()
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:47 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: inline pc_xen_hvm_init_pci() into pc_xen_hvm_init()

This helps to simplify the initialisation of the Xen hvm machine.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-5-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: remove include for loader.h
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:46 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: remove include for loader.h

This header is not required since the loader functionality is handled separately
by pc_memory_init() in pc.c.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250828111057.468712-4-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: restrict isapc machine to 3.5G memory
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:45 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: restrict isapc machine to 3.5G memory

Since the isapc machine is now limited to using 32-bit CPUs, add a hard restriction
so that the machine cannot be started with more than 3.5G memory. This matches the
default value for max_ram_below_4g if not specified and provides consistent
behaviour betweem TCG and KVM accelerators.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/r/20250828111057.468712-3-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agohw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs
Mark Cave-Ayland [Thu, 28 Aug 2025 11:09:44 +0000 (12:09 +0100)] 
hw/i386/pc_piix.c: restrict isapc machine to 32-bit CPUs

The isapc machine represents a legacy ISA PC with a 486 CPU. Whilst it is
possible to specify any CPU via -cpu on the command line, it makes no
sense to allow modern 64-bit CPUs to be used.

Restrict the isapc machine to the available 32-bit CPUs, taking care to
handle the case where if a user inadvertently uses either -cpu max or
-cpu host then the "best" 32-bit CPU is used (in this case the pentium3).

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20250828111057.468712-2-mark.caveayland@nutanix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
6 weeks agoMerge tag 'pull-loongarch-20250828' of https://github.com/gaosong715/qemu into staging
Richard Henderson [Thu, 28 Aug 2025 21:44:50 +0000 (07:44 +1000)] 
Merge tag 'pull-loongarch-20250828' of https://github.com/gaosong715/qemu into staging

pull-loongarch-20250828

# -----BEGIN PGP SIGNATURE-----
#
# iLMEAAEIAB0WIQTKRzxE1qCcGJoZP81FK5aFKyaCFgUCaLBJawAKCRBFK5aFKyaC
# FhiGBACdQ1hkGp79sFrwi0h6GaP4NdbG8jx0vNGwPOqvbIc6Frn4bSyATNZI76k+
# /B2KTGLe4fU95QeXCJ937N1mNqcbagxFVeCaqSS71wuSfVKZBWLvGi8CckCqWU57
# GeUCQTOgA+E94C93G0pdgtyi2r7ambPnqTNifghkdoSN52Ta1Q==
# =pUq/
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 28 Aug 2025 10:19:55 PM AEST
# gpg:                using RSA key CA473C44D6A09C189A193FCD452B96852B268216
# gpg: Good signature from "Song Gao <gaosong@loongson.cn>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CA47 3C44 D6A0 9C18 9A19  3FCD 452B 9685 2B26 8216

* tag 'pull-loongarch-20250828' of https://github.com/gaosong715/qemu:
  hw/intc/loongarch_pch_pic: Fix ubsan warning and endianness issue
  target/loongarch: Guard 64-bit-only insn translation with TRANS64 macro

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agohw/intc/loongarch_pch_pic: Fix ubsan warning and endianness issue
Thomas Huth [Fri, 1 Aug 2025 06:01:52 +0000 (08:01 +0200)] 
hw/intc/loongarch_pch_pic: Fix ubsan warning and endianness issue

When booting the Linux kernel from tests/functional/test_loongarch64_virt.py
with a QEMU that has been compiled with --enable-ubsan, there is
a warning like this:

 .../hw/intc/loongarch_pch_pic.c:171:46: runtime error: index 512 out of
  bounds for type 'uint8_t[64]' (aka 'unsigned char[64]')
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
  .../hw/intc/loongarch_pch_pic.c:171:46
 .../hw/intc/loongarch_pch_pic.c:175:45: runtime error: index 256 out of
  bounds for type 'uint8_t[64]' (aka 'unsigned char[64]')
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
  .../hw/intc/loongarch_pch_pic.c:175:45

It happens because "addr" is added first before substracting the base
(PCH_PIC_HTMSI_VEC or PCH_PIC_ROUTE_ENTRY).
Additionally, this code looks like it is not endianness safe, since
it uses a 64-bit pointer to write values into an array of 8-bit values.

Thus rework the code to use the stq_le_p / ldq_le_p helpers here
and make sure that we do not create pointers with undefined behavior
by accident.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
6 weeks agotarget/loongarch: Guard 64-bit-only insn translation with TRANS64 macro
WANG Rui [Fri, 25 Jul 2025 03:12:32 +0000 (11:12 +0800)] 
target/loongarch: Guard 64-bit-only insn translation with TRANS64 macro

This patch replaces uses of the generic TRANS macro with TRANS64 for
instructions that are only valid when 64-bit support is available.

This improves correctness and avoids potential assertion failures or
undefined behavior during translation on 32-bit-only configurations.

Signed-off-by: WANG Rui <wangrui@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
7 weeks agoMerge tag 'pull-lu-20250828' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Wed, 27 Aug 2025 23:24:36 +0000 (09:24 +1000)] 
Merge tag 'pull-lu-20250828' of https://gitlab.com/rth7680/qemu into staging

linux-user: do not print IP socket options by default
linux-user: Add strace for rseq
linux-user: Move get_elf_cpu_model to target/elfload.c
linux-user: Move get_elf_hwcap to target/elfload.c
linux-user: Move get_elf_hwcap2 to target/elfload.c
linux-user: Move get_elf_platform to target/elfload.c
linux-user: Move get_elf_base_platform to target/elfload.c
linux-user: Create init_main_thread in target/cpu_loop.c
semihosting: Retrieve stack top from image_info
semihosting: Initialize heap once per process

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmive68dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+LwwgAsjSjc5Bjal0mc+UI
# Qmb7qbNM7YDhJ4o9eJoT7AfEo3AlR8vhA01/ayfBEKMxYStl4tkZU1jthb7LLTyS
# TfPBsZEBF/ZuTYLV56dfQ/6AJZ2g5OhqJbeVeD8Ef93JK60qgBerCK/D5SfphSfh
# TQtOG0LU2BXzGt8K3WghFxsFQeYcTrNeT5JdtIXYrmGQmDnPh3dOnQrFcO1leFLa
# khUfj7l7bE1Rgqo5h5pveaee4AD3VndYe10zvSVKHKjBL4Zd3hxf3MypNRpDFC0v
# ua9xt4qXtWgEYSkKPj/mipcd9fsb+RKs6kPA3oojwb8DCkFAZ0UogIwmd9/7lz8u
# FMp+iQ==
# =Nu63
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 28 Aug 2025 07:42:07 AM AEST
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-lu-20250828' of https://gitlab.com/rth7680/qemu: (46 commits)
  linux-user: do not print IP socket options by default
  linux-user: Add strace for rseq
  linux-user: Remove do_init_main_thread
  linux-user/hexagon: Create init_main_thread
  linux-user/xtensa: Create init_main_thread
  linux-user/hppa: Create init_main_thread
  linux-user/riscv: Create init_main_thread
  linux-user/s390x: Create init_main_thread
  linux-user/alpha: Create init_main_thread
  linux-user/m68k: Create init_main_thread
  linux-user/sh4: Create init_main_thread
  linux-user/openrisc: Create init_main_thread
  linux-user/microblaze: Create init_main_thread
  linux-user/mips: Create init_main_thread
  linux-user/loongarch64: Create init_main_thread
  linux-user/ppc: Create init_main_thread
  linux-user/sparc: Create init_main_thread
  linux-user/aarch64: Create init_main_thread
  linux-user/arm: Remove a.out startup remenents
  linux-user/arm: Create init_main_thread
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: do not print IP socket options by default
Łukasz Stelmach [Wed, 27 Aug 2025 09:54:12 +0000 (11:54 +0200)] 
linux-user: do not print IP socket options by default

IP protocols should not be printed unless the socket is an IPv4 or
IPv6 one. Current arrangement erroneously prints IPPROTO_IP for Unix
domain sockets.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250827095412.2348821-1-l.stelmach@samsung.com>

7 weeks agolinux-user: Add strace for rseq
Joel Stanley [Tue, 26 Aug 2025 06:03:40 +0000 (15:33 +0930)] 
linux-user: Add strace for rseq

 build/qemu-riscv64 -cpu rv64,v=on -d strace  build/tests/tcg/riscv64-linux-user/test-vstart-overflow
 1118081 riscv_hwprobe(0xffffbc038200,1,0,0,0,0) = 0
 1118081 brk(NULL) = 0x0000000000085000
 1118081 brk(0x0000000000085b00) = 0x0000000000085b00
 1118081 set_tid_address(0x850f0) = 1118081
 1118081 set_robust_list(0x85100,24) = -1 errno=38 (Function not implemented)
 1118081 rseq(0x857c0,32,0,0xf1401073) = -1 errno=38 (Function not implemented)

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250826060341.1118670-1-joel@jms.id.au>

7 weeks agolinux-user: Remove do_init_main_thread
Richard Henderson [Tue, 29 Jul 2025 08:24:19 +0000 (22:24 -1000)] 
linux-user: Remove do_init_main_thread

All targets have been converted, so we can call init_main_thread
directly.  Remove do_init_main_thread and HAVE_INIT_MAIN_THREAD.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/hexagon: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 08:19:49 +0000 (22:19 -1000)] 
linux-user/hexagon: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/xtensa: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 08:16:22 +0000 (22:16 -1000)] 
linux-user/xtensa: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/hppa: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 08:09:19 +0000 (22:09 -1000)] 
linux-user/hppa: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/riscv: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 08:06:12 +0000 (22:06 -1000)] 
linux-user/riscv: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/s390x: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 08:03:03 +0000 (22:03 -1000)] 
linux-user/s390x: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/alpha: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 07:59:47 +0000 (21:59 -1000)] 
linux-user/alpha: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Note that init_thread had set ps in target_pt_regs, but
target_cpu_copy_regs did not copy to env.  This turns out to be
ok because alpha_cpu_initfn initializes flags properly.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/m68k: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 07:53:30 +0000 (21:53 -1000)] 
linux-user/m68k: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/sh4: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 07:51:02 +0000 (21:51 -1000)] 
linux-user/sh4: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/openrisc: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 07:48:48 +0000 (21:48 -1000)] 
linux-user/openrisc: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/microblaze: Create init_main_thread
Richard Henderson [Tue, 29 Jul 2025 07:44:06 +0000 (21:44 -1000)] 
linux-user/microblaze: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/mips: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 23:33:18 +0000 (13:33 -1000)] 
linux-user/mips: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Note that init_thread had set cp0_status in target_pt_regs, but
target_cpu_copy_regs did not copy to env.  This turns out to be
ok because mips_cpu_reset_hold initializes CP0_Status properly.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/loongarch64: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 23:22:48 +0000 (13:22 -1000)] 
linux-user/loongarch64: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Note that init_thread had set crmd in target_pt_regs, but
target_cpu_copy_regs did not copy to env.  This turns out to be
ok because loongarch_cpu_reset_hold initializes CRMD properly.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/ppc: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 23:09:29 +0000 (13:09 -1000)] 
linux-user/ppc: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/sparc: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 22:29:11 +0000 (12:29 -1000)] 
linux-user/sparc: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/aarch64: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 21:04:34 +0000 (11:04 -1000)] 
linux-user/aarch64: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/arm: Remove a.out startup remenents
Richard Henderson [Sat, 2 Aug 2025 21:51:51 +0000 (07:51 +1000)] 
linux-user/arm: Remove a.out startup remenents

The setting of r1/r2 was removed in kernel commit acfdd4b1f7590d0
("ARM: 7791/1: a.out: remove partial a.out support"), and the
kernel commit message explains the history.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/arm: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 20:43:26 +0000 (10:43 -1000)] 
linux-user/arm: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/i386: Create init_main_thread
Richard Henderson [Mon, 28 Jul 2025 20:17:44 +0000 (10:17 -1000)] 
linux-user/i386: Create init_main_thread

Merge init_thread and target_cpu_copy_regs.
There's no point going through a target_pt_regs intermediate.
Temporarily introduce HAVE_INIT_MAIN_THREAD during conversion.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Create do_init_main_thread
Richard Henderson [Mon, 28 Jul 2025 20:00:36 +0000 (10:00 -1000)] 
linux-user: Create do_init_main_thread

Provide a unified function to initialize the main thread.
Keep target_pt_regs isolated to this function.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move target_cpu_copy_regs decl to qemu.h
Richard Henderson [Mon, 28 Jul 2025 19:49:39 +0000 (09:49 -1000)] 
linux-user: Move target_cpu_copy_regs decl to qemu.h

The function is not used by bsd-user, so placement
within include/user/cpu_loop.h is not ideal.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_base_platform to mips/elfload.c
Richard Henderson [Mon, 28 Jul 2025 19:24:31 +0000 (09:24 -1000)] 
linux-user: Move get_elf_base_platform to mips/elfload.c

Pass in CPUState; define HAVE_ELF_BASE_PLATFORM.
Since this was the only instance of ELF_BASE_PLATFORM, go ahead and
provide the stub definition for other platforms.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Remove ELF_PLATFORM
Richard Henderson [Mon, 28 Jul 2025 19:18:03 +0000 (09:18 -1000)] 
linux-user: Remove ELF_PLATFORM

All real definitions of ELF_PLATFORM are now identical, and the stub
definitions are NULL.  Use HAVE_ELF_PLATFORM and provide a stub as a
fallback definition of get_elf_platform.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/hppa: Create get_elf_platform
Richard Henderson [Mon, 28 Jul 2025 19:06:39 +0000 (09:06 -1000)] 
linux-user/hppa: Create get_elf_platform

Move the string literal to a new function.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/loongarch64: Create get_elf_platform
Richard Henderson [Mon, 28 Jul 2025 19:00:52 +0000 (09:00 -1000)] 
linux-user/loongarch64: Create get_elf_platform

Move the string literal to a new function.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_platform to arm/elfload.c
Richard Henderson [Mon, 28 Jul 2025 18:47:57 +0000 (08:47 -1000)] 
linux-user: Move get_elf_platform to arm/elfload.c

Move the aarch32 get_elf_platform to arm/elfload.c; pass in CPUState.
Create a simple version in aarch64/elfload.c, which we must do at the
same time because of the ifdef dependency between TARGET_AARCH64
and TARGET_ARM.

Since all versions of get_elf_platform now have the same
signature, remove the ifdef from the declaration in loader.h.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user/i386: Return const data from get_elf_platform
Richard Henderson [Mon, 28 Jul 2025 18:43:35 +0000 (08:43 -1000)] 
linux-user/i386: Return const data from get_elf_platform

Rather than modify a static buffer, index into an array of const data.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_platform to {i386,x86_64}/elfload.c
Richard Henderson [Mon, 28 Jul 2025 18:41:43 +0000 (08:41 -1000)] 
linux-user: Move get_elf_platform to {i386,x86_64}/elfload.c

Move get_elf_platform to i386/elfload.c; pass in CPUState.
Create a simple get_elf_platform for x86_64.
Introduce HAVE_ELF_PLATFORM.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Remove ELF_HWCAP2
Richard Henderson [Fri, 1 Aug 2025 23:13:23 +0000 (09:13 +1000)] 
linux-user: Remove ELF_HWCAP2

All definitions of ELF_HWCAP2 are now identical.  Provide a
not-reached stub as a fallback definition of get_elf_hwcap2.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Remove ELF_HWCAP
Richard Henderson [Fri, 1 Aug 2025 23:05:41 +0000 (09:05 +1000)] 
linux-user: Remove ELF_HWCAP

All real definitions of ELF_HWCAP are now identical, and the stub
definitions are 0.  Provide zero stub as a fallback definition.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_hwcap to riscv/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:44:02 +0000 (21:44 -1000)] 
linux-user: Move get_elf_hwcap to riscv/elfload.c

Change the return type to abi_ulong, and pass in the cpu.
As this is the last instance of get_elf_hwcap to be converted,
remove the ifdef around the declaration in loader.h.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move hwcap functions to s390x/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:39:23 +0000 (21:39 -1000)] 
linux-user: Move hwcap functions to s390x/elfload.c

For get_elf_hwcap, change the return type to abi_ulong
and pass in the cpu.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_hwcap to sh4/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:28:05 +0000 (21:28 -1000)] 
linux-user: Move get_elf_hwcap to sh4/elfload.c

Change the return type to abi_ulong, and pass in the cpu.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_hwcap to mips/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:23:05 +0000 (21:23 -1000)] 
linux-user: Move get_elf_hwcap to mips/elfload.c

Change the return type to abi_ulong, and pass in the cpu.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_hwcap to loongarch64/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:17:08 +0000 (21:17 -1000)] 
linux-user: Move get_elf_hwcap to loongarch64/elfload.c

Change the return type to abi_ulong, and pass in the cpu.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move hwcap functions to ppc/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:12:54 +0000 (21:12 -1000)] 
linux-user: Move hwcap functions to ppc/elfload.c

Change the return type to abi_ulong, and pass in the cpu.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_hwcap to sparc/elfload.c
Richard Henderson [Mon, 28 Jul 2025 07:03:12 +0000 (21:03 -1000)] 
linux-user: Move get_elf_hwcap to sparc/elfload.c

Change the return type to abi_ulong, and pass in the cpu.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move hwcap functions to {arm,aarch64}/elfload.c
Richard Henderson [Mon, 28 Jul 2025 06:52:01 +0000 (20:52 -1000)] 
linux-user: Move hwcap functions to {arm,aarch64}/elfload.c

For get_elf_hwcap and get_elf_hwcap2, change the return type to
abi_ulong, and pass in the cpu.  We must do these targets at the
same time because of the ifdef dependency between TARGET_AARCH64
and TARGET_ARM.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_hwcap to {i386,x86_64}/elfload.c
Richard Henderson [Mon, 28 Jul 2025 06:34:19 +0000 (20:34 -1000)] 
linux-user: Move get_elf_hwcap to {i386,x86_64}/elfload.c

Change the return type to abi_ulong, and pass in the cpu.
Duplicate the one line function between i386 and x86_64,
as most other additions to elfload.c won't be common.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move get_elf_cpu_model to target/elfload.c
Richard Henderson [Tue, 29 Jul 2025 20:09:57 +0000 (10:09 -1000)] 
linux-user: Move get_elf_cpu_model to target/elfload.c

Rename from cpu_get_model to emphasize that this is an elf-specific
function.  Declare the function once in loader.h.

This frees up target_elf.h for other uses.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Move ppc uabi/asm/elf.h workaround to osdep.h
Richard Henderson [Tue, 29 Jul 2025 23:40:15 +0000 (13:40 -1000)] 
linux-user: Move ppc uabi/asm/elf.h workaround to osdep.h

Move the workaround out of linux-user/elfload.c, so that
we don't have to replicate it in many places.  Place it
immediately after the include of <signal.h>, which draws
in the relevant symbols.

Note that ARCH_DLINFO is not defined by the kernel header,
and so there's no need to undef it either.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agolinux-user: Create target/elfload.c files
Richard Henderson [Tue, 29 Jul 2025 18:03:41 +0000 (08:03 -1000)] 
linux-user: Create target/elfload.c files

Prepare to split the main linux-user/elfload.c.
Create empty files for each target, and add the common build rule.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agosemihosting: Initialize heap once per process
Richard Henderson [Sat, 2 Aug 2025 00:25:12 +0000 (10:25 +1000)] 
semihosting: Initialize heap once per process

While semihosting isn't really thread aware, the current
implementation allocates space for the heap per-thread.

Remove the heap_base and heap_limit fields from TaskState.
Replace with static variables within do_common_semihosting.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agosemihosting: Retrieve stack top from image_info
Richard Henderson [Sat, 2 Aug 2025 00:12:01 +0000 (10:12 +1000)] 
semihosting: Retrieve stack top from image_info

Remove the write-once field TaskState.stack_base, and use the
same value from struct image_info.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Richard Henderson [Wed, 27 Aug 2025 20:28:42 +0000 (06:28 +1000)] 
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* rust: declare self as qemu_api for proc-macros
* rust/qemu-api-macros: make derive(Object) friendly when missing parent
* x86/loader: Don't update kernel header for CoCo VMs
* target/i386: Add support for save/load of exception error code
* i386/tcg/svm: fix incorrect canonicalization
* scripts/minikconf.py: small fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmivPVYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroNi/wf/VvAfmXDNgiffoXl91cF8kx2zSs8L
# D+pd/ufVEkFYsU1EnHUsGJKK0XrjHp/beCGkWZr9nTP448n1t5MiTYgI9z5Lkult
# hwBQMZsxbOLw4BItbh9obWC5HrfHqgpy88hsfy+RfiSU31ae4drzottDm3/VbaFY
# 2d0x9ai8lvaTk+GqBV8EeeCT210tS/Cb/8HC22o+vC2O2/cztnuCj6wtD43ocDEk
# lhT00edP8jUX4EoPAx18Qkv/zzPL/p9jWVAFCcE/IZ/e4LSrgA61aUyoP9vvrjWh
# U+f8C4MV2o8oZ1lM9FC5hJ0LdQbeq1kxqqukQIKYlRiFXjD3LZ+3wJueHQ==
# =XEsN
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 28 Aug 2025 03:16:06 AM AEST
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [unknown]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  rust: move dependencies to rust/Cargo.toml
  rust: declare self as qemu_api for proc-macros
  rust/qemu-api-macros: make derive(Object) friendly when missing parent
  subprojects: update proc-macro2 and syn
  rust: qemu-api-macros: support matching more than one error
  rust: disable borrow_as_ptr warning
  kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
  i386/tcg/svm: fix incorrect canonicalization
  x86/loader: Don't update kernel header for CoCo VMs
  MAINTAINERS: add a few more files to "Top Level Makefile and configure"
  python: mkvenv: fix messages printed by mkvenv
  scripts/minikconf.py: s/Error/KconfigParserError
  scripts/minikconf.py: fix invalid attribute access
  target/i386: Add support for save/load of exception error code

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agoMerge tag 'pull-request-2025-08-27' of https://gitlab.com/thuth/qemu into staging
Richard Henderson [Wed, 27 Aug 2025 09:11:08 +0000 (19:11 +1000)] 
Merge tag 'pull-request-2025-08-27' of https://gitlab.com/thuth/qemu into staging

* Add v10.2 compat machines
* Move functional tests to target specific subfolders
* Fix some issues in functional tests

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmiuuP0RHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbVMEA//egQiaWsMquQan7D8RWt7TkD2deY2L5Dx
# D/pkO3xGA1hxCzD37ptGfFw2NO6cVpH8cjOevrJYUwW1Yefbsf8HqUlC7PrqDjTw
# +ztyIPSl7ny3xQxif+1Oc2rmt6MCNCQTw9CLdB0k3D1jr7aY0Z20JrxFrQmExhOe
# oSqiILYwiZGfNI4jiQSBYtBVpKrqwCQ+gEs6HyqayQOczaYynHvt8Gqwyp/DpKpY
# bfBcqbREK8zYTMMRYl5d/qcJpWgVtCj5OeqDQyhLMSgNt9fGmdKMzjK5Wzgl18gX
# 8A9tFK8KreXXLu1UfJWe+/kFAHMWhEWMkOv81Z/gqB4Zmp/eMioKlGDwVBU//PPm
# VFigfAPtqBqvOiuJo673ze2AOWMGROtLyZ9nyfv8/MZcQqoYLtvfZMUa08/M74/w
# TRSsBMGKk3H2O/prrXjFHK8q0aRXB2Ld3to0TyZOwlB17rhaD5jq/P8ge2UgGRGb
# fSghUKGmBAHueZyUdlCer+TEzH8ySl5zmotfiDeQfIYkwQ6rWUQZfehLxoycuHvr
# Kl3ZU6RD7fD2kCzRbvUOsyg0H3pihVvzcCL5BMxbGQ1sqZ+WI1dWPoOaUrZ9EvOg
# lQtsNMiu2i7bVqaJ27zNR4V3nwU77f/f+6zJwyXtD+6Wb+bFcQu5aYfgjqOr/Tlv
# zEVoqp5pRU4=
# =pSMT
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 27 Aug 2025 05:51:25 PM AEST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [unknown]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [unknown]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2025-08-27' of https://gitlab.com/thuth/qemu: (31 commits)
  tests/functional: Mark main in QemuBaseTest class as a static method
  MAINTAINERS: Adjust wildcards for the migration, multiprocess and replay tests
  tests/functional: Move the generic tests to a subfolder
  tests/functional: Move xtensa tests into target-specific folder
  tests/functional: Move x86_64 tests into target-specific folder
  tests/functional: Move sparc/sparc64 tests into target-specific folders
  tests/functional: Move sh4/sh4eb tests into target-specific folders
  tests/functional: Move s390x tests into target-specific folders
  tests/functional: Move rx test into target-specific folders
  tests/functional: Move riscv32/riscv64 tests into target-specific folders
  tests/functional: Move ppc/ppc64 tests into target-specific folders
  tests/functional: Move or1k tests into target-specific folders
  tests/functional: Move mips tests into target-specific folders
  tests/functional: Move microblaze tests into architecture specific folder
  tests/functional: Move m68k tests into architecture specific folder
  tests/functional: Move loongarch64 tests into architecture specific folder
  tests/functional: Move i386 tests into architecture specific folder
  tests/functional: Move hppa tests into architecture specific folder
  tests/functional: Move avr tests into architecture specific folder
  tests/functional: Move arm tests into architecture specific folder
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7 weeks agorust: move dependencies to rust/Cargo.toml
Paolo Bonzini [Fri, 22 Aug 2025 10:07:44 +0000 (12:07 +0200)] 
rust: move dependencies to rust/Cargo.toml

As more crates start using the same dependencies, it's better to not
repeat the versions and move the dependency declarations to the workspace.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agorust: declare self as qemu_api for proc-macros
Manos Pitsidianakis [Mon, 28 Jul 2025 11:48:23 +0000 (14:48 +0300)] 
rust: declare self as qemu_api for proc-macros

Fix an outstanding TODO.

Declaring `extern crate self as qemu_api` allows use of `qemu_api`
within the qemu_api crate; this allows the Wrapper derive macro and
future proc macros to be used interchangeably in the qemu_api crate and
other crates. This is not required currently and is only for
future-proofing.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Link: https://lore.kernel.org/r/20250728-self-as-qemu_api-v1-1-001c339cccc8@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agorust/qemu-api-macros: make derive(Object) friendly when missing parent
Marc-André Lureau [Tue, 26 Aug 2025 13:31:32 +0000 (17:31 +0400)] 
rust/qemu-api-macros: make derive(Object) friendly when missing parent

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Link: https://lore.kernel.org/r/20250826133132.4064478-5-marcandre.lureau@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agosubprojects: update proc-macro2 and syn
Paolo Bonzini [Thu, 17 Jul 2025 06:09:26 +0000 (08:09 +0200)] 
subprojects: update proc-macro2 and syn

syn 2.0.69 adds Punctuated::get().  The serde and attrs crate also need
a newer version.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agorust: qemu-api-macros: support matching more than one error
Paolo Bonzini [Wed, 16 Jul 2025 11:17:09 +0000 (13:17 +0200)] 
rust: qemu-api-macros: support matching more than one error

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agorust: disable borrow_as_ptr warning
Paolo Bonzini [Thu, 31 Jul 2025 17:36:38 +0000 (19:36 +0200)] 
rust: disable borrow_as_ptr warning

This is pretty noisy, but it was not visible until now because it only shows up
if the rust-version has "&raw const".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agokvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c
Ani Sinha [Fri, 15 Aug 2025 06:54:45 +0000 (12:24 +0530)] 
kvm/kvm-all: make kvm_park/unpark_vcpu local to kvm-all.c

kvm_park_vcpu() and kvm_unpark_vcpu() is only used in kvm-all.c. Declare it
static, remove it from common header file and make it local to kvm-all.c

Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250815065445.8978-1-anisinha@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agoi386/tcg/svm: fix incorrect canonicalization
Zero Tang [Mon, 18 Aug 2025 10:16:47 +0000 (12:16 +0200)] 
i386/tcg/svm: fix incorrect canonicalization

For all 32-bit systems and 64-bit Windows systems, "long" is 4 bytes long.
Due to using "long" for a linear address, svm_canonicalization would
set all high bits to 1 when (assuming 48-bit linear address) the segment
base is bigger than 0x7FFF.

This fixes booting guests under TCG when the guest IDT and GDT bases are
above 0x7FFF, thereby resulting in incorrect bases. When an interrupt
arrives, it would trigger a #PF exception; the #PF would trigger again,
resulting in a #DF exception; the #PF would trigger for the third time,
resulting in triple-fault, and eventually causes a shutdown VM-Exit to
the hypervisor right after guest boot.

Cc: qemu-stable@nongnu.org
Signed-off-by: Zero Tang <zero.tangptr@gmail.com>
7 weeks agox86/loader: Don't update kernel header for CoCo VMs
Xiaoyao Li [Thu, 14 Aug 2025 09:21:11 +0000 (17:21 +0800)] 
x86/loader: Don't update kernel header for CoCo VMs

Update the header makes it different from the original kernel that user
provides via "-kernel", which leads to a different hash and breaks the
attestation, e.g., for TDX.

We already skip it for SEV VMs. Instead of adding another check of
is_tdx_vm() to cover the TDX case, check machine->cgs to cover all the
confidential computing case for x86.

Reported-by: Vikrant Garg <vikrant1garg@gmail.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250814092111.2353598-1-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agotests/functional: Mark main in QemuBaseTest class as a static method
Gustavo Romero [Tue, 19 Aug 2025 14:39:15 +0000 (14:39 +0000)] 
tests/functional: Mark main in QemuBaseTest class as a static method

The main() method in the QemuBaseTest class has no parameters but is
defined as a regular method. Currently, this does not cause any issues
because in the functional tests main() is always called directly from
QemuBaseTest (never from instances), but the way this method is defined
makes its signature wrong, implying a 'self'. Hence, it's best practice
to define such a method as a static method, so decorate it with
@staticmethod.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-ID: <20250819143916.4138035-4-gustavo.romero@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
7 weeks agoMAINTAINERS: Adjust wildcards for the migration, multiprocess and replay tests
Thomas Huth [Tue, 19 Aug 2025 11:24:02 +0000 (13:24 +0200)] 
MAINTAINERS: Adjust wildcards for the migration, multiprocess and replay tests

Now that we moved the tests into subfolders, we have to adjust the
wildcards accordingly.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-26-thuth@redhat.com>

7 weeks agotests/functional: Move the generic tests to a subfolder
Thomas Huth [Tue, 19 Aug 2025 11:24:01 +0000 (13:24 +0200)] 
tests/functional: Move the generic tests to a subfolder

This also removes the line for using tests from the main folder
since we do not have any tests left here. And while we're at it,
also mark the vnc test as generic now since it is not specific to x86.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-25-thuth@redhat.com>

7 weeks agotests/functional: Move xtensa tests into target-specific folder
Thomas Huth [Tue, 19 Aug 2025 11:24:00 +0000 (13:24 +0200)] 
tests/functional: Move xtensa tests into target-specific folder

The tests/functional folder has become quite crowded, thus move the
xtensa tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-24-thuth@redhat.com>

7 weeks agotests/functional: Move x86_64 tests into target-specific folder
Thomas Huth [Tue, 19 Aug 2025 11:23:59 +0000 (13:23 +0200)] 
tests/functional: Move x86_64 tests into target-specific folder

The tests/functional folder has become quite crowded, thus move the
x86_64 tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-23-thuth@redhat.com>

7 weeks agotests/functional: Move sparc/sparc64 tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:58 +0000 (13:23 +0200)] 
tests/functional: Move sparc/sparc64 tests into target-specific folders

The tests/functional folder has become quite crowded, thus move the
sparc tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-22-thuth@redhat.com>

7 weeks agotests/functional: Move sh4/sh4eb tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:57 +0000 (13:23 +0200)] 
tests/functional: Move sh4/sh4eb tests into target-specific folders

The tests/functional folder has become quite crowded, thus move the
sh4 tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-21-thuth@redhat.com>

7 weeks agotests/functional: Move s390x tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:56 +0000 (13:23 +0200)] 
tests/functional: Move s390x tests into target-specific folders

The tests/functional folder has become quite crowded, thus move the
s390x tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-20-thuth@redhat.com>

7 weeks agotests/functional: Move rx test into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:55 +0000 (13:23 +0200)] 
tests/functional: Move rx test into target-specific folders

Move the architecture specific test into an architecture specific
subdirectory.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-19-thuth@redhat.com>

7 weeks agotests/functional: Move riscv32/riscv64 tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:54 +0000 (13:23 +0200)] 
tests/functional: Move riscv32/riscv64 tests into target-specific folders

The opensbi test is used for both, riscv32 and riscv64. Copy the main
test to the riscv64 folder and add a simple wrapper to the riscv32
folder to be able to run it for that target, too.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-18-thuth@redhat.com>

7 weeks agotests/functional: Move ppc/ppc64 tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:53 +0000 (13:23 +0200)] 
tests/functional: Move ppc/ppc64 tests into target-specific folders

The tests/functional folder has become quite crowded, thus move the
ppc and ppc64 tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-17-thuth@redhat.com>

7 weeks agotests/functional: Move or1k tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:52 +0000 (13:23 +0200)] 
tests/functional: Move or1k tests into target-specific folders

The tests/functional folder has become quite crowded, thus move the
openrisc tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-16-thuth@redhat.com>

7 weeks agotests/functional: Move mips tests into target-specific folders
Thomas Huth [Tue, 19 Aug 2025 11:23:51 +0000 (13:23 +0200)] 
tests/functional: Move mips tests into target-specific folders

The tests/functional folder has become quite crowded, thus move the
mips tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-15-thuth@redhat.com>

7 weeks agotests/functional: Move microblaze tests into architecture specific folder
Thomas Huth [Tue, 19 Aug 2025 11:23:50 +0000 (13:23 +0200)] 
tests/functional: Move microblaze tests into architecture specific folder

The tests/functional folder has become quite crowded, thus move the
microblaze tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-14-thuth@redhat.com>

7 weeks agotests/functional: Move m68k tests into architecture specific folder
Thomas Huth [Tue, 19 Aug 2025 11:23:49 +0000 (13:23 +0200)] 
tests/functional: Move m68k tests into architecture specific folder

The tests/functional folder has become quite crowded, thus move the
m68k tests into a target-specific subfolder.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250819112403.432587-13-thuth@redhat.com>