]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
3 weeks agotarget/s390x: Inline cpu_ld{uw, l}_code() calls in EX opcode helper
Philippe Mathieu-Daudé [Wed, 24 Dec 2025 16:20:32 +0000 (17:20 +0100)] 
target/s390x: Inline cpu_ld{uw, l}_code() calls in EX opcode helper

In preparation of removing the cpu_lduw_code() and cpu_ldl_code()
wrappers, inline them.

Since S390x instructions are always stored in big-endian order,
replace MO_TE -> MO_BE.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251224162036.90404-6-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agotarget/s390x: Replace MO_TE -> MO_BE
Philippe Mathieu-Daudé [Wed, 24 Dec 2025 16:20:31 +0000 (17:20 +0100)] 
target/s390x: Replace MO_TE -> MO_BE

We only build the S390x target using big endianness order,
therefore the MO_TE definitions expand to the big endian
one. Use the latter which is more explicit.

Mechanical change running:

  $ sed -i -e s/MO_TE/MO_BE/ \
        $(git grep -wl MO_TE target/s390x/)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251224162036.90404-5-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agotarget/s390x: Replace gdb_get_regl() -> gdb_get_reg64()
Philippe Mathieu-Daudé [Wed, 24 Dec 2025 16:20:30 +0000 (17:20 +0100)] 
target/s390x: Replace gdb_get_regl() -> gdb_get_reg64()

We only build s390x targets as 64-bit:

  $ git grep BIT configs/targets/s390x-*
  configs/targets/s390x-linux-user.mak:6:TARGET_LONG_BITS=64
  configs/targets/s390x-softmmu.mak:5:TARGET_LONG_BITS=64

Therefore gdb_get_regl() expands to gdb_get_reg64(). Use
the latter which is more explicit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251224162036.90404-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agotarget/s390x: Use explicit big-endian LD/ST API
Philippe Mathieu-Daudé [Wed, 24 Dec 2025 16:20:29 +0000 (17:20 +0100)] 
target/s390x: Use explicit big-endian LD/ST API

The S390x architecture uses big endianness. Directly use
the big-endian LD/ST API.

Mechanical change running:

  $ for a in uw w l q; do \
      sed -i -e "s/ld${a}_p(/ld${a}_be_p(/" \
        $(git grep -wlE '(ld|st)u?[wlq]_p' target/s390x/);
    done

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251224162036.90404-3-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agohw/s390x: Use explicit big-endian LD/ST API
Philippe Mathieu-Daudé [Wed, 24 Dec 2025 16:20:28 +0000 (17:20 +0100)] 
hw/s390x: Use explicit big-endian LD/ST API

The S390x architecture uses big endianness. Directly use
the big-endian LD/ST API.

Mechanical change running:

  $ for a in uw w l q; do \
      sed -i -e "s/ld${a}_p(/ld${a}_be_p(/" \
        $(git grep -wlE '(ld|st)u?[wlq]_p' hw/s390x/);
    done

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20251224162036.90404-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agoMAINTAINERS: Add configs/targets/s390x-softmmu.mak to the S390 general section
Thomas Huth [Thu, 18 Dec 2025 19:47:14 +0000 (20:47 +0100)] 
MAINTAINERS: Add configs/targets/s390x-softmmu.mak to the S390 general section

Make sure that configs/targets/s390x-softmmu.mak is covered by
MAINTAINERS - the "S390 general architecture support" section seems
to be a good place for this.

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

3 weeks agoMAINTAINERS: Add util/s390x_pci_mmio.c to the S390 PCI section
Thomas Huth [Thu, 18 Dec 2025 19:36:42 +0000 (20:36 +0100)] 
MAINTAINERS: Add util/s390x_pci_mmio.c to the S390 PCI section

s390x_pci_mmio.c currently shows up as unmaintained. Add it to
the S390 PCI section to make the right people aware of changes
to this file.

Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251218193642.170968-1-thuth@redhat.com>

3 weeks agohw/s390x: Un-inline the s390_do_cpu_*() functions
Thomas Huth [Wed, 17 Dec 2025 14:42:38 +0000 (15:42 +0100)] 
hw/s390x: Un-inline the s390_do_cpu_*() functions

These functions are only called via their function pointer by using
the run_on_cpu() function, so it does not make sense to declare these
as "inline" functions. Move the functions from cpu.h to either cpu.c
(when they are still used in multiple places), or to s390-virtio-ccw.c
(when they are only called from that file).

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251217144238.37610-1-thuth@redhat.com>

3 weeks agohw: add compat machines for 11.0
Cornelia Huck [Wed, 12 Nov 2025 13:00:31 +0000 (14:00 +0100)] 
hw: add compat machines for 11.0

Add 11.0 machine types for arm/i440fx/m68k/q35/s390x/spapr.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251112130031.2484181-1-cohuck@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agohw/s390x/ccw: Remove deprecated s390-ccw-virtio-5.0 machine
Philippe Mathieu-Daudé [Fri, 17 Oct 2025 13:29:52 +0000 (15:29 +0200)] 
hw/s390x/ccw: Remove deprecated s390-ccw-virtio-5.0 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>
Message-ID: <20251017133002.61410-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 weeks agoMerge tag 'pull-aspeed-20260105' of https://github.com/legoater/qemu into staging
Richard Henderson [Mon, 5 Jan 2026 19:52:47 +0000 (06:52 +1100)] 
Merge tag 'pull-aspeed-20260105' of https://github.com/legoater/qemu into staging

aspeed queue:

* Removed the ast2700-a0 SoC and ast2700a0-evb machine.
* Added SGPIO support to the ast2700 SoC, including unit tests.
* Added several FRU EEPROMs to the Catalina board.
* Added support for the new AST1060 SoC and ast1060-evb machine,
  including functional tests.
* Fixed the silicon revision ID register for AST2600 and AST1030 SoCs.
* Added an SFDP table for a Winbond flash chip.
* Updated documentation for Aspeed boards.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmlbtGMACgkQUaNDx8/7
# 7KGtVBAAgiCDME1oXrc+ZVmYn8RtRsx/lakp4prbqRbs6A8qoITk3ao6WjNd2k3P
# kOkvB/xQCqRDSSJIpp8BQhUzDet80b8KUz16iTw1m7KubMIqapmOxVkGJqSc9kGT
# PfLVjB60rHqiCkInNaaMXxMQuY0iAFKS+SDM8mCGaay0MXdvsEIi+XIcxv2TX0Jo
# tnHMaJxtSKfzY3QiM7yeB+WryzOlzQ7IMqRkai9tCN1y3XyDy8PodelZFCIGXw/N
# tw04Z3q/LhmxT6kjvYLmeTETne+1k69gfME+7JhB1hPSrIgdIqM9qyXCROb0U8/W
# 5mJDkm84blHc4QWITdewiyhIGps9ITxqlIelCExPL1GpEubSg5BVkqFbIjMv+6HJ
# 2XcBbP+rG6IdEpxeT+PcHw5HvOfLjMY6kGrawpK4s2id5jI9GSSyNY5k576tqRzg
# P10GfeKUDNDj1nYhUfOmzL6qXb9TqIyQtOVJVGcHkaASnXIqFvL6rYQHcttFej08
# YepKqvYBBSwsb2TdSb1t6VKTgCublFUD4jdhph3iqVmfQRl3ei8WJHFKCt8aQ235
# HqXzcmBDoTFYqJ97SAg1bvydhVL+rDpd//gcPqVw2cwMnTa2S3zvgI6xj1oBTEf8
# YiRPtFYJ03Y9baNZRdGdYAErxIdiliZh+OYfaEFNNn5Zuqp6tYQ=
# =64bG
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 05 Jan 2026 11:53:55 PM AEDT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [full]
# gpg:                 aka "Cédric Le Goater <clg@kaod.org>" [full]

* tag 'pull-aspeed-20260105' of https://github.com/legoater/qemu: (36 commits)
  hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first
  hw/intc/aspeed: Remove TSP 128 - 138
  hw/intc/aspeed: Remove SSP 128 - 138
  docs/specs/aspeed-intc: Remove GIC 128 - 136
  hw/intc/aspeed: Remove GIC 128 - 136
  hw/arm/aspeed_ast27x0: Remove ast2700-a0 SOC
  hw/arm: Remove ast2700a0-evb machine
  tests/functional: Fix URL of gb200nvl-bmc image
  test/qtest: Add Unit test for Aspeed SGPIO
  hw/arm/aspeed_ast27x0: Wire SGPIO controller to AST2700 SoC
  hw/arm/aspeed_soc: Update Aspeed SoC to support two SGPIO controllers
  hw/gpio/aspeed_sgpio: Implement SGPIO interrupt handling
  hw/gpio/aspeed_sgpio: Add QOM property accessors for SGPIO pins
  hw/gpio/aspeed_sgpio: Add basic device model for Aspeed SGPIO
  hw/arm/aspeed: catalina: add Cable Cartridge FRU EEPROM
  hw/arm/aspeed: catalina: add NIC FRU EEPROM
  hw/arm/aspeed: catalina: add HMC FRU EEPROM
  hw/arm/aspeed: catalina: add GB200-IO FRU EEPROM
  hw/arm/aspeed: catalina: add GB200 FRU EEPROM
  hw/arm/aspeed: catalina: add HDD FRU EEPROM
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
3 weeks agohw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first
Jamin Lin [Fri, 2 Jan 2026 09:07:45 +0000 (17:07 +0800)] 
hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first

