]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
5 weeks agohw/pcspk: use explicitly the required PIT types
Marc-André Lureau [Tue, 21 Oct 2025 09:02:35 +0000 (13:02 +0400)] 
hw/pcspk: use explicitly the required PIT types

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251021090317.425409-5-marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/audio: remove global pcspk
Marc-André Lureau [Tue, 21 Oct 2025 09:02:34 +0000 (13:02 +0400)] 
hw/audio: remove global pcspk

It is no longer used since commit 6033b9ecd4 ("pc: remove -soundhw pcspk")

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251021090317.425409-4-marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/audio: rename model list function
Marc-André Lureau [Tue, 21 Oct 2025 09:02:33 +0000 (13:02 +0400)] 
hw/audio: rename model list function

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251021090317.425409-3-marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/audio: improve error reports
Marc-André Lureau [Tue, 21 Oct 2025 09:02:32 +0000 (13:02 +0400)] 
hw/audio: improve error reports

The -audiodev argument is 'model=..', use same terminology.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251021090317.425409-2-marcandre.lureau@redhat.com>
[PMD: Fixed checkpatch.pl issues]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agotests/qtest/ds1338: Reuse from_bcd()
Bernhard Beschow [Sun, 19 Oct 2025 21:03:03 +0000 (23:03 +0200)] 
tests/qtest/ds1338: Reuse from_bcd()

from_bcd() is a public API function which can be unit-tested. Reuse it to avoid
code duplication.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20251019210303.104718-11-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/intc/apic: Pass APICCommonState to apic_register_{read,write}
Bernhard Beschow [Sun, 19 Oct 2025 21:03:02 +0000 (23:03 +0200)] 
hw/intc/apic: Pass APICCommonState to apic_register_{read,write}

As per the previous patch, the APIC instance is already available in
apic_msr_{read,write}, so it can be passed along. It turns out that
the call to cpu_get_current_apic() is only required in
apic_mem_{read,write}, so it has been moved there. Longer term,
cpu_get_current_apic() could be removed entirely if
apic_mem_{read,write} is tied to a CPU's local address space.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-10-shentey@gmail.com>
[PMD: Move return after apic_send_msi() in apic_mem_write()]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/i386/apic: Ensure own APIC use in apic_msr_{read,write}
Bernhard Beschow [Sun, 19 Oct 2025 21:03:01 +0000 (23:03 +0200)] 
hw/i386/apic: Ensure own APIC use in apic_msr_{read,write}

Avoids the `current_cpu` global and seems more robust by not "forgetting" the
own APIC and then re-determining it by cpu_get_current_apic() which uses the
global.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-9-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/i386/apic: Prefer APICCommonState over DeviceState
Bernhard Beschow [Sun, 19 Oct 2025 21:03:00 +0000 (23:03 +0200)] 
hw/i386/apic: Prefer APICCommonState over DeviceState

Makes the APIC API more type-safe by resolving quite a few APIC_COMMON
downcasts.

Like PICCommonState, the APICCommonState is now a public typedef while staying
an abstract datatype.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-8-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/ide/ide-internal: Move dma_buf_commit() into ide "namespace"
Bernhard Beschow [Sun, 19 Oct 2025 21:02:59 +0000 (23:02 +0200)] 
hw/ide/ide-internal: Move dma_buf_commit() into ide "namespace"

The identifier suggests that it is a generic DMA function while it is tied
to IDE. Fix this by adding an "ide_" prefix.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-7-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/rtc/mc146818rtc: Assert correct usage of mc146818rtc_set_cmos_data()
Bernhard Beschow [Sun, 19 Oct 2025 21:02:58 +0000 (23:02 +0200)] 
hw/rtc/mc146818rtc: Assert correct usage of mc146818rtc_set_cmos_data()

The offset is never controlled by the guest, so any misuse constitutes a
programming error and shouldn't be silently ignored. Fix this by using assert().

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-6-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/rtc/mc146818rtc: Use ARRAY_SIZE macro
Bernhard Beschow [Sun, 19 Oct 2025 21:02:57 +0000 (23:02 +0200)] 
hw/rtc/mc146818rtc: Use ARRAY_SIZE macro

Avoids the error-prone repetition of the array size.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-5-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/rtc/mc146818rtc: Convert CMOS_DPRINTF() into trace events
Bernhard Beschow [Sun, 19 Oct 2025 21:02:56 +0000 (23:02 +0200)] 
hw/rtc/mc146818rtc: Convert CMOS_DPRINTF() into trace events

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-4-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/audio/pcspk: Add I/O trace events
Bernhard Beschow [Sun, 19 Oct 2025 21:02:55 +0000 (23:02 +0200)] 
hw/audio/pcspk: Add I/O trace events

Allows to see how the guest interacts with the device.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-3-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/timer/i8254: Add I/O trace events
Bernhard Beschow [Sun, 19 Oct 2025 21:02:54 +0000 (23:02 +0200)] 
hw/timer/i8254: Add I/O trace events

Allows to see how the guest interacts with the device.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251019210303.104718-2-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/ppc/prep: Always create prep-systemio
BALATON Zoltan [Sat, 18 Oct 2025 14:04:59 +0000 (16:04 +0200)] 
hw/ppc/prep: Always create prep-systemio

The prep-systemio device models the system control ports of the 40p
machine which is not an optional pluggable device but part of the
system so it should not be disabled by -nodefaults but always created.

Additionally remove some line breaks to make lines related to one
device appear in one block for logical separation from other devices.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <b5b0150b6c579b10682f6482e7832cf381ffb759.1760795082.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/net/can/xlnx-versal-canfd: remove register API usage for banked regs
Luc Michel [Fri, 17 Oct 2025 16:18:05 +0000 (18:18 +0200)] 
hw/net/can/xlnx-versal-canfd: remove register API usage for banked regs

Now that we have a simple decoding logic for all the banked registers,
remove the register API usage for them. This restricts the register API
usage to only the base registers (from 0x0 to 0xec).

This also removes all the custom code that was creating register
descriptors for the register API and was leading to memory leaks when
the device was finalized.

Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Luc Michel <luc.michel@amd.com>
Message-ID: <20251017161809.235740-7-luc.michel@amd.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/net/can/xlnx-versal-canfd: refactor the banked registers logic
Luc Michel [Fri, 17 Oct 2025 16:18:04 +0000 (18:18 +0200)] 
hw/net/can/xlnx-versal-canfd: refactor the banked registers logic

The CANFD device has several groups of registers:
  - the main control registers from 0x0 to 0xec
  - several banks of multiple registers. The number of banks is either
    hardcoded, or configurable using QOM properties:
      - Tx registers
      - Filter registers
      - Tx events registers
      - Rx0 registers
      - Rx1 registers

As of now, all the registers are handled using the register API. The
banked register logic results in a convoluted code to correctly allocate
the register descriptors for the register API. This code bypasses the
standard register API creation function (register_init_block). The
resulting code leaks memory when the device is finalized.

This commit introduces decoding logic for the banked registers. Those
registers are quite simple in practice. Accessing them triggers no
side-effect (only the filter registers need a check to catch guest
invalid behaviour). Starting from the Tx events registers, they are all
read-only.

The main device memory region is changed to an I/O one, calling the
new decoding logic when accessed. The register API memory region still
overlaps all of it so for now the introduced code has no effect. The
next commit will remove the register API usage for banked registers.

Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Luc Michel <luc.michel@amd.com>
Message-ID: <20251017161809.235740-6-luc.michel@amd.com>
[PMD: Have canfd_decode_reg_bank() take optional @idx, types fixups]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/core/register: remove the `register_finalize_block' function
Luc Michel [Fri, 17 Oct 2025 16:18:03 +0000 (18:18 +0200)] 
hw/core/register: remove the `register_finalize_block' function

This function is now unused. Drop it.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Luc Michel <luc.michel@amd.com>
Message-ID: <20251017161809.235740-5-luc.michel@amd.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/core/register: remove the calls to `register_finalize_block'
Luc Michel [Fri, 17 Oct 2025 16:18:02 +0000 (18:18 +0200)] 
hw/core/register: remove the calls to `register_finalize_block'

This function is now a no-op. The register array is parented to the
device and get finalized when the device is.

Drop all the calls to `register_finalize_block'. Drop the
RegisterInfoArray reference when it is not used elsewhere in the device.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Luc Michel <luc.michel@amd.com>
Message-ID: <20251017161809.235740-4-luc.michel@amd.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/core/register: add the REGISTER_ARRAY type
Luc Michel [Fri, 17 Oct 2025 16:18:01 +0000 (18:18 +0200)] 
hw/core/register: add the REGISTER_ARRAY type

Introduce the REGISTER_ARRAY QOM type. This type reuses the existing
RegisterInfoArray struct. When `register_init_block' is called, it creates
a REGISTER_ARRAY object and parents it to the calling device. This way
it gets finalized when the device is. The memory region is parented to
the REGISTER_ARRAY object to ensure correct finalizing order.