In the previous design, the I2C model would update I2CC_DMA_LEN (0x54) based on
the value of I2CM_DMA_LEN (0x1C) when the firmware set either I2CM_DMA_TX_ADDR
(0x30) or I2CM_DMA_RX_ADDR (0x34). However, this only worked correctly if the
firmware set I2CM_DMA_LEN before setting I2CM_DMA_TX_ADDR or I2CM_DMA_RX_ADDR.

If the firmware instead set I2CM_DMA_TX_ADDR or I2CM_DMA_RX_ADDR before setting
I2CM_DMA_LEN, the value written to I2CC_DMA_LEN would be incorrect.

To fix this issue, the model should be updated to set I2CC_DMA_LEN when the
firmware writes to the I2CM_DMA_LEN register, rather than when it writes to the
I2CM_DMA_RX_ADDR and I2CM_DMA_TX_ADDR registers.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Fixes: ba2cccd64e90 ("aspeed: i2c: Add new mode support")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260102090746.1130033-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/intc/aspeed: Remove TSP 128 - 138
Jamin Lin [Fri, 2 Jan 2026 09:07:44 +0000 (17:07 +0800)] 
hw/intc/aspeed: Remove TSP 128 - 138

The SSP interrupts 128 - 138 were only used by the AST2700 A0 SoC.
Since the AST2700 A0 has been deprecated, these interrupt
definitions are no longer needed. This commit removes them to
clean up the codebase.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260102090746.1130033-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/intc/aspeed: Remove SSP 128 - 138
Jamin Lin [Fri, 2 Jan 2026 09:07:43 +0000 (17:07 +0800)] 
hw/intc/aspeed: Remove SSP 128 - 138

The SSP interrupts 128 - 138 were only used by the AST2700 A0 SoC.
Since the AST2700 A0 has been deprecated, these interrupt
definitions are no longer needed. This commit removes them to
clean up the codebase.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260102090746.1130033-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agodocs/specs/aspeed-intc: Remove GIC 128 - 136
Jamin Lin [Mon, 1 Sep 2025 04:08:07 +0000 (12:08 +0800)] 
docs/specs/aspeed-intc: Remove GIC 128 - 136

The GIC interrupts 128 - 136 were only used by the AST2700 A0 SoC.
Since the AST2700 A0 has been deprecated, these interrupt
definitions are no longer needed. This commit removes them to
clean up the codebase.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250901040808.1454742-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/intc/aspeed: Remove GIC 128 - 136
Jamin Lin [Mon, 1 Sep 2025 04:08:06 +0000 (12:08 +0800)] 
hw/intc/aspeed: Remove GIC 128 - 136

The GIC interrupts 128 - 136 were only used by the AST2700 A0 SoC.
Since the AST2700 A0 has been deprecated, these interrupt
definitions are no longer needed. This commit removes them to
clean up the codebase.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250901040808.1454742-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast27x0: Remove ast2700-a0 SOC
Jamin Lin [Mon, 1 Sep 2025 04:08:05 +0000 (12:08 +0800)] 
hw/arm/aspeed_ast27x0: Remove ast2700-a0 SOC

The ast2700-a1 SOC represented the first revision of the AST2700 and
was intended as an early engineering sample rather than a production
platform. A newer revision, A1, is now supported, and the ast2700-a1
SOC should replace the older A0 version.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250901040808.1454742-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm: Remove ast2700a0-evb machine
Jamin Lin [Mon, 1 Sep 2025 04:08:04 +0000 (12:08 +0800)] 
hw/arm: Remove ast2700a0-evb machine