The finalize function of the REGISTER_ARRAY type performs the necessary
cleaning that used to be done by `register_finalize_block'. The latter
is left empty and will be removed when all the register API users have
been refactored.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Luc Michel <luc.michel@amd.com>
Message-ID: <20251017161809.235740-3-luc.michel@amd.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/core/register: remove the REGISTER device type
Luc Michel [Fri, 17 Oct 2025 16:18:00 +0000 (18:18 +0200)] 
hw/core/register: remove the REGISTER device type

The REGISTER class (RegisterInfo struct) is currently a QOM type
inheriting from DEVICE. This class has no real purpose:
   - the qdev API is not used,
   - according to the comment preceding it, the object_initialize call
     is here to zero-initialize the struct. However all the effective
     struct attributes are then initialized explicitly.
   - the object is never parented.

This commits drops the REGISTER QOM type completely, leaving the
RegisterInfo struct as a bare C struct.

The register_register_types function is left empty here because it is
reused in the next commit.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Luc Michel <luc.michel@amd.com>
Message-ID: <20251017161809.235740-2-luc.michel@amd.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/xen: pass PCI domain to xc_physdev_map_pirq_msi()
Roger Pau Monne [Fri, 17 Oct 2025 15:51:36 +0000 (17:51 +0200)] 
hw/xen: pass PCI domain to xc_physdev_map_pirq_msi()

It's currently impossible for passthrough devices on segment different
than 0 to work correctly, as the PCI domain is not provided to
xc_physdev_map_pirq_msi(), and hence it's unconditionally assumed that
all devices are on segment 0.

Adjust the call to xc_physdev_map_pirq_msi() to pass the PCI domain in
the high 16bits of the bus parameter.  On versions of Xen where this
is not supported the passed segment will be ignored and assume to be 0,
no worse than the current state.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Frediano Ziglio <freddy77@gmail.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Message-ID: <20251017155136.16540-1-roger.pau@citrix.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/openrisc/openrisc_sim: Avoid buffer overflow build error
Jan Kiszka [Thu, 16 Oct 2025 12:48:10 +0000 (14:48 +0200)] 
hw/openrisc/openrisc_sim: Avoid buffer overflow build error

Resolves this build breakage (which is actually a false-positive)

../hw/openrisc/openrisc_sim.c: In function ‘openrisc_sim_init’:
../hw/openrisc/openrisc_sim.c:284:45: error: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Werror=format-truncation=]
     snprintf(alias, sizeof(alias), "serial%d", uart_idx);
                                             ^
In file included from /usr/include/stdio.h:964:0,
                 from /data/qemu/include/qemu/osdep.h:114,
                 from ../hw/openrisc/openrisc_sim.c:21:
/usr/include/bits/stdio2.h:54:10: note: ‘__builtin___snprintf_chk’ output between 8 and 9 bytes into a destination of size 8
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __glibc_objsize (__s), __fmt,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~

by using a modern, more robust allocation pattern.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <298bd904-1ee9-439e-8220-7a24e0952861@siemens.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/ppc/e500: Check for compatible CPU type instead of aborting ungracefully
Thomas Huth [Wed, 15 Oct 2025 11:12:43 +0000 (13:12 +0200)] 
hw/ppc/e500: Check for compatible CPU type instead of aborting ungracefully

When using the ppce500 machine with an embedded CPU type that has
the right MMU model, but is not part of the e500 CPU family, QEMU
currently aborts ungracefully:

 $ ./qemu-system-ppc -machine ppce500 -cpu e200z5 -nographic
 qemu-system-ppc: ../qemu/hw/core/gpio.c:108: qdev_get_gpio_in_named:
  Assertion `n >= 0 && n < gpio_list->num_in' failed.
 Aborted (core dumped)

The ppce500 machine expects a CPU with certain GPIO interrupt pins,
so let's replace the coarse check for the MMU_BOOKE206 model with
a more precise check that only allows CPUs from the e500 family.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3162
Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <20251015111243.1585018-1-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/i2c/smbus_eeprom: Add minimum write recovery time for DDR2
BALATON Zoltan [Wed, 8 Oct 2025 12:25:02 +0000 (14:25 +0200)] 
hw/i2c/smbus_eeprom: Add minimum write recovery time for DDR2

This is needed for newer u-boot-sam460ex versions to pass the DRAM
setup.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251008122502.9DA8956F301@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/boards: Introduce DEFINE_MACHINE_WITH_INTERFACE_ARRAY() macro
Philippe Mathieu-Daudé [Thu, 24 Apr 2025 13:10:49 +0000 (15:10 +0200)] 
hw/boards: Introduce DEFINE_MACHINE_WITH_INTERFACE_ARRAY() macro

DEFINE_MACHINE_WITH_INTERFACE_ARRAY() is similar to
DEFINE_MACHINE_WITH_INTERFACES() but allows to pass
an InterfaceInfo[] pointer.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20251020220941.65269-5-philmd@linaro.org>

5 weeks agohw/boards: Extend DEFINE_MACHINE macro to cover more use cases
BALATON Zoltan [Thu, 1 May 2025 23:20:33 +0000 (01:20 +0200)] 
hw/boards: Extend DEFINE_MACHINE macro to cover more use cases

Add a more general DEFINE_MACHINE_EXTENDED macro and define simpler
versions with less parameters based on that. This is inspired by how
the OBJECT_DEFINE macros do this in a similar way to allow using the
shortened definition in more complex cases too.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-ID: <d75c8bbed97650f1a4d2d675444582a240a335b4.1760798392.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
5 weeks agohw/boards: Move DEFINE_MACHINE() definition closer to its doc string
Philippe Mathieu-Daudé [Mon, 20 Oct 2025 14:50:03 +0000 (16:50 +0200)] 
hw/boards: Move DEFINE_MACHINE() definition closer to its doc string

Code movement to have the DEFINE_MACHINE() definition follow
its usage documentation comment.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20251020220941.65269-3-philmd@linaro.org>

5 weeks agohw/core: Introduce MachineClass::get_default_cpu_type() helper
Philippe Mathieu-Daudé [Tue, 22 Apr 2025 10:11:56 +0000 (12:11 +0200)] 
hw/core: Introduce MachineClass::get_default_cpu_type() helper

MachineClass::get_default_cpu_type() runs once the machine is
created, being able to evaluate runtime checks; it returns the
machine default CPU type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20251020221508.67413-7-philmd@linaro.org>

5 weeks agohw/core/machine: Allow dynamic registration of valid CPU types
Philippe Mathieu-Daudé [Thu, 3 Apr 2025 22:54:15 +0000 (00:54 +0200)] 
hw/core/machine: Allow dynamic registration of valid CPU types

Add MachineClass::get_valid_cpu_types(), a helper that
returns a dynamic list of CPU types. Since the helper
takes a MachineState argument, we know the machine is
created by the time we call it.

Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20251020220941.65269-4-philmd@linaro.org>

5 weeks agohw/core: Filter machine list available for a particular target binary
Philippe Mathieu-Daudé [Mon, 20 Oct 2025 21:46:21 +0000 (23:46 +0200)] 
hw/core: Filter machine list available for a particular target binary

Binaries can register a QOM type to filter their machines
by filling their TargetInfo::machine_typename field.

Commit 28502121be7 ("system/vl: Filter machine list available
for a particular target binary") added the filter to
machine_help_func() but missed the other places where the machine
list must be filtered, such QMP 'query-machines' command used by
QTests, and select_machine(). Fix that.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20251020220941.65269-2-philmd@linaro.org>

5 weeks agohw/pci-host/raven: Use correct parameter in direct access ops
BALATON Zoltan [Wed, 2 Jul 2025 22:09:02 +0000 (00:09 +0200)] 
hw/pci-host/raven: Use correct parameter in direct access ops

Instead of passing unneeded enclosing objects to the config direct
access ops that only need the bus we can pass that directly thus
simplifying the functions.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <226e0756661e72a03ba363887730112a58acde85.1760795082.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/pci-host/raven: Rename direct config access ops
BALATON Zoltan [Sun, 4 May 2025 16:01:36 +0000 (18:01 +0200)] 
hw/pci-host/raven: Rename direct config access ops

Rename memory io ops implementing PCI configuration direct access to
mmcfg which describes better what these are for.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <74fcd70106289663ea426161aada78e879995d6c.1760795082.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/pci-host/raven: Simplify direct config access address decoding
BALATON Zoltan [Sun, 4 May 2025 16:01:35 +0000 (18:01 +0200)] 
hw/pci-host/raven: Simplify direct config access address decoding

Use ctz instead of an open coded version and rename function to better
show what it does.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <68c038fd225463db282d0277d80cb525e0551413.1760795082.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5 weeks agohw/virtio: Compile virtio-mem.c once
Philippe Mathieu-Daudé [Fri, 7 Mar 2025 13:51:58 +0000 (14:51 +0100)] 
hw/virtio: Compile virtio-mem.c once

Remove unused "system/ram_addr.h" header. This file doesn't
use any target specific definitions anymore, compile it once
by moving it to system_virtio_ss[].

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20250502214551.80401-6-philmd@linaro.org>

5 weeks agohw/virtio/virtio-mem: Convert VIRTIO_MEM_HAS_LEGACY_GUESTS to runtime
Philippe Mathieu-Daudé [Wed, 16 Apr 2025 12:29:55 +0000 (14:29 +0200)] 
hw/virtio/virtio-mem: Convert VIRTIO_MEM_HAS_LEGACY_GUESTS to runtime

Check legacy guests support at runtime: instead of evaluating
the VIRTIO_MEM_HAS_LEGACY_GUESTS definition at compile time,
call target_arch() to detect which target is being run at runtime.
Register virtio_mem_legacy_guests_properties[] at runtime.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20250502214551.80401-5-philmd@linaro.org>

5 weeks agohw/virtio/virtio-mem: Convert VIRTIO_MEM_USABLE_EXTENT to runtime
Philippe Mathieu-Daudé [Fri, 7 Mar 2025 13:21:06 +0000 (14:21 +0100)] 
hw/virtio/virtio-mem: Convert VIRTIO_MEM_USABLE_EXTENT to runtime

Use target_arch() to check at runtime which target architecture
is being run.

Note, since TARGET_ARM is defined for TARGET_AARCH64, we
check for both ARM & AARCH64 enum values.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20250502214551.80401-4-philmd@linaro.org>

5 weeks agoMerge tag 'pull-request-2025-10-21' of https://gitlab.com/thuth/qemu into staging
Richard Henderson [Tue, 21 Oct 2025 13:59:35 +0000 (08:59 -0500)] 
Merge tag 'pull-request-2025-10-21' of https://gitlab.com/thuth/qemu into staging

- Add a missing QAPI event + functional test for the CPI feature on s390x
- Remove the obsolete s390-ccw-virtio-4.2 machine type
- 2nd try to fix the slow cache up/download in the MSYS2 CI job

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmj3kIkRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbW4ZBAAlEulDcBvKukbIWyPcHNN3KLEk0YXRA9S
# Mj7dZ/4rLTvjpHt+y5NaZ+lkzzIPJF3KD6D8Y//no1ik911tCOSaJQLu9ByJHVk4
# EKdEw1LGFYNcpnAP2XAExrwjtB98/YqSqaKB5K5d3jJ/6MQSGHygdTB4OL19Nevt
# tfTxXMBYjze+/Wvkt9bF4gAv6VyQ0XAhzRT1xYcWmrtT0wRhNrl6zG+1GgHWtnhM
# AJbO6PwTsNdsmeRjNCDlamevdAXO44chZJXOEHkIQcfj9enuJyZnmdWH3E7NGjk+
# pTh89u1N+0AERc9DuQIMzYRKb2lgCi8v1xWjJMc/c9dgi7+sJOs7O1m4ySKuGxg0
# +0Czn6Q8tYqywl2i9DmdTqC+l3g4H/5M9xBQtMmLbLNRxXniDCXRedRBTWAUfh29
# K1lL0vL3oz/2oZLE3/SieQdxHP51LsbJGwu1o96T/HvPnaOkzF6c7PRIjuKyqAbR
# 5qKhsQMCRqKx6kK4AxnmQ123hnZADpZXWTK9T59xHKwJ595JN7nWAWn3THq4XlPF
# 5rkFTIUEkNIWhS92XNyy165tvXw2cz66J3ud/A006p0OzO3Kow3863TNAQI/wFNR
# xDGFNjzNp/8YpXMfsgQZ3oB7iEpK5zliosd61sxqGUcd33w8kMHaKeWwly2Mroy2
# eS1dHAHdSrg=
# =pnHC
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 21 Oct 2025 08:54:17 AM CDT
# 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-10-21' of https://gitlab.com/thuth/qemu:
  gitlab-ci: Decrease the size of the compiler cache
  hw/core/machine: Remove MachineClass::fixup_ram_size callback
  hw/s390x/ccw: Remove SCLPDevice::increment_size field
  hw/s390x/ccw: Remove deprecated s390-ccw-virtio-4.2 machine
  tests/functional: add tests for SCLP event CPI
  qapi/machine-s390x: add QAPI event SCLP_CPI_INFO_AVAILABLE

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 weeks agoMerge tag 'pull-error-2025-10-21' of https://repo.or.cz/qemu/armbru into staging
Richard Henderson [Tue, 21 Oct 2025 13:59:19 +0000 (08:59 -0500)] 
Merge tag 'pull-error-2025-10-21' of https://repo.or.cz/qemu/armbru into staging

Error reporting patches for 2025-10-21

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmj3VtISHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTQeAP/04zx2+cQd4z5nTW3xEXKk/NOdq0v8bS
# QURIehjdsmf18rqzayITDx5lajy2cHc59quLOmUKxIiP4Ovs6yPI89n9k7plN2rd
# 5uaxnYI7BSMwkWMjUr8Bidy4PhDBwpTAouKx8616n1gd25bVjr9jLcnXBoLiuxZf
# jARC6Qnjj4cZC7VdZpMsKoWoOyGrJ7ZoBeDE6fgnVIsjhk2zj77tTaA0SXhzFe20
# gBO7EZD8CYgiakgW1yyYrxcOcT7agTzW6L0+k93Nh4lLbT8qVz60Vq3PnPuonkBj
# aJ1j8jgQ4zRHlsDLs54R0Xigjj2cDVim6rDJsdqUZQP4Giy2LqBDsDrP9xaljt4x
# alIQJMUEGAYUy4vMhuiqLBwC8sEYvYs7FW9E+O9gk5ieKLq3A74q/i35xs8PIZF0
# 2A3THqRtMe87opNtmhfcXjwHSTewCuYreUjTj8Ih+FofQa4TAofhHZKk01k9NeXT
# xgNNUZxF/Z6j/ukCtgaABCUc/XYvx/AGmsv63Dw1bJnu9FIuq/8t2aNxVwtAlklN
# Mz+KYtuhgAxKxN6Zugy6qQPrMjxf7DJesiE4BbbSJcJb8o43rzkFNiyW/X1YhCan
# 8lyBCQX5eDWb1QWIF1ln5Q7EJf2+ouBeUyZbVGZXoJZCWoXmCl0w8LqLYEeX1k6M
# 4iLy37wX9kwo
# =GZ2A
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 21 Oct 2025 04:48:02 AM CDT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [unknown]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.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: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-error-2025-10-21' of https://repo.or.cz/qemu/armbru:
  ui/pixman: Fix crash in qemu_pixman_shareable_free()

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 weeks agoMerge tag 'pull-10.2-maintainer-201025-2' of https://gitlab.com/stsquad/qemu into...
Richard Henderson [Tue, 21 Oct 2025 13:58:57 +0000 (08:58 -0500)] 
Merge tag 'pull-10.2-maintainer-201025-2' of https://gitlab.com/stsquad/qemu into staging

maintainer updates (gitlab, check-tcg, virtio-gpu, plugins, docs)

  - drop aarch32 runner from custom runners
  - use template for aarch64 custom jobs
  - don't test for atime in linux-test
  - drop extra draw call causing corruption in gtk-gl-area
  - add trace event for blob map/unmap
  - extend ufrace_symbols to generate dbg files
  - group VirtIO devices in device documentation
  - merge vhost-user device docs into single file

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmj2L2EACgkQ+9DbCVqe
# KkQhFAf/d22W8F3h4E9N1y2t4OaIsVH6iynctKuKqURbW4g/QngreMnvge12Ixf1
# puSkvMTPVAkEzT/mm+jl3XPgBOnayj5kiU/RAEGmpuelhlE9gJftIikHlfbr+urF
# kWbdrug8EuPwu7XVAfvUoygjDEfC50EzDyw45saGq4h1fQS7hVganBKPV20Ha4SQ
# Qf4F3pLO//4DC2LcUFKEeCf4l0i/jXXmeJvbT9bucGD057NVcPJY7v6Cw4UwQvla
# GBwY5NaxuORpfOQOWobuTn2fcbIw6E4yFuEuRd++ZsPGRFIS6Fzo4Xiw3xzd70qD
# ms0bFg6cvMMyzqVlf2THdHxozVuU5w==
# =kh5z
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 20 Oct 2025 07:47:29 AM CDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [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: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-10.2-maintainer-201025-2' of https://gitlab.com/stsquad/qemu:
  docs/system: merge vhost-user-input into vhost-user-contrib
  docs/system: drop vhost-user-rng docs
  docs/system: unify the naming style for VirtIO devices
  docs/system: split VirtIO devices from the rest
  contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source
  hw/display: add blob map/unmap trace events
  ui/gtk-gl-area: Remove extra draw call in refresh
  tests/tcg/multiarch/linux/linux-test: Don't try to test atime update
  gitlab: drop aarch32 runner and associated bits
  gitlab: use template for ubuntu-24.04-aarch64 jobs

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
5 weeks agogitlab-ci: Decrease the size of the compiler cache
Thomas Huth [Mon, 20 Oct 2025 16:17:59 +0000 (18:17 +0200)] 
gitlab-ci: Decrease the size of the compiler cache

Uploading the cache from the runner takes a long time in the MSYS2
job, mostly due to the size of the compiler cache.
However, looking at runs with a non-poluted cache, it seems like
you can get a build with a 99% hit rate already with ~ 160 MiB cache
size, so the compiler cache with 500 MiB certainly contains a lot of
stale files. Thus decrease the size of the ccache to a more reasonable
value to speed up the MSYS2 job in our CI.

While at it, also add a "du -sh" for the build folder to get a better
feeling for the amount of object code that is required for the build,
and publish the list of files in /var/cache to be able to better
analyze what is really clogging our cache here.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251020161759.50241-1-thuth@redhat.com>

5 weeks agohw/core/machine: Remove MachineClass::fixup_ram_size callback
Philippe Mathieu-Daudé [Mon, 20 Oct 2025 09:49:02 +0000 (11:49 +0200)] 
hw/core/machine: Remove MachineClass::fixup_ram_size callback

The MachineClass::fixup_ram_size callback, which was added
in commit 5c30ef937f5 ("vl/s390x: fixup ram sizes for compat
machines"), was only used by the s390-ccw-virtio-4.2 machine,
which got removed. Remove it as now unused.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251020094903.72182-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
5 weeks agohw/s390x/ccw: Remove SCLPDevice::increment_size field
Philippe Mathieu-Daudé [Mon, 20 Oct 2025 09:49:01 +0000 (11:49 +0200)] 
hw/s390x/ccw: Remove SCLPDevice::increment_size field

The SCLPDevice::increment_size field was only used by the
s390-ccw-virtio-4.2 machine, which got removed. Remove it
as now unused, along with the sclp_memory_init() method.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251020094903.72182-3-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
5 weeks agohw/s390x/ccw: Remove deprecated s390-ccw-virtio-4.2 machine
Philippe Mathieu-Daudé [Mon, 20 Oct 2025 09:49:00 +0000 (11:49 +0200)] 
hw/s390x/ccw: Remove deprecated s390-ccw-virtio-4.2 machine

This machine has been supported for a period of more than 6 years.
According to our versioned machine support policy (see commit
ce80c4fa6ff "docs: document special exception for machine type
deprecation & removal") it can now be removed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251020094903.72182-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
5 weeks agotests/functional: add tests for SCLP event CPI
Shalini Chellathurai Saroja [Thu, 16 Oct 2025 12:17:08 +0000 (14:17 +0200)] 
tests/functional: add tests for SCLP event CPI

Add tests for SCLP event type Control-Program Identification.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by Thomas Huth <thuth@redhat.com>
Message-ID: <20251016121708.334133-2-shalini@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
5 weeks agoqapi/machine-s390x: add QAPI event SCLP_CPI_INFO_AVAILABLE
Shalini Chellathurai Saroja [Thu, 16 Oct 2025 12:17:07 +0000 (14:17 +0200)] 
qapi/machine-s390x: add QAPI event SCLP_CPI_INFO_AVAILABLE

Add QAPI event SCLP_CPI_INFO_AVAILABLE to notify the availability
of Control-Program Identification data in QOM.

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.ibm.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251016121708.334133-1-shalini@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
6 weeks agoui/pixman: Fix crash in qemu_pixman_shareable_free()
Markus Armbruster [Mon, 13 Oct 2025 11:21:02 +0000 (13:21 +0200)] 
ui/pixman: Fix crash in qemu_pixman_shareable_free()

Reported-by: Bernhard Beschow <shentey@gmail.com>
Fixes: b296b29d3414 (ui/pixman: Consistent error handling in qemu_pixman_shareable_free())
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20251013112102.2396012-1-armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
6 weeks agodocs/system: merge vhost-user-input into vhost-user-contrib
Alex Bennée [Thu, 16 Oct 2025 15:03:56 +0000 (16:03 +0100)] 
docs/system: merge vhost-user-input into vhost-user-contrib

We might as well group all the contrib submissions together and gently
dissuade people from using them in production. Update the references in
vhost-user to neatly refer to the storage daemon and the various
external rust backends.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-ID: <20251016150357.876415-12-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agodocs/system: drop vhost-user-rng docs
Alex Bennée [Thu, 16 Oct 2025 15:03:55 +0000 (16:03 +0100)] 
docs/system: drop vhost-user-rng docs

This is a fairly lightweight document which doesn't add much to the
general advice in vhost-user. Update the vhost-user docs to point
directly at the rust-vmm repo.

Reviewed-by: John Levon <john.levon@nutanix.com>
Message-ID: <20251016150357.876415-11-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agodocs/system: unify the naming style for VirtIO devices
Alex Bennée [Thu, 16 Oct 2025 15:03:54 +0000 (16:03 +0100)] 
docs/system: unify the naming style for VirtIO devices

This makes the index look a little neater.

Reviewed-by: John Levon <john.levon@nutanix.com>
Message-ID: <20251016150357.876415-10-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agodocs/system: split VirtIO devices from the rest
Alex Bennée [Thu, 16 Oct 2025 15:03:53 +0000 (16:03 +0100)] 
docs/system: split VirtIO devices from the rest

In an effort to tidy up our device documentation split the VirtIO docs
from the rest of the index and put the index to them at the front of
the list. Sort the remaining entries alphabetically and tweak the
references appropriately.

Add a short preface to the VirtIO section nudging users to use VirtIO
unless they specifically want a particular piece of hardware
emulation.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: John Levon <john.levon@nutanix.com>
Message-ID: <20251016150357.876415-9-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agocontrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source
Pierrick Bouvier [Thu, 16 Oct 2025 15:03:52 +0000 (16:03 +0100)] 
contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source

Enhance uftrace_symbols.py to generate .dbg files, containing
source location for every symbol present in .sym file.
It allows to use `uftrace {replay,dump} --srcline` and show origin of
functions, connecting trace to original source code.

It was first implemented with pyelftools DWARF parser, which was way
too slow (~minutes) to get locations for every symbol in the linux
kernel. Thus, we use `addr2line` instead, which runs in seconds.

As well, there were some bugs with latest pyelftools release,
requiring to run master version, which is not installable with pip.
Thus, since we now require binutils (addr2line), we can ditch pyelftools
based implementation and simply rely on `nm` to get symbols information,
which is faster and better.

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251016150357.876415-8-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agohw/display: add blob map/unmap trace events
Alex Bennée [Thu, 16 Oct 2025 15:03:51 +0000 (16:03 +0100)] 
hw/display: add blob map/unmap trace events

As these events happen dynamically as the guest does various things
they are quite handy to trace.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Message-ID: <20251016150357.876415-7-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agoui/gtk-gl-area: Remove extra draw call in refresh
Dongwon Kim [Thu, 16 Oct 2025 15:03:50 +0000 (16:03 +0100)] 
ui/gtk-gl-area: Remove extra draw call in refresh

This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
which causes some guest display corruption when gtk-gl-area
is used for GTK rendering (e.g. Wayland Compositor) possibly due to
simulataneous accesses on the guest frame buffer by host compositor
and the guest.

Fixes: 77bf310084 ("ui/gtk: Draw guest frame at refresh cycle")
Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20250214170813.2234754-1-dongwon.kim@intel.com>
Message-ID: <20250603110204.838117-12-alex.bennee@linaro.org>
Cc: qemu-stable@nongnu.org
Message-ID: <20251016150357.876415-6-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agotests/tcg/multiarch/linux/linux-test: Don't try to test atime update
Peter Maydell [Thu, 16 Oct 2025 15:03:48 +0000 (16:03 +0100)] 
tests/tcg/multiarch/linux/linux-test: Don't try to test atime update

The linux-test test includes an attempt to check the utime and stat
syscalls by setting the atime and mtime of a file to specific values,
and then calling stat() to check that the values read back correctly.

Unfortunately this is flaky, as it will fail if some other process
(for instance a virus scanner, backup program, etc) gets in and reads
the file between the utime() and stat() call, resulting in a host
syscall sequence like this:

utimensat(AT_FDCWD, "file2",
  [{tv_sec=1001, tv_nsec=0} /* 1970-01-01T01:16:41+0100 */,
   {tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */], 0) = 0
# successfully set atime to 1001 and mtime to 1000
statx(AT_FDCWD, "file2", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT,
  STATX_BASIC_STATS,
  {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID,
   stx_blksize=4096, stx_attributes=0, stx_nlink=1, stx_uid=32808,
   stx_gid=32808, stx_mode=S_IFREG|0600, stx_ino=21659016,
   stx_size=100, stx_blocks=8,
   stx_attributes_mask=STATX_ATTR_COMPRESSED|STATX_ATTR_IMMUTABLE|
         STATX_ATTR_APPEND|STATX_ATTR_NODUMP|STATX_ATTR_ENCRYPTED|
         STATX_ATTR_AUTOMOUNT|STATX_ATTR_MOUNT_ROOT|STATX_ATTR_VERITY|
         STATX_ATTR_DAX,
   stx_atime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
   stx_ctime={tv_sec=1760091862, tv_nsec=63509009} /* 2025-10-10T11:24:22.063509009+0100 */,
   stx_mtime={tv_sec=1000, tv_nsec=0} /* 1970-01-01T01:16:40+0100 */,
   stx_rdev_major=0, stx_rdev_minor=0, stx_dev_major=252,
   stx_dev_minor=0, stx_mnt_id=0x1f}) = 0
# but when we statx the file, we get back an mtime of 1000
# but an atime corresponding to when the other process read it

and which will cause the test program to fail with the error
message "stat time".

In theory we could defend against this by e.g.  operating on files in
a dummy loopback mount filesystem which we mounted as 'noatime', but
this isn't worth the hassle.  Just drop the check on atime.

Cc: qemu-stable@nongnu.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251016150357.876415-4-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agogitlab: drop aarch32 runner and associated bits
Alex Bennée [Thu, 16 Oct 2025 15:03:47 +0000 (16:03 +0100)] 
gitlab: drop aarch32 runner and associated bits

While working out what hoops to jump through to get a full set of
aarch32 packages installed on the aarch64 runner it was pointed out 32
bit host support is deprecated. As the extra packages where needed for
system emulation (marked deprecated since 8.0!) there didn't seem much
point keeping this in.

While the full expunging of 32 bit host support will probably be done
for 11.0 we can at least reduce the CI burden a bit now.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20251016150357.876415-3-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks agogitlab: use template for ubuntu-24.04-aarch64 jobs
Alex Bennée [Thu, 16 Oct 2025 15:03:46 +0000 (16:03 +0100)] 
gitlab: use template for ubuntu-24.04-aarch64 jobs

Most of the test is pure boilerplate so to save ourselves from
repetition move all the main bits into a minimal copy of
native_build_job_template but without the caching.

We keep all the current allow_fail and configure setups but do take
the opportunity to replace the -j`nproc --ignore=40` hack with
something that almost, but not quite, saturates the machine its being
built on.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20251016150357.876415-2-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
6 weeks ago.gitlab-ci.d/buildtest.yml: Install 'file' for the Coverity job
Peter Maydell [Fri, 17 Oct 2025 13:31:56 +0000 (14:31 +0100)] 
.gitlab-ci.d/buildtest.yml: Install 'file' for the Coverity job

The coverity-scan upload job has started failing as of 30th
September:

[ERROR] Cannot find '/usr/bin/file' command, and no 'file' command is found in the PATH
        Coverity Capture uses this tool to identify the file type of executables.
        Please ensure '/usr/bin/file' is available, or add the 'file' utility to your PATH.

This seems to have broken when we moved our containers from Fedora 40
to 41 -- probably F40 indirectly pulled in 'file' via some other
dependency, but in F41 it does not.

Explicitly install 'file' for the coverity job, in the same way we
already do for curl and wget.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251017133156.926094-1-peter.maydell@linaro.org>

6 weeks agoMerge tag 'pull-tcg-20251019' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Sun, 19 Oct 2025 18:29:13 +0000 (11:29 -0700)] 
Merge tag 'pull-tcg-20251019' of https://gitlab.com/rth7680/qemu into staging

tcg: Remove support for 32-bit mips/ppc hosts

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmj1LRUdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8+pAf/VBeBnMEuGlc+nrJS
# VEYSVsyWeKy8ezRphc502HYrzeiJ/h7L5wwHG2Yt41GbiQ9M+2H02hQAQTwsft4H
# vQ1iUM7rurY75gYzbBCgUDGqG8y0VRAyAafheMWiaKk/r6QMCmIX5yClZKH6Yzvg
# ZDwSx9FgaWbXwW11tG/0Cl5p9PtWAhGy3NecnNprMqJ1Hqv2zxT9U8v9yN1U6oiH
# FHlJmsfPqWQhU0jLZ78LHc802Iys8qF6DQJNYVQ7Xkbu24pTC9HoR3z7MqoI1hQF
# ELrH8fZmFiWbkx85paWFsSP/Y3Ff+lcG5hrv91KPoX2uB3ymNLJ0qYG0S8Cvt/VX
# JSeH9Q==
# =qyo5
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 19 Oct 2025 11:25:25 AM PDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-tcg-20251019' of https://gitlab.com/rth7680/qemu:
  tcg/ppc: Remove support for 32-bit hosts
  tcg/ppc: Remove dead cases from tcg_target_op_def
  buildsys: Remove support for 32-bit PPC hosts
  tcg/mips: Remove ALIAS_PADD, ALIAS_PADDI
  tcg/mips: Remove support for 32-bit hosts
  tcg/mips: Remove support for O32 and N32 ABIs
  kvm/mips: Remove support for 32-bit hosts
  buildsys: Remove support for 32-bit MIPS hosts
  gitlab: Stop cross-testing for 32-bit MIPS hosts

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agotcg/ppc: Remove support for 32-bit hosts
Philippe Mathieu-Daudé [Tue, 14 Oct 2025 17:38:57 +0000 (19:38 +0200)] 
tcg/ppc: Remove support for 32-bit hosts

32-bit host support is deprecated since commit 6d701c9bac1
("meson: Deprecate 32-bit host support"), released as v10.0.
The next release being v10.2, we can remove the TCG backend
for 32-bit PPC hosts.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251014173900.87497-2-philmd@linaro.org>

6 weeks agotcg/ppc: Remove dead cases from tcg_target_op_def
Richard Henderson [Wed, 15 Oct 2025 18:55:33 +0000 (11:55 -0700)] 
tcg/ppc: Remove dead cases from tcg_target_op_def

Missed some lines when converting to TCGOutOpQemuLdSt*.

Fixes: 86fe5c2597c ("tcg: Convert qemu_st{2} to TCGOutOpLdSt{2}")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agoMerge tag 'pull-hex-20251017' of https://github.com/quic/qemu into staging
Richard Henderson [Fri, 17 Oct 2025 21:04:47 +0000 (14:04 -0700)] 
Merge tag 'pull-hex-20251017' of https://github.com/quic/qemu into staging

Fixes for linux-user sigcontext save/restore, etc.

misc: avoid inconsistencies w/indent on macOS
fix hexagon linux-user sigcontext discrepancy, found by Alex @ Zig

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEPWaq5HRZSCTIjOD4GlSvuOVkbDIFAmjyq24ACgkQGlSvuOVk
# bDIF9g/9FEllcwJFFOmyb+fsS0NkLFGRccCvowgjYCw5SaxC0+JBq58tWVkukCcK
# s+8eQ6TUfrgbxJziCoMWbP8UddMhNz9haUFGZ4wA8yq6Cxxmib092vdLj9YdfBdL
# TpMoXB1goWbPQ3EW2EyXr+Hsrlr/sb/hIrtSCvs2Xy1kRjc4xoAbHprgCz3C6oz4
# aiLJJy2uxWVDVEggWg7kSb2ZVmu/NrfReyv49kjEsuXiyHeQDBEDNYdRN5B6A9/F
# iznCSgTFBcDaV4UPaem6yEDuXCLucovmfLyvR+P6K/JtpOfX8nzWvk88j0WFeEmU
# kRZIpfR9un2GrndVeuxuoMGAZcha/LpajMr20OTfrKhJDPKp/kL5S3VqmBmZMsQx
# PjoBYFzBvg2FiMCQS1wQR4LGQ28/awz4ZnyeML02FRzDjmcFbZ0z5y4q1A9NnQEJ
# CZNnTjpUCdAVxymTnXCXVf/aS1T5v/iPWCu0BiebIlGP6/Eya364u60c0n/ABd1W
# bY3K1d2LZTYyi9dlT151pIOZ04S0k4E4g3jAyL578PfEpoJ7bXOmF8PL5DAAz1b8
# JRZjZLNXQlvNmcxTRs7wUzJlZ8AaudEZv5c+EnUcgLPcrBSMwvYdoXV7nyj+PKL1
# 3SwpRsgQimz7XtXAEUGmsSKUEIefF/yk/4laXHaGth3rMUDDi5U=
# =+ULY
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 17 Oct 2025 01:47:42 PM PDT
# gpg:                using RSA key 3D66AAE474594824C88CE0F81A54AFB8E5646C32
# gpg: Good signature from "Brian Cain (QUIC) <quic_bcain@quicinc.com>" [unknown]
# gpg:                 aka "Brian Cain <bcain@kernel.org>" [unknown]
# gpg:                 aka "Brian Cain (QuIC) <bcain@quicinc.com>" [unknown]
# gpg:                 aka "Brian Cain (CAF) <bcain@codeaurora.org>" [unknown]
# gpg:                 aka "bcain" [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: 6350 20F9 67A7 7164 79EF  49E0 175C 464E 541B 6D47
#      Subkey fingerprint: 3D66 AAE4 7459 4824 C88C  E0F8 1A54 AFB8 E564 6C32

* tag 'pull-hex-20251017' of https://github.com/quic/qemu:
  target/hexagon: Only indent on linux
  target/hexagon: Replace `prepare` script with meson target
  target/hexagon: s/pkt_has_store/pkt_has_scalar_store
  target/hexagon: handle .new values
  tests/tcg/hexagon: Add cs{0,1} coverage
  linux-user/hexagon: Use an array for GPRs
  linux-user/hexagon: use abi_ulong
  linux-user/hexagon: Fix sigcontext

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agotarget/hexagon: Only indent on linux
Anton Johansson [Wed, 2 Apr 2025 11:42:59 +0000 (13:42 +0200)] 
target/hexagon: Only indent on linux

indent on macOS, installed via homebrew, doesn't support -linux. Only
run indent on linux hosts.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agotarget/hexagon: Replace `prepare` script with meson target
Anton Johansson [Wed, 2 Apr 2025 11:42:58 +0000 (13:42 +0200)] 
target/hexagon: Replace `prepare` script with meson target

The purpose of the prepare script is to invoke `cpp` to preprocess input
to idef-parser by expanding a few select macros.  On macOS `cpp`
expands into `clang ... -traditional-cpp` which breaks macro
concatenation.  Replace `cpp` with `${compiler} -E`
and replace the script with a meson custom_target.

Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agotarget/hexagon: s/pkt_has_store/pkt_has_scalar_store
Brian Cain [Mon, 7 Apr 2025 19:27:04 +0000 (12:27 -0700)] 
target/hexagon: s/pkt_has_store/pkt_has_scalar_store

To remove any confusion with HVX or other potential store instructions,
we'll qualify this context var with "scalar".

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agotarget/hexagon: handle .new values
Brian Cain [Mon, 7 Apr 2025 19:27:01 +0000 (12:27 -0700)] 
target/hexagon: handle .new values

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agotests/tcg/hexagon: Add cs{0,1} coverage
Brian Cain [Wed, 8 Oct 2025 01:04:53 +0000 (20:04 -0500)] 
tests/tcg/hexagon: Add cs{0,1} coverage

Cover cs0,1 register corruption in the signal_context test case.

lc0, sa0 registers previously omitted from the clobbers list
are now captured.

Reviewed-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agolinux-user/hexagon: Use an array for GPRs
Brian Cain [Wed, 8 Oct 2025 23:06:42 +0000 (18:06 -0500)] 
linux-user/hexagon: Use an array for GPRs

Link: https://lore.kernel.org/qemu-devel/023e01dc389c$faf84320$f0e8c960$@gmail.com/
Suggested-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agolinux-user/hexagon: use abi_ulong
Brian Cain [Wed, 8 Oct 2025 22:22:34 +0000 (17:22 -0500)] 
linux-user/hexagon: use abi_ulong

Change the user_regs_struct to use abi_ulong instead of
target_ulong.

Link: https://lore.kernel.org/qemu-devel/7bf3d8c5-df07-4cbd-ba62-4c7246a5f96b@linaro.org/
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agolinux-user/hexagon: Fix sigcontext
Brian Cain [Wed, 8 Oct 2025 00:22:32 +0000 (19:22 -0500)] 
linux-user/hexagon: Fix sigcontext

In order to correspond with the kernel, we've now (1) moved the
preds[] to the right offset and combined the representation as a single
ulong "p3_0", (2), added the cs{0,1} registers, (3) added a pad for 48
words, (4) added the user regs structure to an 8-byte aligned
target_sigcontext structure.

Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
6 weeks agobuildsys: Remove support for 32-bit PPC hosts
Philippe Mathieu-Daudé [Tue, 14 Oct 2025 17:38:59 +0000 (19:38 +0200)] 
buildsys: Remove support for 32-bit PPC hosts

Stop detecting 32-bit PPC host as supported.
See previous commit for rationale.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[rth: Retain _ARCH_PPC64 check in udiv_qrnnd]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251014173900.87497-4-philmd@linaro.org>

6 weeks agotcg/mips: Remove ALIAS_PADD, ALIAS_PADDI
Richard Henderson [Wed, 15 Oct 2025 18:43:55 +0000 (11:43 -0700)] 
tcg/mips: Remove ALIAS_PADD, ALIAS_PADDI

These aliases existed to simplify code for O32 and N32.
Now that the 64-bit abi is the only one supported, we
can use the DADD* instructions directly.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agotcg/mips: Remove support for 32-bit hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:08 +0000 (21:52 +0200)] 
tcg/mips: Remove support for 32-bit hosts

32-bit host support is deprecated since commit 6d701c9bac1
("meson: Deprecate 32-bit host support"), released as v10.0.
The next release being v10.2, we can remove the TCG backend
for 32-bit MIPS hosts.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-6-philmd@linaro.org>

6 weeks agotcg/mips: Remove support for O32 and N32 ABIs
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:07 +0000 (21:52 +0200)] 
tcg/mips: Remove support for O32 and N32 ABIs

See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-5-philmd@linaro.org>

6 weeks agokvm/mips: Remove support for 32-bit hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:09 +0000 (21:52 +0200)] 
kvm/mips: Remove support for 32-bit hosts

See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-7-philmd@linaro.org>

6 weeks agobuildsys: Remove support for 32-bit MIPS hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:10 +0000 (21:52 +0200)] 
buildsys: Remove support for 32-bit MIPS hosts