The ast2700a0-evb machine represents the first revision of the AST2700 and
serves as the initial engineering sample rather than a production version.
A newer revision, A1, is now supported, and the ast2700a1-evb should replace
the older A0 version.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250901040808.1454742-2-jamin_lin@aspeedtech.com
[ clg: Updated docs/about/removed-features.rst ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agotests/functional: Fix URL of gb200nvl-bmc image
Cédric Le Goater [Mon, 22 Dec 2025 07:33:51 +0000 (08:33 +0100)] 
tests/functional: Fix URL of gb200nvl-bmc image

Commit [1] moved the FW image of the gb200nvl-bmc machine and broke
the associated functional test. Fix that.

[1] https://github.com/legoater/qemu-aspeed-boot/commit/52451b2472eeb40aa97e131aeea327e9d4a8a78a

Cc: Ed Tanous <etanous@nvidia.com>
Cc: Patrick Williams <patrick@stwcx.xyz>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20251222073351.166720-1-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agotest/qtest: Add Unit test for Aspeed SGPIO
Yubin Zou [Fri, 19 Dec 2025 07:04:19 +0000 (07:04 +0000)] 
test/qtest: Add Unit test for Aspeed SGPIO

This commit introduces a new qtest for the Aspeed SGPIO controller
The test covers the following:
  - Setting and clearing SGPIO output pins and verifying the pin state.
  - Setting and clearing SGPIO input pins and verifying the pin state.
  - Verifying that level-high interrupts are correctly triggered and cleared.

Signed-off-by: Yubin Zou <yubinz@google.com>
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20251219-aspeed-sgpio-v5-6-fd5593178144@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast27x0: Wire SGPIO controller to AST2700 SoC
Yubin Zou [Fri, 19 Dec 2025 07:04:18 +0000 (07:04 +0000)] 
hw/arm/aspeed_ast27x0: Wire SGPIO controller to AST2700 SoC

This commit integrates the Aspeed SGPIO controller into the AST2700

Signed-off-by: Yubin Zou <yubinz@google.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251219-aspeed-sgpio-v5-5-fd5593178144@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_soc: Update Aspeed SoC to support two SGPIO controllers
Yubin Zou [Fri, 19 Dec 2025 07:04:17 +0000 (07:04 +0000)] 
hw/arm/aspeed_soc: Update Aspeed SoC to support two SGPIO controllers

This commit updates the Aspeed SoC model to support two SGPIO
controllers, reflecting the hardware capabilities of the AST2700

The memory map and interrupt map are updated to include entries for
two SGPIO controllers (SGPIOM0 and SGPIOM1). This change is a
prerequisite for the full implementation of the SGPIO device model.

Signed-off-by: Yubin Zou <yubinz@google.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251219-aspeed-sgpio-v5-4-fd5593178144@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/gpio/aspeed_sgpio: Implement SGPIO interrupt handling
Yubin Zou [Fri, 19 Dec 2025 07:04:16 +0000 (07:04 +0000)] 
hw/gpio/aspeed_sgpio: Implement SGPIO interrupt handling

The SGPIO controller can generate interrupts based on various pin state
changes, such as rising/falling edges or high/low levels. This change
adds the necessary logic to detect these events, update the interrupt
status registers, and signal the interrupt to the SoC.

Signed-off-by: Yubin Zou <yubinz@google.com>
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20251219-aspeed-sgpio-v5-3-fd5593178144@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/gpio/aspeed_sgpio: Add QOM property accessors for SGPIO pins
Yubin Zou [Fri, 19 Dec 2025 07:04:15 +0000 (07:04 +0000)] 
hw/gpio/aspeed_sgpio: Add QOM property accessors for SGPIO pins

The `aspeed_sgpio_get_pin` and `aspeed_sgpio_set_pin` functions are
implemented to get and set the level of individual SGPIO pins. These
are then exposed as boolean properties on the SGPIO device object.

Signed-off-by: Yubin Zou <yubinz@google.com>
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20251219-aspeed-sgpio-v5-2-fd5593178144@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/gpio/aspeed_sgpio: Add basic device model for Aspeed SGPIO
Yubin Zou [Fri, 19 Dec 2025 07:04:14 +0000 (07:04 +0000)] 
hw/gpio/aspeed_sgpio: Add basic device model for Aspeed SGPIO

This initial implementation includes the basic device structure,
memory-mapped register definitions, and read/write handlers for the
SGPIO control registers.

Signed-off-by: Yubin Zou <yubinz@google.com>
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20251219-aspeed-sgpio-v5-1-fd5593178144@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add Cable Cartridge FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:38 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add Cable Cartridge FRU EEPROM

Use ipmitool/frugen tool to generate a Cable Cart image based on a
sanitized set of data from a real device EEPROM.  The EEPROM
bus/address did not match device tree for one of the EEPROMs so move
it from bus 13 / 55 to bus 12 / 54.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-11-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add NIC FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:37 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add NIC FRU EEPROM

Use ipmitool/frugen tool to generate a CX-7 NIC image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-10-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add HMC FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:36 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add HMC FRU EEPROM

Use ipmitool/frugen tool to generate a HMC image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-9-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add GB200-IO FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:35 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add GB200-IO FRU EEPROM

Use ipmitool/frugen tool to generate a GB200-IO image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-8-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add GB200 FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:34 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add GB200 FRU EEPROM

Use ipmitool/frugen tool to generate a GB200 image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-7-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add HDD FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:33 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add HDD FRU EEPROM

Use ipmitool/frugen tool to generate a HDD image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-6-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add FIO FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:32 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add FIO FRU EEPROM

Use ipmitool/frugen tool to generate an FIO image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-5-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add OSFP FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:31 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add OSFP FRU EEPROM

Use ipmitool/frugen tool to generate an OSFP image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-4-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add PDB FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:30 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add PDB FRU EEPROM

Use ipmitool/frugen tool to generate a PDB image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-3-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add DC-SCM FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:29 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add DC-SCM FRU EEPROM

Use ipmitool/frugen tool to generate a DC-SCM image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-2-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed: catalina: add BSM FRU EEPROM
Patrick Williams [Wed, 17 Dec 2025 19:11:28 +0000 (14:11 -0500)] 
hw/arm/aspeed: catalina: add BSM FRU EEPROM

Use ipmitool/frugen tool to generate a BSM image based on a
sanitized set of data from a real device EEPROM.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251217-catalina-eeproms-v1-1-dc7b276efd57@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agodocs/system/arm/aspeed: Update Aspeed MiniBMC section to include AST1060 processor
Jamin Lin [Wed, 12 Nov 2025 03:05:49 +0000 (11:05 +0800)] 
docs/system/arm/aspeed: Update Aspeed MiniBMC section to include AST1060 processor

Added details describing AST1060 as a Platform Root of Trust processor board alongside
AST1030 MiniBMC, and extended the list of missing devices to include
SMBus Filter and QSPI Monitor controllers.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-13-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agodocs/system/arm/aspeed: Update Aspeed and 2700 family boards list
Jamin Lin [Wed, 12 Nov 2025 03:05:48 +0000 (11:05 +0800)] 
docs/system/arm/aspeed: Update Aspeed and 2700 family boards list

Remove the ast2700-evb entry from the Aspeed family boards list in
the documentation. The AST2700 platform now belongs to the new Aspeed
2700 family group, which has its own dedicated documentation section
and board definitions.

Update the Aspeed 2700 family boards list in the documentation to include
the new ast2700fc board entry.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-12-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agotests/functional/arm/test_aspeed_ast1060: Add functional tests for Aspeed AST1060 SoC
Jamin Lin [Wed, 12 Nov 2025 03:05:47 +0000 (11:05 +0800)] 
tests/functional/arm/test_aspeed_ast1060: Add functional tests for Aspeed AST1060 SoC

Add functional tests for the Aspeed AST1060 SoC and its evaluation board.
The new test test_aspeed_ast1060.py validates booting the AST1060 EVB
machine using the Zephyr OS and ASPEED PROT application (ast1060_prot_v03.02.tgz)
and ensures basic console functionality.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-11-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast10x0_evb: Add AST1060 EVB machine support
Jamin Lin [Wed, 12 Nov 2025 03:05:46 +0000 (11:05 +0800)] 
hw/arm/aspeed_ast10x0_evb: Add AST1060 EVB machine support

Add a new machine definition ast1060-evb to support the Aspeed AST1060
evaluation board. The new EVB reuses the same MiniBMC framework used by
AST1030, as both SoCs share the same core peripherals and controller
designs.

The AST1060 EVB machine initializes the ast1060-a2 SoC and sets the
FMC and SPI flash models (w25q80bl and w25q02jvm) for simulation.
This enables QEMU to boot and emulate firmware images for AST1060-based
platforms.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-10-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast10x0: Add AST1060 SoC support
Jamin Lin [Wed, 12 Nov 2025 03:05:45 +0000 (11:05 +0800)] 
hw/arm/aspeed_ast10x0: Add AST1060 SoC support

Add initial support for the Aspeed AST1060 SoC. The AST1060 reuses most
of the AST1030 peripheral device models, as the two SoCs share nearly
the same controllers including WDT, SCU, TIMER, HACE, ADC, I2C, FMC,
and SPI.

A new common initialization and realization framework (ast10x0_init
and ast10x0_realize) is leveraged so AST1060 can instantiate the
existing AST1030 models without redefining duplicate device types.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast10x0: Pass SoC name to common init for AST10x0 family reuse
Jamin Lin [Wed, 12 Nov 2025 03:05:44 +0000 (11:05 +0800)] 
hw/arm/aspeed_ast10x0: Pass SoC name to common init for AST10x0 family reuse

Refactor the AST10x0 common initialization to accept a socname
parameter.

The AST1030 model can be reused by AST1060 since they share most of the
same controllers. This approach allows AST1060 to leverage the existing
AST1030 initialization flow while keeping separate SoC-specific init
functions for components that differ.

This prepares the framework for AST1060 support, allowing it to reuse
AST1030 device models and initialization flow without code duplication.

No functional changes.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast10x0: Add common realize function for AST10x0 SoCs
Jamin Lin [Wed, 12 Nov 2025 03:05:43 +0000 (11:05 +0800)] 
hw/arm/aspeed_ast10x0: Add common realize function for AST10x0 SoCs

Introduce a new common realize function aspeed_soc_ast10x0_realize()
for AST10x0 series SoCs. The shared initialization and realization logic
is now placed in this common function to improve code reuse and reduce
duplication between different SoCs in the same family.

The AST1030 realization function aspeed_soc_ast1030_realize() is
updated to call the new common routine and then perform realization of
its own specific devices such as LPC and PECI, which are not present on
future SoCs like AST1060.

This refactor simplifies maintenance and prepares the framework for
adding AST1060 support.

No functional changes.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/arm/aspeed_ast10x0: Add common init function for AST10x0 SoCs
Jamin Lin [Wed, 12 Nov 2025 03:05:42 +0000 (11:05 +0800)] 
hw/arm/aspeed_ast10x0: Add common init function for AST10x0 SoCs

Introduce a new common initialization function
aspeed_soc_ast10x0_init() for AST10x0 series SoCs. This separates the
shared initialization logic from the AST1030-specific part, allowing
reuse by future SoCs such as AST1060.

The AST1060 does not include the LPC and PECI models, so the common
initializer is used for all shared modules, while
aspeed_soc_ast1030_init() adds initialization of LPC and PECI, which
are unique to AST1030.

This refactor improves code reuse and prepares the codebase for
supporting the AST1060 platform.

No functional changes.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohhw/misc/aspeed_scu: Add AST1060 A2 silicon revision definition
Jamin Lin [Wed, 12 Nov 2025 03:05:41 +0000 (11:05 +0800)] 
hhw/misc/aspeed_scu: Add AST1060 A2 silicon revision definition

Add a new silicon revision constant AST1060_A2_SILICON_REV for the
AST1060 SoC. This allows the SCU model and related SoC layers to
identify and handle AST1060 A2 revision properly in the same way as
other Aspeed SoC families.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/misc/aspeed_scu: Fix the revision ID cannot be set in the SOC layer for AST2600...
Jamin Lin [Wed, 12 Nov 2025 03:05:40 +0000 (11:05 +0800)] 
hw/misc/aspeed_scu: Fix the revision ID cannot be set in the SOC layer for AST2600 and AST1030

According to the design of the AST2600, it has a Silicon Revision ID
Register, specifically SCU004 and SCU014, to set the Revision ID for the
AST2600. For the AST2600 A3, SCU004 is set to 0x05030303 and SCU014 is
set to 0x05030303.

In the "aspeed_ast2600_scu_reset" function, the hardcoded value
"AST2600_A3_SILICON_REV" was used for SCU004, while "s->silicon_rev" was
used for SCU014. The value of "s->silicon_rev" is set by the SoC layer
via the "silicon-rev" property. This patch aligns both SCU004 and SCU014
to use "s->silicon_rev" for consistency and flexibility.

Similarly, the "aspeed_ast1030_scu_reset" function also used a fixed
revision constant ("AST1030_A1_SILICON_REV"). This change updates it to
use the same "s->silicon_rev" property, ensuring that both SoCs follow
a consistent and configurable revision handling mechanism.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agohw/block/m25p80: Add SFDP table for Winbond W25Q02JVM flash
Jamin Lin [Wed, 12 Nov 2025 03:05:39 +0000 (11:05 +0800)] 
hw/block/m25p80: Add SFDP table for Winbond W25Q02JVM flash

Add the SFDP data table for Winbond W25Q02JVM flash device. The table
was generated under Linux kernel by dumping the SFDP content using
the following command:

```
hexdump -v -e '8/1 "0x%02x, " "\n"' \
    /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
```

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20251112030553.291734-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 weeks agoMerge tag 'pull-hex-20260102' of https://github.com/quic/qemu into staging
Richard Henderson [Sun, 4 Jan 2026 20:35:40 +0000 (07:35 +1100)] 
Merge tag 'pull-hex-20260102' of https://github.com/quic/qemu into staging

Bypass packet commit for implicit usr write; cleanup

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEPWaq5HRZSCTIjOD4GlSvuOVkbDIFAmlYJAgACgkQGlSvuOVk
# bDIQOg//TmXIRWGHuwL8jwtDDktyj0w5FVh3yA+i7Yx7fuoui/h1cwKc0LkSmx71
# m4JLvgDCqYsxh0DKmR3qadUnt4dNKUkMIdvpyqN/uBVzxyepfgTAOBXn6LAISHtr
# P5ObIbB72E0G/L3qwvEJuawcY/eCgpEU5laiBmfGyka8h8bvc0zD9M3VLzSOm28e
# XUAhR1WOd7IY0AAwYrHzCH0x+OjqY8xi8q5t5UDr1TA2ZL8mqwJuuUfO4QdTNPio
# QTump+kqN3PcmWHnKzqs/IJVQOi9vi7JN/8S6JsiLwpL3/PhKk7y8b9a5NWO6mHs
# 4W9SRa0Wy+lxkhNXSjUkVD7NqMre8fAYvl0jYWpj09Z7sm71Y3A+aIWllm70/vzK
# NnZutZp+DXGbqZalwRK3ON7csCfBehPLfr4ru2Kwo1GNZbQx5KR+TMc/CuVihCYl
# owFR0aG94xyfhpBrUXLcyqmjRb2MmMt0LrFbjOXOhy+fmFhw/NrxMsmTDXBEuAB1
# HpqjizcLNobRwIxI+vvp8cTdP0uL3oKrn0CcppI689n+Qvp4TnC6WTzAqA7UJaCJ
# WPWCSGmPBNDo1IsnoYBuPEH1po6tuesmJdsNWQPdfO14JA0NAAWsH7W+Ow14jQaf
# WG1WMvMph/m2wc7JbeZe5cujUxQ2Jj+CvjnjAaMRR8X6ndzk33k=
# =GJil
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 03 Jan 2026 07:01:12 AM AEDT
# 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-20260102' of https://github.com/quic/qemu:
  Hexagon (target/hexagon) s/log_write/gen_write
  Hexagon (target/hexagon) s/gen_log_vreg_write/gen_vreg_write
  Hexagon (target/hexagon) s/gen_log_pred_write/gen_pred_write
  Hexagon (target/hexagon) Remove gen_log_reg_write
  Hexagon (target/hexagon) analyze all reads before writes
  Hexagon (tests/tcg/hexagon) Add test for USR changes in packet
  Hexagon (target/hexagon) Implicit writes to USR don't force packet commit
  Hexagon (target/hexagon) Add pkt_need_commit argument to arch_fpop_end
  Hexagon (target/hexagon) Remove gen_tcg_func_table.py

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 weeks agoHexagon (target/hexagon) s/log_write/gen_write
Taylor Simpson [Fri, 14 Nov 2025 23:00:13 +0000 (16:00 -0700)] 
Hexagon (target/hexagon) s/log_write/gen_write

These functions don't "log" anything, they just generate the write

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) s/gen_log_vreg_write/gen_vreg_write
Taylor Simpson [Fri, 14 Nov 2025 23:00:12 +0000 (16:00 -0700)] 
Hexagon (target/hexagon) s/gen_log_vreg_write/gen_vreg_write