Stop detecting 32-bit MIPS host as supported, update the
deprecation document. See previous commit for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-8-philmd@linaro.org>

6 weeks agogitlab: Stop cross-testing for 32-bit MIPS hosts
Philippe Mathieu-Daudé [Thu, 9 Oct 2025 19:52:05 +0000 (21:52 +0200)] 
gitlab: Stop cross-testing for 32-bit MIPS hosts

32-bit host support is deprecated since commit 6d701c9bac1
("meson: Deprecate 32-bit host support"). Next commits will
remove support for 32-bit MIPS hosts. Stop cross-building
QEMU on our CI.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251009195210.33161-3-philmd@linaro.org>

6 weeks agoMerge tag 'pull-request-2025-10-16' of https://gitlab.com/thuth/qemu into staging
Richard Henderson [Thu, 16 Oct 2025 19:27:12 +0000 (12:27 -0700)] 
Merge tag 'pull-request-2025-10-16' of https://gitlab.com/thuth/qemu into staging

* Improve cache handling for the msys2 CI and the functional asset cache
* Clean ups for some minor issues in functional tests
* Don't ignore errors of address_space_rw in s390x MMU code

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmjxHGwRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbUSDw//dSoNzE+qqJ2EWIfzHN/N7iDRf4OWQY6X
# 12S7zfcBt0W7RESf6JGy0h3cwDcyUxhB7UtC9rvT8cYPFhun+7T07H72/Se+95+a
# d3Yih1HHfYKYN6Zl3DAzUfSUvLBorYI76Ab5yeTs5nCg3ewK6IWPvMA9pS+4P2Pj
# iLY+ycflsGd36tHrJbR/G0cda5p6jaxDzpLh/d+D7hh3XoeS+PZv2xeknsDvJlOs
# ykIrrB+XJ8x81NxAFdA3PSeEh7VU5IzVv+t9hSJiBdi98/dAzwfQdH6bTekA8JL0
# pzfT4A5cwoIEHg5yCqsAllG6+sa6RaVzt6tDeRw4UKFeUP33zFXCoVurUygR1TP7
# Bs7E4E4HbXDgSWvd/UFNtE+4MdYicwP/1qBootnJXc4/v8cFEZBVdOlnsLXDmg1S
# qPr4ITAQDE3LEq4vXITKLmUIZehLG2K6N32XalnK9XrQD6Flcvr1BwDepFAP9Gku
# zmQMkeES1F2MhGMtxPwAxWIMfqsRtaPNWGqH4tSlnBYslwqPWwz+XLDGKlUsPpV/
# kXV/TKkeE/bb0DO7WoLFaw3Q5F+Mdj6C0B2cevKVGCurH4wGLRLaIhzGl8J6ZSDH
# Lve4Fc3BvMMO3CFYezaRQcEls+w4cXkOtSTZNwame1Wk7cUiqq+ElmFttYSl4FSC
# WKyZHtapq1U=
# =Ml5x
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 16 Oct 2025 09:25:16 AM PDT
# 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-10-16' of https://gitlab.com/thuth/qemu:
  target/s390x/mmu_helper: Do not ignore address_space_rw() errors
  target/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic
  tests/functional: ensure GDB client is stopped on error
  tests/functional: remove use of getLogger in reverse debuging
  tests/functional/alpha: Remove superfluous fetch() line from the clipper test
  tests: Evict stale files in the functional download cache after a while
  tests/functional: Set current time stamp of assets when using them
  gitlab: purge msys pacman cache
  tests/functional/aarch64: Drop some sbsaref_alpine tests
  python/qemu: Replace some remaining "avocados" with "functional tests"

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agoMerge tag 'single-binary-20251016' of https://github.com/philmd/qemu into staging
Richard Henderson [Thu, 16 Oct 2025 19:26:50 +0000 (12:26 -0700)] 
Merge tag 'single-binary-20251016' of https://github.com/philmd/qemu into staging