Note there are two functions impacted
    gen_log_vreg_write          -> gen_vreg_write
    gen_log_vreg_write_pair     -> gen_vreg_write_pair
These functions don't "log" anything, they just generate the write

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) s/gen_log_pred_write/gen_pred_write
Taylor Simpson [Fri, 14 Nov 2025 23:00:11 +0000 (16:00 -0700)] 
Hexagon (target/hexagon) s/gen_log_pred_write/gen_pred_write

The function doesn't "log" anything, it just generates the write

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) Remove gen_log_reg_write
Taylor Simpson [Fri, 14 Nov 2025 23:00:10 +0000 (16:00 -0700)] 
Hexagon (target/hexagon) Remove gen_log_reg_write

The gen_log_reg_write function is a memnant of the original Hexagon
target design.  With the addition of gen_analyze_funcs.py and the
ability to short-circuit a packet commit, this function can be
removed.

Note that the implementation of gen_log_reg_write contains a check
of the register mutability mask.  This is only needed for control
registers, so we move it to gen_write_ctrl_reg.

We do need the gen_log_reg_write_pair function, but the name is
now misleading, so we change the name go gen_write_reg_pair.

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) analyze all reads before writes
Taylor Simpson [Tue, 25 Mar 2025 02:14:40 +0000 (20:14 -0600)] 
Hexagon (target/hexagon) analyze all reads before writes

I noticed that analyze_packet is marking the implicit pred reads after
marking all the writes.  However, the semantics of the instrucion and
packet are to do all the reads, then do the operation, then do all the
writes.

Here is the old code
static void analyze_packet(DisasContext *ctx)
{
    Packet *pkt = ctx->pkt;
    ctx->read_after_write = false;
    ctx->has_hvx_overlap = false;
    for (int i = 0; i < pkt->num_insns; i++) {
        Insn *insn = &pkt->insn[i];
        ctx->insn = insn;
        if (opcode_analyze[insn->opcode]) {
            opcode_analyze[insn->opcode](ctx);
        }
        mark_implicit_reg_writes(ctx);
        mark_implicit_pred_writes(ctx);
        mark_implicit_pred_reads(ctx);
    }

    ctx->need_commit = need_commit(ctx);
}

Recall that opcode_analyze[insn->opcode](ctx) will mark all the
explicit reads then all the explicit writes.

To properly handle the semantics, we'll create two new functions
    mark_implicit_reads
    mark_implicit_writes
Then we change gen_analyze_funcs.py to add a call to the former
after all the explicit reads and a call to the latter after all
the explicit_writes.

The reason this is an RFC patch is I can't find any instructions
where this distinction makes a difference in ctx->need_commit which
determines if the packet commit can be short-circuited.  However, this
could change in the future if the architecture introduces an
instruction with an implicit read of a register that is also written
(either implicit or explicit).  Then, anlayze_packet would detect
a read-after-write, and the packet would not short-circuit.  The
execution would be correct, but the performance would not be optimal.

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Tested-by: Brian Cain <brian.cain@oss.qualcomm.com>
Message-Id: <20250325021440.81386-1-ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (tests/tcg/hexagon) Add test for USR changes in packet
Taylor Simpson [Wed, 5 Nov 2025 21:25:54 +0000 (14:25 -0700)] 
Hexagon (tests/tcg/hexagon) Add test for USR changes in packet

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) Implicit writes to USR don't force packet commit
Taylor Simpson [Wed, 5 Nov 2025 21:25:53 +0000 (14:25 -0700)] 
Hexagon (target/hexagon) Implicit writes to USR don't force packet commit

Implicit writes to USR are only to specific fields of USR to indicate
side effects (e.g., saturation overflow, floating point status).
In these cases, we don't force a packet commit. This will allow more
packets to be short-circuited (avoid writing the results to temporaries).

When there is a packet commit with an implicit write to USR, we initialize
new_value_usr during gen_start_packet and write to USR in gen_reg_writes.

Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) Add pkt_need_commit argument to arch_fpop_end
Taylor Simpson [Wed, 5 Nov 2025 21:25:52 +0000 (14:25 -0700)] 
Hexagon (target/hexagon) Add pkt_need_commit argument to arch_fpop_end

The arch_fpop_end function converts the softfloat fp_status flags to
bits set in Hexagon USR.  It is hard-coded that the packet must need
a commit.  We add an argument to the function and update all the helper
call sites.

In a subsequent commit, we will change the code that forces a commit
when the packet contains an floating point instruction.

Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoHexagon (target/hexagon) Remove gen_tcg_func_table.py
Taylor Simpson [Wed, 16 Apr 2025 15:03:43 +0000 (09:03 -0600)] 
Hexagon (target/hexagon) Remove gen_tcg_func_table.py

This can easily be done in C with opcodes_def_generated.h.inc

Note that gen_tcg_func_table.py has some logic to skip instructions.
However, there aren't any instructions currently in the code that would
be skipped by this logic.  So, it is safe to base the table on the
complete opcodes table.

Signed-off-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Tested-by: Brian Cain <brian.cain@oss.qualcomm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
4 weeks agoMerge tag 'hw-misc-20251230' of https://github.com/philmd/qemu into staging
Richard Henderson [Wed, 31 Dec 2025 05:44:17 +0000 (16:44 +1100)] 
Merge tag 'hw-misc-20251230' of https://github.com/philmd/qemu into staging

Misc HW patches