Various patches related to single binary work:

- Remove some VMSTATE_UINTTL() uses
- Replace target_ulong by vaddr / hwaddr / uint[32,64]_t
- Expand TCGv to TCGv_i32 for 32-bit targets
- Remove some unnecessary checks on TARGET_LONG_BITS
- Replace few HOST_BIG_ENDIAN preprocessor #ifdef by compile-time if() check
- Expand MO_TE to either MO_BE or MO_LE

Also:

- Remove legacy cpu_physical_memory_*() calls
- Fix HPPA FMPYADD opcode
- Unify Clément Mathieu--Drif email addresses

# -----BEGIN PGP SIGNATURE-----
#
# iQIyBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmjxCqIACgkQ4+MsLN6t
# wN5WLw/4yIeURXeqHkcys8bF6ysBFUlPvqJqz7+hmHEkQUI8NoOrcORCp82qxWVI
# FvVOPXhkNbEEh2qp7a2bDWDB0hs3xtX2NcR7d1Vh1cXfXHKwidJiXuhRvdsNKiFf
# SmZbXU/Hf212zANPqvPhrz+xR6IDeE5N1gcf6EI0C4peEp0UKwRPtalOnCApK5zo
# hZsp6Kmdbt8hd/jnlufPyeCClXCQaCxi4Ptv9F4+Ti1TcHv0xAP0xYkIBHeO8Z5r
# hxDk96IjJh6YxsH+bmjCdTsJtUiFbkvbkEP6jDkXCeQf9Q58sW8AG4wxVqcoVuHL
# QVT4BvUBSUFwArcgCCJNqjcsv5ZAtdZCXqHGcIQsz+Tr+I/VJ/LEKGtP7IoZNhcL
# 5aHpftT5ZUUgxd/rEkNe9wlJQIeX2w/RCAYWDcxz2ZG3CTv5FBzzwYG/r/akDhkm
# NrhBA99amKEKiS7oVuA9cd2tMbtQJiXxElOekgsTnU758RRzCT8WdYImoBeaGGMf
# Ahk/yaRxmWXR4rvucCNOhUGZkJICmrAvV9snypxiCD1tSuxXsuPY7pgSETkSTPFA
# xB3YFgz2ksw2zv/+Le1JBPjDixfN3CVouP5gR8XX8z9K6y7v87+bnZI0CCeayLao
# mRgeCHD1E0WBDsVV9yi9TnbzDF6SfNZP9XYcSHomrNt9qY0xcQ==
# =M9X9
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 16 Oct 2025 08:09:22 AM PDT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [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: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'single-binary-20251016' of https://github.com/philmd/qemu: (79 commits)
  mailmap: Unify Clément Mathieu--Drif emails
  linux-user/microblaze: Fix little-endianness binary
  target/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state()
  target/xtensa: Remove target_ulong use in xtensa_tr_translate_insn()
  target/xtensa: Replace legacy cpu_physical_memory_[un]map() calls
  target/tricore: Expand TCGv type for 32-bit target
  target/tricore: Un-inline various helpers
  target/tricore: Pass DisasContext as first argument
  target/tricore: Expand TCG helpers for 32-bit target
  target/tricore: Inline tcg_gen_ld32u_tl()
  target/tricore: Declare registers as TCGv_i32
  target/tricore: Replace target_ulong -> uint32_t in op_helper.c
  target/tricore: Remove unnecessary cast to target_ulong
  target/tricore: Remove target_ulong use in gen_addi_d()
  target/tricore: Remove target_ulong use in translate_insn() handler
  target/tricore: Replace target_ulong -> vaddr with tlb_fill() callees
  target/tricore: Remove target_ulong use in gen_goto_tb()
  target/sparc: Reduce inclusions of 'exec/cpu-common.h'
  target/sh4: Remove target_ulong use in gen_goto_tb()
  target/sh4: Use vaddr type for TLB virtual addresses
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 weeks agotarget/s390x/mmu_helper: Do not ignore address_space_rw() errors
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 14:14:09 +0000 (16:14 +0200)] 
target/s390x/mmu_helper: Do not ignore address_space_rw() errors

If a address_space_rw() call ever fails, break the loop and
return the PGM_ADDRESSING error (after triggering an access
exception).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251008141410.99865-3-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
6 weeks agotarget/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 14:14:08 +0000 (16:14 +0200)] 
target/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic

In order to simplify the next commit, move the
trigger_access_exception() call after the address_space_rw()
calls. No logical change intended.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251008141410.99865-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
6 weeks agotests/functional: ensure GDB client is stopped on error
Daniel P. Berrangé [Tue, 14 Oct 2025 14:00:47 +0000 (15:00 +0100)] 
tests/functional: ensure GDB client is stopped on error

If the reverse_debugging_run method fails, the GDB client will not
be closed resulting in python complaining about resource leaks.
Hoisting the GDB client creation into the caller allows this to
be cleaned up easily. While doing this, also move the VM shutdown
call to match.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20251014140047.385347-3-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
6 weeks agotests/functional: remove use of getLogger in reverse debuging
Daniel P. Berrangé [Tue, 14 Oct 2025 14:00:46 +0000 (15:00 +0100)] 
tests/functional: remove use of getLogger in reverse debuging

This fixes the gap left by

  commit 8a44d8c2ac0921c8064fbfd00ef28e3a2588918e
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Fri Sep 12 19:22:00 2025 +0100

    tests/functional: use self.log for all logging