- Remove few target_ulong uses
- Make human monitor non-target specific
- Better name for TrustZone Peripheral Protection Controller memory regions
- Do not expose DEVICE_NATIVE_ENDIAN on Rust
- Remove address_space_stl_notdirty() and stl_phys_notdirty()
- Allow to restrict targets to legacy ldst_phys() API
- Fix MinGW-w64 link failure due to ConvertStringToBSTR()
- Header cleanups
- MAINTAINERS updates

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmlUPtEACgkQ4+MsLN6t
# wN5eVQ//cMeeYMl48XFmMlA1v0Ml8lbP/wzmgxyLM1DNHSVDGqBKArug+BdAPh2Q
# BiyWGj73FiQUi97m8Rfa8eR+LeBIOF/19uxVvJAGU61PHUCvvxzDUwRyuo3OjNjk
# JgnAmnf0iq9RRZas26fll2EV4CIibs97fR/FoKw9lKCvY1WY35O195fMChMRYzFo
# nUsPocatjr9RB8ZjCWlaP9sbqiI15r+WqhstfFC3uKBu0NlBfih1yRcSqYwW9jZl
# QoKERwGfrNvqvz/43wer0oGyidrDvgXFtAtGe/UWaj6EvqVikzZs2s6kMnIb+YC6
# 0k4hD/7/389ILYb3IqFknMZmXPN8xw/XfmQW8t4C/gJc/pkd0LYESE/Hs/R6lEOk
# MqgG8PeqdUtqSywnX3Hdayd+9p2n2mnlmiNqJFXZVRYTu0b/mM8jCPIJeID9PyNI
# rK6qGiBmznOs+iTaA/UMIKz0hj6KAmeibnTzby6k4SvdzK3QjesDSajeA8XLMhyL
# gayOxMhwNwW/zIwvCZ6MblI9kQaPf3oUtjjAsRPDOUgj2S44zR1VU3akynCa8RbA
# nEu5lA6umeIsIWFxf53aDZlEGXSReS6Zqk7QPLee1XW24hhdinX7Jb3dV8SPULDQ
# /A3WLY72KgtpN4Ap1MYWSerCKzyIqVwz4wwSHEOSEqXUnV/GMAU=
# =9ATS
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 31 Dec 2025 08:06:25 AM AEDT
# 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 'hw-misc-20251230' of https://github.com/philmd/qemu: (34 commits)
  MAINTAINERS: Change email and status of TriCore
  MAINTAINERS: remove old email for Bandan Das
  meson: Optimize summary_info about directories
  hw/i2c/imx: Fix trace func name error
  util: Move qemu_ftruncate64 from block/file-win32.c to oslib-win32.c
  qga/vss-win32: Fix ConvertStringToBSTR redefinition with newer MinGW
  configs/targets: Mark targets not using legacy ldst_phys() API
  hw/virtio: Reduce virtio_lduw/stw_phys_cached() scope
  hw/virtio: Remove unused ldst_phys() helpers
  configs/targets: Mark targets not using legacy ldst_phys() API
  system/memory: Allow restricting legacy ldst_phys() API usage
  system/memory: Remove address_space_stl_notdirty and stl_phys_notdirty
  hw/arm: Avoid address_space_stl_notdirty() when generating bootloader
  target/sparc: Update MMU page table using stl_phys()
  target/i386: Remove x86_stl_phys_notdirty() leftover
  target/hexagon: Include missing 'cpu.h' header in 'internal.h'
  rust/system: Stop exposing bogus DEVICE_NATIVE_ENDIAN symbol
  hw/char/pl011: Mark implementation as being little-endian
  hw/timer/hpet: Mark implementation as being little-endian
  hw/misc/pvpanic: Expose MMIO interface as little-endian
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 weeks agoMAINTAINERS: Change email and status of TriCore
Bastian Koppelmann [Sat, 27 Dec 2025 13:21:35 +0000 (14:21 +0100)] 
MAINTAINERS: Change email and status of TriCore

I'm no longer employed at the university of Paderborn. This also means
my time available for QEMU has reduced significantly. Thus, I'm dropping
the status to odd fixes.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251227132135.4886-1-kbastian@mail.uni-paderborn.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agoMAINTAINERS: remove old email for Bandan Das
Stefan Hajnoczi [Fri, 26 Dec 2025 08:32:06 +0000 (09:32 +0100)] 
MAINTAINERS: remove old email for Bandan Das

Bandan recently left Red Hat and emails to his old address now result in
bounce messages. I contacted Bandan and he asked me to remove his old
address on his behalf.

Reported-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251226083207.506850-1-stefanha@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agomeson: Optimize summary_info about directories
Bin Guo [Fri, 19 Dec 2025 23:04:55 +0000 (07:04 +0800)] 
meson: Optimize summary_info about directories

Clear summary_info first, otherwise there will be redundant output
about build environment.

Signed-off-by: Bin Guo <guobin@linux.alibaba.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251219230456.37178-1-guobin@linux.alibaba.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agohw/i2c/imx: Fix trace func name error
Alano Song [Thu, 18 Dec 2025 14:11:44 +0000 (22:11 +0800)] 
hw/i2c/imx: Fix trace func name error

Signed-off-by: Alano Song <AlanoSong@163.com>
Fixes: e589c0ea9c9 ("hw/i2c/imx_i2c: Convert DPRINTF() to trace events")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251218141144.51001-1-AlanoSong@163.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agoutil: Move qemu_ftruncate64 from block/file-win32.c to oslib-win32.c
Nguyen Dinh Phi [Thu, 18 Dec 2025 08:54:46 +0000 (16:54 +0800)] 
util: Move qemu_ftruncate64 from block/file-win32.c to oslib-win32.c

qemu_ftruncate64() is a general-purpose utility function that may be
used outside of the block layer. Move it to util/oslib-win32.c where
other Windows-specific utility functions reside.

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20251218085446.462827-3-phind.uet@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agoqga/vss-win32: Fix ConvertStringToBSTR redefinition with newer MinGW
Nguyen Dinh Phi [Thu, 18 Dec 2025 08:54:45 +0000 (16:54 +0800)] 
qga/vss-win32: Fix ConvertStringToBSTR redefinition with newer MinGW

Newer versions of MinGW-w64 provide ConvertStringToBSTR() in the
_com_util namespace via <comutil.h>. This causes a redefinition
error when building qemu-ga on Windows with these toolchains.

Add a meson check to detect whether ConvertStringToBSTR is already
available, and conditionally compile our fallback implementation
only when the system does not provide one.

Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Message-ID: <20251218085446.462827-2-phind.uet@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agoconfigs/targets: Mark targets not using legacy ldst_phys() API
Philippe Mathieu-Daudé [Sat, 20 Dec 2025 11:51:42 +0000 (12:51 +0100)] 
configs/targets: Mark targets not using legacy ldst_phys() API

These targets were only using the legacy ldst_phys() API
via the virtio load/store helpers, which got cleaned up.

Mark them not using the legacy ldst_phys() API to avoid
further use, allowing to eventually remove it.

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

4 weeks agohw/virtio: Reduce virtio_lduw/stw_phys_cached() scope
Philippe Mathieu-Daudé [Sat, 20 Dec 2025 11:45:01 +0000 (12:45 +0100)] 
hw/virtio: Reduce virtio_lduw/stw_phys_cached() scope

virtio_lduw_phys_cached() and virtio_stw_phys_cached() are
only used within hw/virtio/virtio.c: reduce their scope by
moving their definitions there.

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

4 weeks agohw/virtio: Remove unused ldst_phys() helpers
Philippe Mathieu-Daudé [Sat, 20 Dec 2025 11:40:36 +0000 (12:40 +0100)] 
hw/virtio: Remove unused ldst_phys() helpers

None of the following virtio ldst_phys() inlined helpers are used:

 - virtio_lduw_phys()
 - virtio_ldl_phys[_cached]()
 - virtio_ldq_phys[_cached]()
 - virtio_stw_phys()
 - virtio_stl_phys[_cached]()

Just remove them.

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

4 weeks agoconfigs/targets: Mark targets not using legacy ldst_phys() API
Philippe Mathieu-Daudé [Sat, 20 Dec 2025 11:27:04 +0000 (12:27 +0100)] 
configs/targets: Mark targets not using legacy ldst_phys() API

Luckily these targets don't use the legacy ldst_phys() API at
all. Set the TARGET_NOT_USING_LEGACY_LDST_PHYS_API variable to
hide the API to them, avoiding further API uses to creep in.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251224151351.86733-7-philmd@linaro.org>

4 weeks agosystem/memory: Allow restricting legacy ldst_phys() API usage
Philippe Mathieu-Daudé [Sat, 20 Dec 2025 11:27:04 +0000 (12:27 +0100)] 
system/memory: Allow restricting legacy ldst_phys() API usage