ensuring that log message from the reverse debugging test actually
make it into the logfile on disk.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20251014140047.385347-2-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
6 weeks agotests/functional/alpha: Remove superfluous fetch() line from the clipper test
Thomas Huth [Fri, 10 Oct 2025 14:45:25 +0000 (16:45 +0200)] 
tests/functional/alpha: Remove superfluous fetch() line from the clipper test

The kernel asset is retrieved automatically via the uncompress()
line below the fetch(), so the fetch() is simply not necessary here.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251010144525.842462-1-thuth@redhat.com>

6 weeks agotests: Evict stale files in the functional download cache after a while
Thomas Huth [Tue, 14 Oct 2025 08:34:24 +0000 (10:34 +0200)] 
tests: Evict stale files in the functional download cache after a while

The download cache of the functional tests is currently only growing.
But sometimes tests get removed or changed to use different assets,
thus we should clean up the stale old assets after a while when they
are not in use anymore. So add a script that looks at the time stamps
of the assets and removes them if they haven't been touched for more
than half of a year. Since there might also be some assets around that
have been added to the cache before we added the time stamp files,
assume a default time stamp that is close to the creation date of this
patch, so that we don't delete these files too early (so we still have
all assets around in case we have to bisect an issue in the recent past
of QEMU).

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251014083424.103202-3-thuth@redhat.com>

6 weeks agotests/functional: Set current time stamp of assets when using them
Thomas Huth [Tue, 14 Oct 2025 08:34:23 +0000 (10:34 +0200)] 
tests/functional: Set current time stamp of assets when using them

We are going to remove obsolete assets from the cache, so keep
the time stamps of the assets that we use up-to-date to have a way
to detect stale assets later.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251014083424.103202-2-thuth@redhat.com>

6 weeks agogitlab: purge msys pacman cache
Daniel P. Berrangé [Fri, 10 Oct 2025 16:05:45 +0000 (17:05 +0100)] 
gitlab: purge msys pacman cache

For the Windows msys2 CI job we install many packages using pacman
and use the GitLab cache to preserve the pacman cache across CI
runs. While metadata still needs downloading, this avoids pacman
re-downloading packages from msys2 if they have not changed.

The problem is that pacman never automatically purges anything
from its package cache. Thus the GitLab cache is growing without
bound and packing/unpacking the cache is consuming an increasing
amount of time in the CI job.

If we run 'pacman -Sc' /after/ installing our desired package set,
it will purge any cached downloaded packages that are not matching
any installed package.

This will (currently) cap the pacman download cache at approx
256 MB.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20251010160545.144760-1-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
6 weeks agotests/functional/aarch64: Drop some sbsaref_alpine tests
Thomas Huth [Mon, 6 Oct 2025 16:18:50 +0000 (18:18 +0200)] 
tests/functional/aarch64: Drop some sbsaref_alpine tests

test_sbsaref_alpine is one of the longest running test in our testsuite,
because it does a full Linux boot a couple of times, for various different
CPU configurations. That's quite a lot of testing each time, for a rather
small additional test coverage. Thus let's drop some of the tests that don't
provide much in addition to the other ones.

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251006161850.181998-1-thuth@redhat.com>

6 weeks agopython/qemu: Replace some remaining "avocados" with "functional tests"
Thomas Huth [Wed, 8 Oct 2025 13:19:36 +0000 (15:19 +0200)] 
python/qemu: Replace some remaining "avocados" with "functional tests"

The avocado tests have been replaced by the new functional tests,
so also update this in the README.rst files in the python directory
accordingly.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251008131936.71160-1-thuth@redhat.com>

6 weeks agomailmap: Unify Clément Mathieu--Drif emails
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 10:38:19 +0000 (12:38 +0200)] 
mailmap: Unify Clément Mathieu--Drif emails

Do not let git-shortlog make distinction between:

 . Clément Mathieu--Drif
 . Clement Mathieu--Drif
 . CLEMENT MATHIEU--DRIF

as this is the same person.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Message-Id: <20251009070512.8736-3-philmd@linaro.org>

6 weeks agolinux-user/microblaze: Fix little-endianness binary
Philippe Mathieu-Daudé [Mon, 6 Oct 2025 15:36:31 +0000 (17:36 +0200)] 
linux-user/microblaze: Fix little-endianness binary

MicroBlaze CPU model has a "little-endian" property, pointing to
the @endi internal field. Commit c36ec3a9655 ("hw/microblaze:
Explicit CPU endianness") took care of having all MicroBlaze
boards with an explicit default endianness, so later commit
415aae543ed ("target/microblaze: Consider endianness while
translating code") could infer the endianness at runtime from
the @endi field, and not a compile time via the TARGET_BIG_ENDIAN
definition. Doing so, we forgot to make the endianness explicit
on user emulation, so there all CPUs are started with the default
"little-endian=off" value, leading to breaking support for little
endian binaries:

  $ readelf -h ./hello-world-mbel
  ELF Header:
    Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class:                             ELF32
    Data:                              2's complement, little endian

  $ qemu-microblazeel ./hello-world-mbel
  qemu: uncaught target signal 11 (Segmentation fault) - core dumped
  Segmentation fault (core dumped)

Fix by restoring the previous behavior of starting with the
builtin endianness of the binary:

  $ qemu-microblazeel ./hello-world-mbel
  Hello World

Cc: qemu-stable@nongnu.org
Fixes: 415aae543ed ("target/microblaze: Consider endianness while translating code")
Reported-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Message-Id: <20251006173350.17455-1-philmd@linaro.org>

6 weeks agotarget/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:26:50 +0000 (06:26 +0200)] 
target/xtensa: Remove target_ulong use in xtensa_get_tb_cpu_state()

Since commit bb5de52524c ("target: Widen pc/cs_base in
cpu_get_tb_cpu_state"), cpu_get_tb_cpu_state() expects
a uint64_t type for cs_base.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008051529.86378-3-philmd@linaro.org>

6 weeks agotarget/xtensa: Remove target_ulong use in xtensa_tr_translate_insn()
Philippe Mathieu-Daudé [Wed, 8 Oct 2025 04:28:10 +0000 (06:28 +0200)] 
target/xtensa: Remove target_ulong use in xtensa_tr_translate_insn()

Since commit 85c19af63e7 ("include/exec: Use vaddr in DisasContextBase
for virtual addresses") the DisasContextBase::pc_first field is a
vaddr type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20251008051529.86378-2-philmd@linaro.org>

6 weeks agotarget/xtensa: Replace legacy cpu_physical_memory_[un]map() calls
Philippe Mathieu-Daudé [Wed, 1 Oct 2025 10:08:31 +0000 (12:08 +0200)] 
target/xtensa: Replace legacy cpu_physical_memory_[un]map() calls

Commit b7ecba0f6f6 ("docs/devel/loads-stores.rst: Document our
various load and store APIs") mentioned cpu_physical_memory_*()
methods are legacy, the replacement being address_space_*().

Replace the *_map() / *_unmap() methods in the SIMCALL helper,
using the vCPU default address space. No behavioral change expected.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20251002145742.75624-6-philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
6 weeks agotarget/tricore: Expand TCGv type for 32-bit target
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:59:37 +0000 (05:59 +0200)] 
target/tricore: Expand TCGv type for 32-bit target

The TriCore target is only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/tricore-*
  configs/targets/tricore-softmmu.mak:2:TARGET_LONG_BITS=32

Replace:

  TCGv -> TCGv_i32
  tcg_temp_new -> tcg_temp_new_i32

This is a mechanical replacement, adapting style to pass
the checkpatch.pl script.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-13-philmd@linaro.org>

6 weeks agotarget/tricore: Un-inline various helpers
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 04:15:47 +0000 (06:15 +0200)] 
target/tricore: Un-inline various helpers

Rely on the linker to optimize at linking time.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-12-philmd@linaro.org>

6 weeks agotarget/tricore: Pass DisasContext as first argument
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 04:01:38 +0000 (06:01 +0200)] 
target/tricore: Pass DisasContext as first argument

Unify style, always pass DisasContext as the first argument.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-11-philmd@linaro.org>

6 weeks agotarget/tricore: Expand TCG helpers for 32-bit target
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:29:17 +0000 (05:29 +0200)] 
target/tricore: Expand TCG helpers for 32-bit target

The TriCore target is only built as 32-bit:

  $ git grep TARGET_LONG_BITS configs/targets/tricore-*
  configs/targets/tricore-softmmu.mak:2:TARGET_LONG_BITS=32

Therefore tcg_FOO_tl() always expands to tcg_FOO_i32().

This is a mechanical replacement.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-10-philmd@linaro.org>

6 weeks agotarget/tricore: Inline tcg_gen_ld32u_tl()
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:27:59 +0000 (05:27 +0200)] 
target/tricore: Inline tcg_gen_ld32u_tl()

The TriCore target is only built as 32-bit, so tcg_gen_ld32u_tl()
expands to tcg_gen_ld_i32(). Use the latter to simplify the next
commit mechanical change.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-9-philmd@linaro.org>

6 weeks agotarget/tricore: Declare registers as TCGv_i32
Philippe Mathieu-Daudé [Fri, 10 Oct 2025 03:26:56 +0000 (05:26 +0200)] 
target/tricore: Declare registers as TCGv_i32

CPUTriCoreState register are declared as uint32_t since the
target introduction in commit 48e06fe0ed8 ("target-tricore:
Add target stubs and qom-cpu").

Mechanical replacement of:

  TCGv -> TCGv_i32
  tcg_temp_new -> tcg_temp_new_i32

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251010052141.42460-8-philmd@linaro.org>