Commit 500131154d6 ("exec.c: Add new address_space_ld*/st*
functions") added a new API to fix a shortcoming of the
ld/st*_phys() API, which does blind bus access, not reporting
failure (and it also allow to provide transaction attributes).

Later commit 42874d3a8c6 ("Switch non-CPU callers from ld/st*_phys
to address_space_ld/st*") automatically converted the legacy uses
to the new API, not precising transaction attributes
(MEMTXATTRS_UNSPECIFIED) and ignoring the transation result (passing
NULL pointer as MemTxResult).

While this is a faithful replacement, without any logical change,
we later realized better is to not use MEMTXATTRS_UNSPECIFIED or
NULL MemTxResult, and adapt each call site on a pair basis, looking
at the device model datasheet to do the correct behavior (which is
unlikely to ignore transaction failures).

Since this is quite some work, we defer that to device model
maintainers. Meanwhile we introduce a definition, to allow a
target which removed all legacy API call to prohibit further
legacy API uses, named "TARGET_NOT_USING_LEGACY_LDST_PHYS_API".

Since all targets should be able to check this definition, we
take care to not poison it.

Suggested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251224151351.86733-6-philmd@linaro.org>

4 weeks agosystem/memory: Remove address_space_stl_notdirty and stl_phys_notdirty
Philippe Mathieu-Daudé [Tue, 16 Dec 2025 17:46:22 +0000 (18:46 +0100)] 
system/memory: Remove address_space_stl_notdirty and stl_phys_notdirty

stl_phys_notdirty() was added in commit 8df1cd076cc ("physical memory
access functions") as a (premature?) optimisation for the CODE path.
Meanwhile 20 years passed, we might never have understood / used it
properly; the code evolved and now the recommended way to access the
CODE path is via the cpu_ld/st_mmu*() API.

Remove both address_space_stl_notdirty() and stl_phys_notdirty()
leftovers.

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

4 weeks agohw/arm: Avoid address_space_stl_notdirty() when generating bootloader
Philippe Mathieu-Daudé [Tue, 16 Dec 2025 17:44:43 +0000 (18:44 +0100)] 
hw/arm: Avoid address_space_stl_notdirty() when generating bootloader

When using the '-kernel' command line option, a bootloader is
emitted, calling address_space_stl_notdirty().

The _notdirty() variant is supposed to /not/ mark the updated
CODE page as dirty, to not re-translate it. However this code
is only used with the '-kernel' CLI option after the machine
is created and /before/ the vCPUs run, and *only* during the
first (cold) reset; not during following (hot) resets. The
optimisation is totally not justified, since we haven't
translated any guest code yet.
Replace by the normal address_space_stl() helper.

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

4 weeks agotarget/sparc: Update MMU page table using stl_phys()
Philippe Mathieu-Daudé [Tue, 16 Dec 2025 17:59:32 +0000 (18:59 +0100)] 
target/sparc: Update MMU page table using stl_phys()

stl_phys_notdirty() is supposed to do an optimized CODE
path store. Here we update the page table via the DATA
path, so can use the normal stl_phys() helper.

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

4 weeks agotarget/i386: Remove x86_stl_phys_notdirty() leftover
Philippe Mathieu-Daudé [Fri, 12 Dec 2025 21:15:00 +0000 (22:15 +0100)] 
target/i386: Remove x86_stl_phys_notdirty() leftover

Last use of x86_stl_phys_notdirty() was removed in commit 4a1e9d4d11c
("target/i386: Use atomic operations for pte updates"), let's remove.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20251224151351.86733-2-philmd@linaro.org>

4 weeks agotarget/hexagon: Include missing 'cpu.h' header in 'internal.h'
Philippe Mathieu-Daudé [Wed, 17 Dec 2025 08:55:02 +0000 (08:55 +0000)] 
target/hexagon: Include missing 'cpu.h' header in 'internal.h'

Both CPUHexagonState and TOTAL_PER_THREAD_REGS are defined
in "cpu.h" which is luckily indirectly included. However when
refactoring unrelated files we get:

  In file included from target/hexagon/helper.h:18,
                   from include/exec/helper-proto.h.inc:56,
                   from include/exec/helper-proto.h:13,
                   from target/hexagon/op_helper.c:22:
  target/hexagon/internal.h: At top level:
  target/hexagon/internal.h:29:25: error: unknown type name ‘CPUHexagonState’; did you mean ‘CPUPluginState’?
     29 | void hexagon_debug_vreg(CPUHexagonState *env, int regnum);
        |                         ^~~~~~~~~~~~~~~
        |                         CPUPluginState
  target/hexagon/internal.h:30:25: error: unknown type name ‘CPUHexagonState’; did you mean ‘CPUPluginState’?
     30 | void hexagon_debug_qreg(CPUHexagonState *env, int regnum);
        |                         ^~~~~~~~~~~~~~~
        |                         CPUPluginState
  target/hexagon/internal.h:31:20: error: unknown type name ‘CPUHexagonState’; did you mean ‘CPUPluginState’?
     31 | void hexagon_debug(CPUHexagonState *env);
        |                    ^~~~~~~~~~~~~~~
        |                    CPUPluginState
  target/hexagon/internal.h:33:44: error: ‘TOTAL_PER_THREAD_REGS’ undeclared here (not in a function)
     33 | extern const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS];
        |                                            ^~~~~~~~~~~~~~~~~~~~~

Fix that by including the missing header.

We don't need the "qemu/log.h" since commit 0cb73cb5a02 ("target/hexagon:
Remove HEX_DEBUG/HEX_DEBUG_LOG"): remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Message-Id: <20251224134644.85582-9-philmd@linaro.org>

4 weeks agorust/system: Stop exposing bogus DEVICE_NATIVE_ENDIAN symbol
Philippe Mathieu-Daudé [Wed, 10 Dec 2025 11:45:15 +0000 (12:45 +0100)] 
rust/system: Stop exposing bogus DEVICE_NATIVE_ENDIAN symbol

We want to remove the bogus DEVICE_NATIVE_ENDIAN definition
(by only having it explicit, either big or little one). Stop
exposing it to rust devices to avoid it spreading further.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20251224134644.85582-8-philmd@linaro.org>

4 weeks agohw/char/pl011: Mark implementation as being little-endian
Philippe Mathieu-Daudé [Wed, 10 Dec 2025 11:45:48 +0000 (12:45 +0100)] 
hw/char/pl011: Mark implementation as being little-endian

The PL011 component is only built / used by ARM targets, which
are only built in little endianness. Thus we only ever built
as little endian, never testing the big-endian possibility of
the DEVICE_NATIVE_ENDIAN definition. Simplify by only keeping
the little endian variant.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20251224134644.85582-7-philmd@linaro.org>

4 weeks agohw/timer/hpet: Mark implementation as being little-endian
Philippe Mathieu-Daudé [Wed, 10 Dec 2025 10:48:13 +0000 (11:48 +0100)] 
hw/timer/hpet: Mark implementation as being little-endian

The HPET component is only built / used by X86 targets, which
are only built in little endianness. Thus we only ever built
as little endian, never testing the big-endian possibility of
the DEVICE_NATIVE_ENDIAN definition. Simplify by only keeping
the little endian variant.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20251224134644.85582-6-philmd@linaro.org>

4 weeks agohw/misc/pvpanic: Expose MMIO interface as little-endian
Philippe Mathieu-Daudé [Mon, 22 Dec 2025 09:32:23 +0000 (10:32 +0100)] 
hw/misc/pvpanic: Expose MMIO interface as little-endian

Make the PVPanic MMIO interface behave like the ISA and PCI
variants: access it using little endianness.

Fixes: a89607c4d0e ("hw/misc/pvpanic: Add MMIO interface")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251224134644.85582-5-philmd@linaro.org>

4 weeks agohw/char/serial: Let compiler pick serial_mm_ops[] array length
Philippe Mathieu-Daudé [Tue, 16 Dec 2025 09:53:03 +0000 (10:53 +0100)] 
hw/char/serial: Let compiler pick serial_mm_ops[] array length

No need to enforce the MemoryRegionOps array length.
We index by device_endian enum, the compiler will easily
pick the correct length. Besides, this allow further
adjustments in the device_endian enum itself.

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

4 weeks agohw/net/opencores: Clarify MMIO read/write handlers expect 32-bit access
Philippe Mathieu-Daudé [Tue, 16 Dec 2025 10:03:41 +0000 (11:03 +0100)] 
hw/net/opencores: Clarify MMIO read/write handlers expect 32-bit access

The read/write handlers access array of 32-bit register by index:

 277 struct OpenEthState {
  ..
 287     uint32_t regs[REG_MAX];
  ..
 291 };

 546 static uint64_t open_eth_reg_read(void *opaque,
 547                                   hwaddr addr, unsigned int size)
 548 {
  ..
 551     OpenEthState *s = opaque;
 552     unsigned idx = addr / 4;
  ..
 559             v = s->regs[idx];
  ..
 563     return v;
 564 }

This is a 32-bit implementation. Make that explicit in the
MemoryRegionOps structure (this doesn't change the maximum
access size, which -- being unset -- is 64-bit).

Move the structure just after the handlers to ease code review.

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

4 weeks agohw/arm/Kconfig: Have FSL_IMX6UL SoC select IMX_USBPHY
Philippe Mathieu-Daudé [Wed, 10 Dec 2025 04:44:05 +0000 (05:44 +0100)] 
hw/arm/Kconfig: Have FSL_IMX6UL SoC select IMX_USBPHY

Since commit 17372bd812d, the SoC used by the mcimx6ul-evk
machine requires the IMX USB PHY component.
As this component is only used by 2 machines, do not select
it by default (it will be automatically  selected when
necessary).

Fixes: 17372bd812d ("hw/arm/fsl-imx6ul: Wire up USB controllers")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20251224134644.85582-2-philmd@linaro.org>

4 weeks agomonitor/hmp: Merge hmp-cmds-target.c within hmp-cmds.c
Philippe Mathieu-Daudé [Sun, 21 Dec 2025 15:21:30 +0000 (16:21 +0100)] 
monitor/hmp: Merge hmp-cmds-target.c within hmp-cmds.c

hmp-cmds-target.c is no more target specific, move its code
in hmp-cmds.c, which is built once for all system binaries.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251229231546.50604-8-philmd@linaro.org>

4 weeks agomonitor/hmp: Fix coding style in hmp-cmds-target.c
Philippe Mathieu-Daudé [Tue, 23 Dec 2025 19:15:43 +0000 (20:15 +0100)] 
monitor/hmp: Fix coding style in hmp-cmds-target.c

Previous to moving code contained in hmp-cmds-target.c,
fix the coding style. Otherwise the checkpatch.pl script
would report:

  ERROR: space required before the open parenthesis '('
  #134: FILE: monitor/hmp-cmds-target.c:152:
  +    switch(format) {

  ERROR: braces {} are necessary for all arms of this statement
  #154: FILE: monitor/hmp-cmds-target.c:172:
  +        if (l > line_size)
  [...]

  ERROR: space required before the open parenthesis '('
  #172: FILE: monitor/hmp-cmds-target.c:190:
  +            switch(wsize) {

  ERROR: space required before the open parenthesis '('
  #188: FILE: monitor/hmp-cmds-target.c:206:
  +            switch(format) {

  ERROR: Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead
  #190: FILE: monitor/hmp-cmds-target.c:208:
  +                monitor_printf(mon, "%#*" PRIo64, max_digits, v);

  WARNING: line over 80 characters
  #240: FILE: monitor/hmp-cmds-target.c:258:
  +        error_setg(errp, "No memory is mapped at address 0x%" HWADDR_PRIx, addr);

  WARNING: line over 80 characters
  #245: FILE: monitor/hmp-cmds-target.c:263:
  +        error_setg(errp, "Memory at address 0x%" HWADDR_PRIx " is not RAM", addr);

  ERROR: Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead
  #297: FILE: monitor/hmp-cmds-target.c:315:
  +        monitor_printf(mon, "gpa: %#" HWADDR_PRIx "\n",

  WARNING: line over 80 characters
  #329: FILE: monitor/hmp-cmds-target.c:347:
  +    ret = ((pinfo & 0x007fffffffffffffull) * pagesize) | (addr & (pagesize - 1));

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Message-Id: <20251229231546.50604-7-philmd@linaro.org>

4 weeks agomonitor/hmp: Inline ld[uw,l,q]_p() calls in memory_dump()
Philippe Mathieu-Daudé [Sun, 21 Dec 2025 15:20:48 +0000 (16:20 +0100)] 
monitor/hmp: Inline ld[uw,l,q]_p() calls in memory_dump()

Remove the last target-specificity in this file.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251229231546.50604-6-philmd@linaro.org>

4 weeks agomonitor/hmp: Remove target_long uses in memory_dump()
Philippe Mathieu-Daudé [Sun, 21 Dec 2025 11:49:05 +0000 (12:49 +0100)] 
monitor/hmp: Remove target_long uses in memory_dump()

Pass a plain vaddr type to express virtual address.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251229231546.50604-5-philmd@linaro.org>

4 weeks agomonitor/hmp: Use plain uint64_t @addr argument in memory_dump()
Philippe Mathieu-Daudé [Sun, 21 Dec 2025 11:49:05 +0000 (12:49 +0100)] 
monitor/hmp: Use plain uint64_t @addr argument in memory_dump()

memory_dump() takes either hwaddr or vaddr type, depending
on the @is_physical argument. Simply use uint64_t type which
is common to both.
Pad address using field width formatting, removing the need
for the target_ulong type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Message-Id: <20251229231546.50604-4-philmd@linaro.org>

4 weeks agomonitor/hmp: Make memory_dump() @is_physical argument a boolean
Philippe Mathieu-Daudé [Mon, 29 Dec 2025 23:07:50 +0000 (00:07 +0100)] 
monitor/hmp: Make memory_dump() @is_physical argument a boolean

Suggested-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <20251229231546.50604-3-philmd@linaro.org>

4 weeks agomonitor/hmp: Replace target_ulong -> vaddr in hmp_gva2gpa()
Philippe Mathieu-Daudé [Sun, 21 Dec 2025 11:43:22 +0000 (12:43 +0100)] 
monitor/hmp: Replace target_ulong -> vaddr in hmp_gva2gpa()

cpu_get_phys_page_debug() takes a vaddr type since commit
00b941e581b ("cpu: Turn cpu_get_phys_page_debug() into a CPUClass
hook").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Message-Id: <20251229231546.50604-2-philmd@linaro.org>

4 weeks agohw/misc: make the tz-ppc-port names more useful
Alex Bennée [Mon, 15 Dec 2025 17:05:48 +0000 (17:05 +0000)] 
hw/misc: make the tz-ppc-port names more useful

The TrustZone peripheral protection controller (tz-ppc) sits between
peripherals and the main system. However this results in "info mtree"
looking at bit confusing, especially as the sequence numbers can
overlap and miss steps:

      0000000000000000-ffffffffffffffff (prio -2, i/o): system
        0000000000000000-00000000003fffff (prio 0, i/o): tz-mpc-upstream
        0000000000400000-00000000007fffff (prio 0, i/o): alias ssram-0-alias @tz-mpc-upstream 0000000000000000-00000000003fffff
        0000000028000000-00000000281fffff (prio 0, i/o): tz-mpc-upstream
        0000000028200000-00000000283fffff (prio 0, i/o): tz-mpc-upstream
        0000000040080000-0000000040080fff (prio 0, i/o): iotkit-secctl-ns-regs
        0000000040100000-0000000040100fff (prio 0, i/o): tz-ppc-port[1]
        0000000040101000-0000000040101fff (prio 0, i/o): tz-ppc-port[2]
        0000000040102000-0000000040102fff (prio 0, i/o): tz-ppc-port[3]
        0000000040103000-0000000040103fff (prio 0, i/o): tz-ppc-port[4]
        0000000040110000-0000000040110fff (prio 0, i/o): tz-ppc-port[0]
        0000000040111000-0000000040111fff (prio 0, i/o): tz-ppc-port[1]
        0000000040112000-0000000040112fff (prio 0, i/o): tz-ppc-port[2]
        0000000040113000-0000000040113fff (prio 0, i/o): tz-ppc-port[3]
        0000000040200000-0000000040200fff (prio 0, i/o): tz-ppc-port[5]
        0000000040201000-0000000040201fff (prio 0, i/o): tz-ppc-port[6]
        0000000040202000-0000000040202fff (prio 0, i/o): tz-ppc-port[7]
        0000000040203000-0000000040203fff (prio 0, i/o): tz-ppc-port[8]
        0000000040204000-0000000040204fff (prio 0, i/o): tz-ppc-port[9]
        0000000040205000-0000000040205fff (prio 0, i/o): tz-ppc-port[0]
        0000000040206000-0000000040206fff (prio 0, i/o): tz-ppc-port[1]
        0000000040207000-0000000040207fff (prio 0, i/o): tz-ppc-port[10]
        0000000040208000-0000000040208fff (prio 0, i/o): tz-ppc-port[11]
        0000000040209000-0000000040209fff (prio 0, i/o): tz-ppc-port[2]
        000000004020a000-000000004020afff (prio 0, i/o): tz-ppc-port[3]
        000000004020b000-000000004020bfff (prio 0, i/o): tz-ppc-port[4]
        000000004020c000-000000004020cfff (prio 0, i/o): tz-ppc-port[12]
        000000004020d000-000000004020dfff (prio 0, i/o): tz-ppc-port[13]
        0000000040300000-0000000040300fff (prio 0, i/o): tz-ppc-port[0]
        0000000040301000-0000000040301fff (prio 0, i/o): tz-ppc-port[1]
        0000000040302000-0000000040302fff (prio 0, i/o): tz-ppc-port[2]
        0000000041000000-000000004113ffff (prio 0, i/o): tz-ppc-port[0]
        0000000042000000-00000000420000ff (prio 0, i/o): tz-ppc-port[5]
        0000000048007000-0000000048007fff (prio -1000, i/o): FPGA NS PC
        0000000050080000-0000000050080fff (prio 0, i/o): iotkit-secctl-s-regs
        0000000058007000-0000000058007fff (prio 0, i/o): tz-ppc-port[0]
        0000000058008000-0000000058008fff (prio 0, i/o): tz-ppc-port[1]
        0000000058009000-0000000058009fff (prio 0, i/o): tz-ppc-port[2]
        0000000080000000-0000000080ffffff (prio 0, ram): mps.ram

So as a quality of life feature lets expose the name of the underlying
region so we get something more useful:

    0000000000000000-ffffffffffffffff (prio -2, i/o): system
      0000000000000000-00000000003fffff (prio 0, i/o): tz-mpc-upstream
      0000000000400000-00000000007fffff (prio 0, i/o): alias ssram-0-alias @tz-mpc-upstream 0000000000000000-00000000003fffff
      0000000028000000-00000000281fffff (prio 0, i/o): tz-mpc-upstream
      0000000028200000-00000000283fffff (prio 0, i/o): tz-mpc-upstream
      0000000040080000-0000000040080fff (prio 0, i/o): iotkit-secctl-ns-regs
      0000000040100000-0000000040100fff (prio 0, i/o): tz-ppc-port[gpio0]
      0000000040101000-0000000040101fff (prio 0, i/o): tz-ppc-port[gpio1]
      0000000040102000-0000000040102fff (prio 0, i/o): tz-ppc-port[gpio2]
      0000000040103000-0000000040103fff (prio 0, i/o): tz-ppc-port[gpio3]
      0000000040110000-0000000040110fff (prio 0, i/o): tz-ppc-port[pl080]
      0000000040111000-0000000040111fff (prio 0, i/o): tz-ppc-port[pl080]
      0000000040112000-0000000040112fff (prio 0, i/o): tz-ppc-port[pl080]
      0000000040113000-0000000040113fff (prio 0, i/o): tz-ppc-port[pl080]
      0000000040200000-0000000040200fff (prio 0, i/o): tz-ppc-port[uart]
      0000000040201000-0000000040201fff (prio 0, i/o): tz-ppc-port[uart]
      0000000040202000-0000000040202fff (prio 0, i/o): tz-ppc-port[uart]
      0000000040203000-0000000040203fff (prio 0, i/o): tz-ppc-port[uart]
      0000000040204000-0000000040204fff (prio 0, i/o): tz-ppc-port[uart]
      0000000040205000-0000000040205fff (prio 0, i/o): tz-ppc-port[pl022]
      0000000040206000-0000000040206fff (prio 0, i/o): tz-ppc-port[pl022]
      0000000040207000-0000000040207fff (prio 0, i/o): tz-ppc-port[arm_sbcon_i2c]
      0000000040208000-0000000040208fff (prio 0, i/o): tz-ppc-port[arm_sbcon_i2c]
      0000000040209000-0000000040209fff (prio 0, i/o): tz-ppc-port[pl022]
      000000004020a000-000000004020afff (prio 0, i/o): tz-ppc-port[pl022]
      000000004020b000-000000004020bfff (prio 0, i/o): tz-ppc-port[pl022]
      000000004020c000-000000004020cfff (prio 0, i/o): tz-ppc-port[arm_sbcon_i2c]
      000000004020d000-000000004020dfff (prio 0, i/o): tz-ppc-port[arm_sbcon_i2c]
      0000000040300000-0000000040300fff (prio 0, i/o): tz-ppc-port[mps2-scc]
      0000000040301000-0000000040301fff (prio 0, i/o): tz-ppc-port[i2s-audio]
      0000000040302000-0000000040302fff (prio 0, i/o): tz-ppc-port[mps2-fpgaio]
      0000000041000000-000000004113ffff (prio 0, i/o): tz-ppc-port[gfx]
      0000000042000000-00000000420000ff (prio 0, i/o): tz-ppc-port[lan9118-mmio]
      0000000048007000-0000000048007fff (prio -1000, i/o): FPGA NS PC
      0000000050080000-0000000050080fff (prio 0, i/o): iotkit-secctl-s-regs
      0000000058007000-0000000058007fff (prio 0, i/o): tz-ppc-port[tz-mpc-regs]
      0000000058008000-0000000058008fff (prio 0, i/o): tz-ppc-port[tz-mpc-regs]
      0000000058009000-0000000058009fff (prio 0, i/o): tz-ppc-port[tz-mpc-regs]
      0000000080000000-0000000080ffffff (prio 0, ram): mps.ram

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Jim MacArthur <jim.macarthur@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251215170548.2594651-1-alex.bennee@linaro.org>
[PMD: Wrap long line to avoid checkpatch.pl warning]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agohw/riscv: Treat kernel_start_addr as vaddr
Anton Johansson [Wed, 10 Dec 2025 13:21:30 +0000 (14:21 +0100)] 
hw/riscv: Treat kernel_start_addr as vaddr

Changes kernel_start_addr from target_ulong to vaddr. Logically, the
argument represents a virtual address at which to load the kernel image,
which gets treated as a hwaddr as a fallback if elf and uimage loading
fails.

Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251210132130.14465-1-anjo@rev.ng>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agohw/core: remove duplicate include
Osama Abdelkader [Wed, 26 Nov 2025 21:08:32 +0000 (23:08 +0200)] 
hw/core: remove duplicate include

qemu/target-info.h is included twice.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251126210832.34011-1-osama.abdelkader@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agohw/sd: Remove unused header includes in ssi-sd.c
Bin Meng [Mon, 10 Nov 2025 10:43:11 +0000 (18:43 +0800)] 
hw/sd: Remove unused header includes in ssi-sd.c

Remove these header files which are not used by ssi-sd.c

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251110104311.1640772-1-bmeng.cn@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4 weeks agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Richard Henderson [Sun, 28 Dec 2025 22:10:39 +0000 (09:10 +1100)] 
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* cleanup include/hw headers
* cleanup memory headers
* rust: preludes
* rust: support for dtrace
* rust/hpet: first part of reorganization
* meson: small cleanups
* target/i386: Diamond Rapids CPU model including CET, APX, AVX10.2

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmlPov8UHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroPN1wf9HCceQ1273g7HbNeamay2bSaqypyM
# sEUBk4ipwO0dp7AYaaX5MeJ8NxeYcK82oFgm35WLY1tMOv0BZG5ez02dLoh5C4fb
# Bmy3kV1aY9cxF0IwTyD4dIADlZoaMnGgMElUKFY2/EixjxOUMLe90b1MO2KczqFa
# jvC4gmjx5PC1r+BHycSEdKm2Rbunueb/5eSkKeyTX7rjxQ/Eij0uGjrWrZkMWtgs
# ERJ2xo+D6a38w/uJ88KuqUV1BqYxNNwKmvOwVBU2xFB9o9bm20TNOJZ3+D+Ki8Aj
# idv+rU0XY1bWseo4USuozsqxfkjLJ5lj2YYUkSVO/I1wJmuO7Bq6xzrCxg==
# =/nIt
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 27 Dec 2025 08:12:31 PM AEDT
# 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: (152 commits)
  block: rename block/aio-wait.h to qemu/aio-wait.h
  block: rename block/aio.h to qemu/aio.h
  block: reduce files included by block/aio.h
  block: extract include/qemu/aiocb.h out of include/block/aio.h
  hw: add missing includes hidden by block/aio.h
  qmp: Fix thread race
  thread-pool: Fix thread race
  dosc/cpu-models-x86: Add documentation for DiamondRapids
  i386/cpu: Add CPU model for Diamond Rapids
  i386/cpu: Define dependency for VMX_VM_ENTRY_LOAD_IA32_FRED
  i386/cpu: Add an option in X86CPUDefinition to control CPUID 0x1f
  i386/cpu: Allow cache to be shared at thread level
  i386/cpu: Allow unsupported avx10_version with x-force-features
  i386/cpu: Add a helper to get host avx10 version
  i386/cpu: Support AVX10.2 with AVX10 feature models
  i386/cpu: Add support for AVX10_VNNI_INT in CPUID enumeration
  i386/cpu: Add CPUID.0x1E.0x1 subleaf for AMX instructions
  i386/cpu: Add support for MOVRS in CPUID enumeration
  run: introduce a script for running devel commands
  gitlab-ci: enable rust for msys2-64bit
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
4 weeks agoblock: rename block/aio-wait.h to qemu/aio-wait.h
Paolo Bonzini [Wed, 3 Dec 2025 11:34:25 +0000 (12:34 +0100)] 
block: rename block/aio-wait.h to qemu/aio-wait.h

AIO_WAIT_WHILE is used even outside the block layer; move the header file
out of block/ just like the implementation is in util/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 weeks agoblock: rename block/aio.h to qemu/aio.h
Paolo Bonzini [Wed, 3 Dec 2025 11:33:13 +0000 (12:33 +0100)] 
block: rename block/aio.h to qemu/aio.h

AioContexts are used as a generic event loop even outside the block
layer; move the header file out of block/ just like the implementation
is in util/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 weeks agoblock: reduce files included by block/aio.h
Paolo Bonzini [Wed, 3 Dec 2025 11:09:49 +0000 (12:09 +0100)] 
block: reduce files included by block/aio.h

Avoid including all of qdev everywhere (the hw/core/qdev.h header in fact
brings in a lot more headers too), instead declare a couple structs for
which only a pointer type is needed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 weeks agoblock: extract include/qemu/aiocb.h out of include/block/aio.h
Paolo Bonzini [Wed, 3 Dec 2025 11:08:25 +0000 (12:08 +0100)] 
block: extract include/qemu/aiocb.h out of include/block/aio.h

Create a new header corresponding to functions defined in
util/aiocb.c, and include it whenever AIOCBs are used but
AioContext is not.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 weeks agohw: add missing includes hidden by block/aio.h
Paolo Bonzini [Wed, 3 Dec 2025 11:39:24 +0000 (12:39 +0100)] 
hw: add missing includes hidden by block/aio.h

hw/qdev/core.h being included by core headers means that it was quite
easy to forget including it, or anything that hw/qdev/core.h included.
Add the missing inclusions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 weeks agoqmp: Fix thread race
Marc Morcos [Sat, 13 Dec 2025 00:14:42 +0000 (00:14 +0000)] 
qmp: Fix thread race

This fixes a thread race involving the monitor in monitor_qmp_event and monitor_qapi_event_emit .

Signed-off-by: Marc Morcos <marcmorcos@google.com>
Link: https://lore.kernel.org/r/20251213001443.2041258-4-marcmorcos@google.com
[Use QEMU_LOCK_GUARD and "continue". - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4 weeks agothread-pool: Fix thread race
Marc Morcos [Sat, 13 Dec 2025 00:14:41 +0000 (00:14 +0000)] 
thread-pool: Fix thread race

Fix a data race occurred between `worker_thread()` writing and
`thread_pool_completion_bh()` reading shared data in `util/thread-pool.c`.

Signed-off-by: Marc Morcos <marcmorcos@google.com>
Link: https://lore.kernel.org/r/20251213001443.2041258-3-marcmorcos@google.com
[Use qatomic_set for writes to ret->ret. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>