]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
6 months agoMerge tag 'pull-aspeed-20260204' of https://github.com/legoater/qemu into staging
Peter Maydell [Thu, 5 Feb 2026 09:50:33 +0000 (09:50 +0000)] 
Merge tag 'pull-aspeed-20260204' of https://github.com/legoater/qemu into staging

aspeed queue:

* Added support for the new AST1700 IO expander, including several
  device models (LTPI, PWM, I2C, GPIO, etc.).
* Updated the AST2700 SoC with LTPI support, EHCI IRQ fixes, and other
  improvements.
* Updated test images and test cases for various Aspeed platforms.
* Fixed issues in the Aspeed I2C and ADC models.
* Added support for pca9535 GPIO expander.
* Updated documentation for Aspeed boards.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmmDH8EACgkQUaNDx8/7
# 7KEJShAAulFE612LVWb+FAnuqf4StOA8qHbK3zDVG8ki7IC9vfOdS5guRwJgy5bU
# rbCYxSudRe50uRct+3c2mxPEsUpFUwfthA8w36BGZoSxxugLSoBzJto3Om1UH/rQ
# ZMZerg6Aze0oab2Df98TTceSi4el76owKRAabnOAOS7n24BKxTgn4dN2weRyWT0d
# 7AemIMqjtRhT27JBoB8vHsmdNlSDzI+eR2nyHJqvd0u3DHKBVxk0UH/DyTnJ5/4i
# A7d4Oxi28rEG+VJVG5vLfJi+is1sggoGxfX3SQmWKronODn3aNkWk93dR+kljMGo
# pXyqMQn8JJZZtRRSGAMflIdYvYLmpQkyUGR6kufdMn4EshALwLa5bObx6qb7RLyG
# CfS0gIR1O9zTS6w7kzifF4N2/iYlIReoIs8IiYFCcef8kmu/UToipQtUIllZN3q5
# pNTlruoylqbctyaqrtwHV2tiPxO4N+Y7voX68YtXWIVzLChQiAwz6osdP+JO1txq
# ePi3R0nAI9wks3NR206LRO45OFKP4IPgfAbMMq5aeDEpIbxU/qAEtTglwUUPby9o
# E8D15vukcYWuobvVqnKX7IzWGoGzJX5QU0wbO5pfDUc8BtQtdL9nOaSTDX3o+chK
# KNcuG91mQLlGe86OpysoK6N+PNwLvnWy8Su5x3HF0wNQ0PTASkw=
# =APEm
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Feb  4 10:30:25 2026 GMT
# 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]
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-aspeed-20260204' of https://github.com/legoater/qemu: (45 commits)
  tests/functional/aarch64: Add I2C test for AST1700 IO expanders
  tests/functional/aarch64: Parameterize PCIe2 initialization in AST2700
  tests/functional/aarch64: Parameterize I2C bus ID in AST2700 test
  hw/arm/aspeed: Enable AST1700 IO expander support
  hw/arm/aspeed: Model AST1700 I3C block as unimplemented device
  hw/arm/aspeed: Attach SGPIOM device to AST1700 model
  hw/arm/aspeed: Attach PWM device to AST1700 model
  hw/arm/aspeed: Attach WDT device to AST1700 model
  hw/arm/aspeed: attach I2C device to AST1700 model
  hw/arm/aspeed: Attach GPIO device to AST1700 model
  hw/arm/aspeed: Attach SCU device to AST1700 model
  hw/arm/aspeed: Attach ADC device to AST1700 model
  hw/arm/aspeed: Attach SPI device to AST1700 model
  hw/arm/aspeed: Attach SRAM device to AST1700 model
  hw/arm/aspeed: Attach UART device to AST1700 model
  hw/arm/aspeed: Attach LTPI controller to AST1700 model
  hw/arm/aspeed: Integrate interrupt controller for AST1700
  hw/arm/aspeed: Integrate AST1700 device into AST27X0
  hw/arm/aspeed: Add AST1700 LTPI expander device model
  hw/misc: Add basic Aspeed PWM model
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
6 months agointel_iommu: Add a CLI option to enable SVM
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:46 +0000 (10:51 +0000)] 
intel_iommu: Add a CLI option to enable SVM

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-8-clement.mathieu--drif@eviden.com>

6 months agointel_iommu: Minimal handling of privileged ATS request
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:45 +0000 (10:51 +0000)] 
intel_iommu: Minimal handling of privileged ATS request

The purpose of this commit is not to support privileged requests but
to prevent devices from doing things they wouldn't be able to do
with real hardware.

We simply block privileged requests when the SRS ecap is not set
and abort when the ecap is present.

For now, its not worth implementing support for privileged requests
because the kernel does not support it.
(https://lore.kernel.org/linux-iommu/20230411064815.31456-11-baolu.lu@linux.intel.com/)
However, we may consider working on it depending on how the development
goes in the kernel.

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-7-clement.mathieu--drif@eviden.com>

6 months agointel_iommu: Handle insufficient permissions during translation requests
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:45 +0000 (10:51 +0000)] 
intel_iommu: Handle insufficient permissions during translation requests

ATS translations should not fail when the write permission is not set.

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-6-clement.mathieu--drif@eviden.com>

6 months agopci: Block ATS requests when privileged mode is disabled
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:44 +0000 (10:51 +0000)] 
pci: Block ATS requests when privileged mode is disabled

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-5-clement.mathieu--drif@eviden.com>

6 months agopcie: Add a function to check if pasid privileged mode is enabled
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:43 +0000 (10:51 +0000)] 
pcie: Add a function to check if pasid privileged mode is enabled

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-4-clement.mathieu--drif@eviden.com>

6 months agointel_iommu: Support memory operations with pre-translated addresses
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:42 +0000 (10:51 +0000)] 
intel_iommu: Support memory operations with pre-translated addresses

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-3-clement.mathieu--drif@eviden.com>

6 months agointel_iommu: Add an IOMMU index for pre-translated addresses
CLEMENT MATHIEU--DRIF [Wed, 29 Oct 2025 10:51:41 +0000 (10:51 +0000)] 
intel_iommu: Add an IOMMU index for pre-translated addresses

Signed-off-by: Clement Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251029105137.1097933-2-clement.mathieu--drif@eviden.com>

6 months agohw/pci-host: Set DEVICE_CATEGORY_BRIDGE once in parent class_init()
Philippe Mathieu-Daudé [Mon, 27 Oct 2025 11:23:06 +0000 (12:23 +0100)] 
hw/pci-host: Set DEVICE_CATEGORY_BRIDGE once in parent class_init()

No need to set DEVICE_CATEGORY_BRIDGE for each device
implementing TYPE_PCI_HOST_BRIDGE: set it once in the
parent.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20251027112306.57634-1-philmd@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251027112306.57634-1-philmd@linaro.org>

6 months agopci/shpc: Do not unparent in instance_finalize()
Akihiko Odaki [Mon, 27 Oct 2025 01:24:18 +0000 (10:24 +0900)] 
pci/shpc: Do not unparent in instance_finalize()

Children are automatically unparented so manually unparenting is
unnecessary.

Worse, automatic unparenting happens before the instance_finalize()
callback of the parent gets called, so object_unparent() calls in
the callback will refer to objects that are already unparented, which
is semantically incorrect.

Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20251027-shpc-v1-1-00e9b20a355d@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20251027-shpc-v1-1-00e9b20a355d@rsg.ci.i.u-tokyo.ac.jp>

6 months agotests/functional/aarch64: Add I2C test for AST1700 IO expanders
Kane Chen [Wed, 4 Feb 2026 08:21:46 +0000 (08:21 +0000)] 
tests/functional/aarch64: Add I2C test for AST1700 IO expanders

Extend the AST2700 test suite to verify I2C connectivity on AST1700
IO expanders using the DCSCM image. This validates the new bus-label
naming scheme by testing communication on both primary and
expander-attached I2C buses.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-23-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/aarch64: Parameterize PCIe2 initialization in AST2700
Kane Chen [Wed, 4 Feb 2026 08:21:44 +0000 (08:21 +0000)] 
tests/functional/aarch64: Parameterize PCIe2 initialization in AST2700

The current AST2700 functional test forces PCIe2 enablement by manually
manipulating U-Boot env and FDT via the console. This sequence
interferes with test cases that rely on the default boot flow of the
image.

Introduce a 'enable_pcie' parameter (defaulting to True) to both
'verify_openbmc_boot_start' and 'verify_openbmc_boot_and_login' methods.
This allow test cases to toggle the PCIe2 initialization sequence based
on their specific requirements without breaking standard boot tests.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-22-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/aarch64: Parameterize I2C bus ID in AST2700 test
Kane Chen [Wed, 4 Feb 2026 08:21:43 +0000 (08:21 +0000)] 
tests/functional/aarch64: Parameterize I2C bus ID in AST2700 test

The current Aspeed AST2700 functional test case strictly uses I2C bus
1 for its sensor tests. This hard-coded approach prevents the test
logic from being reused for other machine types or configurations
where I2C bus 1 might be disabled or where a different bus needs to
be verified (e.g., I2C expanders).

This refactoring allows the same I2C verification logic to be shared
across different test scenarios by simply passing the target bus
number.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-21-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Enable AST1700 IO expander support
Kane Chen [Wed, 4 Feb 2026 08:21:42 +0000 (08:21 +0000)] 
hw/arm/aspeed: Enable AST1700 IO expander support

Set ioexp_num to 2 to enable AST1700 IO expander support.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-20-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Model AST1700 I3C block as unimplemented device
Kane Chen [Wed, 4 Feb 2026 08:21:40 +0000 (08:21 +0000)] 
hw/arm/aspeed: Model AST1700 I3C block as unimplemented device

AST1700 exposes more I3C buses than the current dummy I3C model
provides. When Linux probes the I3C devices on AST1700 this mismatch
can trigger a kernel panic. Model the I3C block as an unimplemented
device to make the missing functionality explicit and avoid unexpected
side effects.

This wires up the I3C interrupt lines for the IO expanders and adds the
corresponding device entries for the AST1700 model.

No functional I3C emulation is provided yet; this only prevents crashes and
documents the missing piece.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-19-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach SGPIOM device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:39 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach SGPIOM device to AST1700 model

Connect the SGPIOM device to AST1700 model.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-18-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach PWM device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:38 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach PWM device to AST1700 model

Connect the PWM device to AST1700 model.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-17-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach WDT device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:36 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach WDT device to AST1700 model

Connect the WDT device to AST1700 model.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-16-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: attach I2C device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:35 +0000 (08:21 +0000)] 
hw/arm/aspeed: attach I2C device to AST1700 model

Connect the I2C controller to the AST1700 model by mapping its MMIO
region and wiring its interrupt line.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-15-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach GPIO device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:33 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach GPIO device to AST1700 model

Connect the GPIO controller to the AST1700 model by mapping its MMIO
region and wiring its interrupt line.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-14-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach SCU device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:31 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach SCU device to AST1700 model

Connect the SCU device to AST1700 model.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-13-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach ADC device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:30 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach ADC device to AST1700 model

Connect the ADC device to AST1700 model.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-12-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach SPI device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:28 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach SPI device to AST1700 model

Connect the SPI device to AST1700 model.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-11-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach SRAM device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:26 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach SRAM device to AST1700 model

Map the SRAM device to AST1700 model

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-10-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach UART device to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:25 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach UART device to AST1700 model

Connect the UART controller to the AST1700 model by mapping its MMIO
region.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-9-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach LTPI controller to AST1700 model
Kane Chen [Wed, 4 Feb 2026 08:21:24 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach LTPI controller to AST1700 model

Connect the LTPI controller to the AST1700 model by mapping its MMIO
region.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-8-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Integrate interrupt controller for AST1700
Kane Chen [Wed, 4 Feb 2026 08:21:22 +0000 (08:21 +0000)] 
hw/arm/aspeed: Integrate interrupt controller for AST1700

Connect the AST1700 interrupt lines to the GIC in AST27X0, enabling
the propagation of AST1700-originated interrupts to the host SoC.

This patch does not implement interrupt sources in AST1700 itself,
only the wiring into AST27X0.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-7-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Integrate AST1700 device into AST27X0
Kane Chen [Wed, 4 Feb 2026 08:21:21 +0000 (08:21 +0000)] 
hw/arm/aspeed: Integrate AST1700 device into AST27X0

Connect the AST1700 device as a child of the AST27X0 model to reflect
its role in DC-SCM 2.0 LTPI-based architectures. This patch wires
the AST1700 device into the platform without introducing functional
peripherals.

This forms the base for LTPI expander emulation in QEMU using
AST27X0 as the host controller.

Note: ioexp_num is set to 0 at this stage. Once all related devices
and interrupts are fully implemented, ioexp_num will be updated to
its expected value. This ensures the machine remains functional at
every commit and avoids potential compiler or build issues.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-6-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Add AST1700 LTPI expander device model
Kane Chen [Wed, 4 Feb 2026 08:21:19 +0000 (08:21 +0000)] 
hw/arm/aspeed: Add AST1700 LTPI expander device model

Introduce a minimal QEMU device model for the ASPEED AST1700, an
MCU-less I/O expander used in the LTPI topology defined by the
DC-SCM 2.0 specification (see figure 2):
https://www.opencompute.org/documents/ocp-dc-scm-2-0-ltpi-ver-1-0-pdf

This initial implementation includes:

* Definition of aspeed.ast1700 as a SysBusDevice

* Setup of a basic memory region to reserve I/O space for future
  peripheral modeling

This stub establishes the foundation for LTPI-related device emulation,
without implementing any functional peripherals at this stage.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-5-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/misc: Add basic Aspeed PWM model
Kane Chen [Wed, 4 Feb 2026 08:21:18 +0000 (08:21 +0000)] 
hw/misc: Add basic Aspeed PWM model

Add an initial PWM model for Aspeed SoCs, including device state,
register definitions, and basic initialization as a sysbus device.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-4-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: Attach LTPI controller to AST27X0 platform
Kane Chen [Wed, 4 Feb 2026 08:21:17 +0000 (08:21 +0000)] 
hw/arm/aspeed: Attach LTPI controller to AST27X0 platform

Connect the LTPI controller device (representing the AST1700 I/O
expander) to the AST27X0 SoC model. This patch sets up the memory
mapping and device registration according to the AST2700 SoC design,
where the LTPI controller is exposed at fixed MMIO regions.

This change only handles device instantiation and integration,
without implementing the controller's internal logic.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-3-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/misc: Add LTPI controller
Kane Chen [Wed, 4 Feb 2026 08:21:15 +0000 (08:21 +0000)] 
hw/misc: Add LTPI controller

LTPI (LVDS Tunneling Protocol & Interface) is defined in the OCP DC-SCM
2.0 specification:
https://www.opencompute.org/documents/ocp-dc-scm-2-0-ltpi-ver-1-0-pdf

LTPI is a protocol and physical interface for tunneling various low-speed
signals between the HPM and SCM. As shown in Figure 2, the AST27x0 (left)
integrates two LTPI controllers, allowing it to connect to up to two
extended boards.

This commit introduces a simple device model for the ASPEED LTPI
controller in QEMU.

The model includes basic MMIO read/write operations and sets default
register values during reset to emulate a link-up state.

Implements register space with read/write callbacks.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260204082113.3955407-2-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agodocs/system/arm/aspeed: Load raw U-Boot image in AST2700 boot example
Jamin Lin [Tue, 3 Feb 2026 02:08:53 +0000 (10:08 +0800)] 
docs/system/arm/aspeed: Load raw U-Boot image in AST2700 boot example

Recent SDK versions no longer provide a U-Boot FIT image, and U-Boot is
now built as a single raw binary. Update the documentation to load the
raw u-boot.bin image directly.

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/20260203020855.1642884-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/aarch64/test_aspeed_ast2700fc: Update test ASPEED SDK v11.00 for A1
Jamin Lin [Tue, 3 Feb 2026 02:08:52 +0000 (10:08 +0800)] 
tests/functional/aarch64/test_aspeed_ast2700fc: Update test ASPEED SDK v11.00 for A1

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/20260203020855.1642884-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/aarch64/test_aspeed_ast2700: Update test ASPEED SDK v11.00 for A1
Jamin Lin [Tue, 3 Feb 2026 02:08:51 +0000 (10:08 +0800)] 
tests/functional/aarch64/test_aspeed_ast2700: Update test ASPEED SDK v11.00 for A1

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/20260203020855.1642884-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/aarch64/test_aspeed_ast2700: Enable PCIe2 DTS status for AST2700...
Jamin Lin [Tue, 3 Feb 2026 02:08:50 +0000 (10:08 +0800)] 
tests/functional/aarch64/test_aspeed_ast2700: Enable PCIe2 DTS status for AST2700 tests

PCIe2 is disabled by default starting from SDK v10.00.

Add a helper function to stop U-Boot autoboot and update the device
tree at runtime, setting the PCIe2 node status to "okay" before
booting Linux. This allows the AST2700 functional test to verify
the PCIe2 root complex behavior correctly.

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/20260203020855.1642884-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/i2c/aspeed_i2c: Fix DMA moving data into incorrect address
Jamin Lin [Tue, 3 Feb 2026 02:08:49 +0000 (10:08 +0800)] 
hw/i2c/aspeed_i2c: Fix DMA moving data into incorrect address

In the previous design, the I2C model updated dma_dram_offset only when
firmware programmed the RX/TX DMA buffer address registers. The firmware
used to rewrite these registers before issuing each DMA command.

The firmware driver behavior has changed to program the DMA address
registers only once during I2C initialization. As a result, the I2C model
no longer refreshes dma_dram_offset, causing DMA to move data into an
incorrect DRAM address.

Fix this by introducing helper functions to update dma_dram_offset from
the DMA address registers, and invoke them right before handling TX/RX
DMA operations. This guarantees DMA always uses the correct buffer
address even if the registers are programmed only once.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Fixes: c400c38854017eeccda63115814eba4c3ef2b51f ("hw/i2c/aspeed: Introduce a new dma_dram_offset attribute in AspeedI2Cbus")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260203020855.1642884-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed_ast27x0: Sort SSP and TSP IRQ maps
Jamin Lin [Tue, 3 Feb 2026 02:08:48 +0000 (10:08 +0800)] 
hw/arm/aspeed_ast27x0: Sort SSP and TSP IRQ maps

Sort the SSP and TSP IRQ map tables to improve readability and make the
definitions easier to maintain.

No functional change.

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/20260203020855.1642884-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed_ast27x0: Sort SSP and TSP memmap tables by address
Jamin Lin [Tue, 3 Feb 2026 02:08:47 +0000 (10:08 +0800)] 
hw/arm/aspeed_ast27x0: Sort SSP and TSP memmap tables by address

Sort the SSP and TSP memmap tables to improve readability and
make the definitions easier to maintain.

No functional change.

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/20260203020855.1642884-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed_ast27x0: Fix EHCI3/4 IRQ routing to GIC
Jamin Lin [Tue, 3 Feb 2026 02:08:46 +0000 (10:08 +0800)] 
hw/arm/aspeed_ast27x0: Fix EHCI3/4 IRQ routing to GIC

EHCI3 and EHCI4 were missing entries in aspeed_soc_ast2700a1_irqmap,
so their source IRQs were never routed through the INTC OR-gates.

As a result, EHCI3/4 interrupts were not propagated to the GIC,
causing incorrect interrupt behavior for these controllers.

Add EHCI3 and EHCI4 to the IRQ map and route them to the same INTC
group as other shared peripherals, ensuring their interrupts are
properly connected to the GIC.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Fixes: ba27ba302a264117c8b8427f944ced1bed17c438 ("hw/arm: ast27x0: Wire up EHCI controllers")
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260203020855.1642884-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/arm/test_aspeed_ast1030: Update test ASPEED Zephyr SDK v03.05
Jamin Lin [Tue, 27 Jan 2026 03:23:43 +0000 (11:23 +0800)] 
tests/functional/arm/test_aspeed_ast1030: Update test ASPEED Zephyr SDK v03.05

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/20260127032348.2238527-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/arm/test_aspeed_ast1060: Update test aspeed-zephyr-project v03.04
Jamin Lin [Tue, 27 Jan 2026 03:23:42 +0000 (11:23 +0800)] 
tests/functional/arm/test_aspeed_ast1060: Update test aspeed-zephyr-project v03.04

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/20260127032348.2238527-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/arm/test_aspeed_ast2600_sdk: Update test ASPEED SDK v11.00
Jamin Lin [Tue, 27 Jan 2026 03:23:41 +0000 (11:23 +0800)] 
tests/functional/arm/test_aspeed_ast2600_sdk: Update test ASPEED SDK v11.00

Drop root device and set root bus number to 0.

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/20260127032348.2238527-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed_ast2600: Expand RC_H PCIe MMIO window to 0x60000000 - 0x80000000
Jamin Lin [Tue, 27 Jan 2026 03:23:40 +0000 (11:23 +0800)] 
hw/arm/aspeed_ast2600: Expand RC_H PCIe MMIO window to 0x60000000 - 0x80000000

Historically, the ASPEED PCIe driver supported both RC_L and RC_H, with RC_L
using MMIO window 0x60000000 - 0x70000000 and RC_H using 0x70000000 - 0x80000000.

Mainline Linux has dropped RC_L support and now supports RC_H only, updating
RC_H to use a single combined MMIO window 0x60000000 - 0x80000000.

Update the AST2600 QEMU model accordingly by moving PCIE_MMIO1 base to
0x60000000 and increasing the aliased MMIO size to 0x20000000.

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/20260127032348.2238527-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/pci-host/aspeed_pcie: Drop AST2600 RC_H root-bus remap and bus-nr property
Jamin Lin [Tue, 27 Jan 2026 03:23:39 +0000 (11:23 +0800)] 
hw/pci-host/aspeed_pcie: Drop AST2600 RC_H root-bus remap and bus-nr property

The original AST2600 PCIe design supported both RC_L and RC_H, using root bus
number 0 for RC_L and 0x80 for RC_H. In that model, the root port appeared as
80:08.0 and QEMU carried a "bus-nr" property plus a config-space bus remap to
translate bus 0x80 to bus 0x00 for PCI enumeration.

Linux mainline has since dropped RC_L support and updated the RC_H root bus
number to start at 0. The root port is now enumerated as 00:08.0, matching the
default QEMU PCIe subsystem root bus numbering.

Remove the bus number setting and the AST2600 bus remap logic, and drop the
corresponding "bus-nr"/rc_bus_nr fields and property plumbing. QEMU now relies
on the default root bus 0 behavior.

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/20260127032348.2238527-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/pci-host/aspeed_pcie: Drop AST2600 PCIe root device
Jamin Lin [Tue, 27 Jan 2026 03:23:38 +0000 (11:23 +0800)] 
hw/pci-host/aspeed_pcie: Drop AST2600 PCIe root device

AST2600 PCIe previously exposed a root bus at 0x80 with both a
root device at 80:00.0 and a root port at 80:08.0.

Recent ASPEED SDK PCIe driver updates decided to remove the root
device and keep only a single root port. This behavior has already
been accepted by the upstream Linux kernel.

Update the QEMU PCIe model accordingly by dropping the root device
implementation and related properties. AST2600 now matches the
AST2700 PCIe topology and no longer supports the legacy RC_L
layout.

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/20260127032348.2238527-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/arm/test_aspeed_ast2500: Update test ASPEED SDK v10.00
Jamin Lin [Tue, 27 Jan 2026 03:23:37 +0000 (11:23 +0800)] 
tests/functional/arm/test_aspeed_ast2500: Update test ASPEED SDK v10.00

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/20260127032348.2238527-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/adc: Fix out-of-bounds write in Aspeed ADC model
Cédric Le Goater [Mon, 26 Jan 2026 14:18:20 +0000 (15:18 +0100)] 
hw/adc: Fix out-of-bounds write in Aspeed ADC model

The 'regs' array has ASPEED_ADC_NR_REGS (52) elements, while the
memory region covers offsets 0x00-0xFC. The aspeed_adc_engine_write()
function has an out-of-bounds write vulnerability when accessing
unimplemented registers.

Fix this by using 'return' instead of 'break' in the default case,
which prevents execution from reaching the s->regs[reg] assignment for
unimplemented registers.

Reported-by: Elhrj Saad <saadelhrj@gmail.com>
Fixes: 5857974d5d11 ("hw/adc: Add basic Aspeed ADC model")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260126141820.719492-1-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/arm/aspeed: catalina: use pca9535
Patrick Williams [Wed, 21 Jan 2026 18:17:06 +0000 (13:17 -0500)] 
hw/arm/aspeed: catalina: use pca9535

A few entries in the catalina model were using the PCA9552 chip
because it was "close enough" in function.  Since there is a PCA9535
model now, switch to use it.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260121-pca9535-v1-2-164640e622ff@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/gpio/pca9552: add pca9535 support
Patrick Williams [Wed, 21 Jan 2026 18:17:05 +0000 (13:17 -0500)] 
hw/gpio/pca9552: add pca9535 support

Extend the 16-bit PCA9552 model to support non-LED devices such as
the PCA9535[1].

[1]: https://www.ti.com/lit/ds/symlink/pca9535.pdf

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20260121-pca9535-v1-1-164640e622ff@stwcx.xyz
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/i2c/aspeed_i2c.c: Add a check for dma_read
Nabih Estefan [Tue, 20 Jan 2026 21:11:16 +0000 (21:11 +0000)] 
hw/i2c/aspeed_i2c.c: Add a check for dma_read

If aspeed_i2c_dma_read fails in aspeed_i2c_bus_send currently, we get
stuck in an infinite retry loop. Add a check for the return value of
aspeed_i2c_dma_read that will break us out of said loop.

Signed-off-by: Nabih Estefan <nabihestefan@google.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Fixes: 545d6bef7097 ("aspeed/i2c: Add support for DMA transfers")
Link: https://lore.kernel.org/qemu-devel/20260120211116.1367476-1-nabihestefan@google.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agoMAINTAINERS: Update ASPEED entry
Jamin Lin [Fri, 16 Jan 2026 08:24:28 +0000 (16:24 +0800)] 
MAINTAINERS: Update ASPEED 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/20260116082431.3689035-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agohw/i2c/aspeed: Introduce 'bus-label' to customize bus naming
Kane-Chen-AS [Mon, 12 Jan 2026 08:30:53 +0000 (16:30 +0800)] 
hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming

On some Aspeed-based machines, multiple I2C controllers may exist
across different components, such as the primary SoC and an external
IO expander or co-processor (e.g., AST1700). Using the current static
naming convention results in object name conflicts when multiple
controllers attempt to instantiate buses with the same ID.

This patch introduces a 'bus-label' property for the Aspeed I2C
controller. This allows higher-level layers, such as the SoC realize
function, to provide a unique identifier for the buses. The I2C bus
object name is then constructed using this label (e.g., "ioexp0.0"
instead of the default "aspeed.i2c.bus.0").

This enhancement ensures unique bus identifiers across the system and
resolves naming conflicts in multi-controller configurations.

Signed-off-by: Kane-Chen-AS <kane_chen@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Nabih Estefan <nabihestefan@google.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260112083054.4151945-2-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agotests/functional/arm/aspeed: Update buildroot images to 2025.11
Cédric Le Goater [Mon, 5 Jan 2026 16:03:58 +0000 (17:03 +0100)] 
tests/functional/arm/aspeed: Update buildroot images to 2025.11

The main changes compared to upstream 2025.11 buildroot are

  - Linux v6.18
  - latest OpenBMC U-Boot
  - extra packages (ssh, etc.)

See

  https://github.com/legoater/buildroot/commits/aspeed-2025.11

Acked-by: Jamin Lin <jamin_lin@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20260105160358.771511-1-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agoMerge tag 'pull-vbootrom-20260116-v3' into aspeed-next
Cédric Le Goater [Wed, 4 Feb 2026 07:24:03 +0000 (08:24 +0100)] 
Merge tag 'pull-vbootrom-20260116-v3' into aspeed-next

vbootrom update pull request v3

* tag 'pull-vbootrom-20260116-v3':
  pc-bios: Update vbootrom image to commit 1c8e9510b22c

Signed-off-by: Cédric Le Goater <clg@redhat.com>
6 months agoMerge tag 'single-binary-20260203' of https://github.com/philmd/qemu into staging
Richard Henderson [Tue, 3 Feb 2026 15:57:26 +0000 (01:57 +1000)] 
Merge tag 'single-binary-20260203' of https://github.com/philmd/qemu into staging

Various patches related to single binary effort:

- Endianness cleanups on various targets (PPC in particular)
- Few cleanups around target_ulong type on Alpha
- Have CPUClass::disas_set_info() take a const CPUState

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmmCDTkACgkQ4+MsLN6t
# wN7vHQ/+LCAYESbTy7cXeKGgAslwPbX1Q2zYGk0rhGMgrbBtQThbgQSkNsAwYmzg
# 6vx5crw9vYA/kLq0jyJQPTRIAKzXH9BzdEfTsEt5AIpZv6Cc4im6JBZdrxUa6S0O
# AMGb4pn9bpkcwHOv2ufotJbl0fa+id4WgQgXyLDEgwgNVvY18fVWfn5OwAon2bWo
# nb6zqRfwgdyAB+liwmlPNI+M4hZ3vDdct7whUP8t37FjTL0lNrsyG/Epr0xJB5ru
# CRsjubBkXAq8HlmwHZp8JSM/Lriitp8Z2ubD8VBqYbMYI25XUnRlBWWxTnQKkaDD
# Vgbq67UqS/k/X6vV5cfJaeS2qOdgF98V0VmrOqlNXTwMU56lzMn0ThgLqUXznRos
# IUfTUvmjfGu63aAWG2l+HBrehK5JEAGYzK6ZTiTA6abpvfHUjehslsQlAlMgcSnL
# TnMsM7mxS+XNbf6bsew0azTt2p/V81JDVrQuQgmAJS9ZOpALMFGep5YAYKvN/kLf
# cSbl+hQRsxqxQPoc6y0NrnCcfT33U1+I+IXpMIR/VyC0RgseW9HeRdJWuNyKBW/4
# VUBnQnYNhZM9hDHKp5PzU2KhoeudAlK3gws8zvtWfLCFyAvfmEYX0Gt5r23JkoxT
# IO340Jz5XRwfXMWENc6Bm8lqr7HilQi28HFNXWdy897YfNS83Ow=
# =J0gm
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 04 Feb 2026 12:59:05 AM AEST
# 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-20260203' of https://github.com/philmd/qemu: (30 commits)
  disas: Have disas_set_info() take a const CPUState
  disas: Make disassemble_info::target_info field const
  disas/riscv: Make rv_decode::cfg const
  target/arm: Have arm_sctlr_b() take a const @env argument
  target/arm: Have is_64() take a const @env argument
  target/arm: Have cpu_isar_feature() use a const ARMCPU object
  target/arm: Have arm_feature() take a const @env argument
  target/alpha: Expand TCGv type for 64-bit target
  target/alpha: Remove target_ulong uses in get_physical_address()
  target/alpha: Do not use target_ulong for page table entries / indexes
  target/alpha: Do not use target_ulong for trap arguments
  target/alpha: Replace target_ulong -> uint64_t in gdb_write_register()
  target/alpha: Build system units in common source set
  target/alpha: Avoid target-specific migration headers in machine.c
  target/m68k: Inline translator_ld[uw,l,q]() calls
  target/i386: Inline translator_ld[uw,l,q]() calls
  target/riscv: Inline translator_ld[uw,l,q]() calls
  target/riscv: Inline cpu_ld[lq]_code() calls
  target/ppc: Inline cpu_ldl_code() call in ppc_ldl_code()
  target/ppc: Check endianness at runtime in ppc_data_endian_env()
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 months agoMerge tag 'firmware-20260203-pull-request' of https://gitlab.com/kraxel/qemu into...
Richard Henderson [Tue, 3 Feb 2026 15:56:55 +0000 (01:56 +1000)] 
Merge tag 'firmware-20260203-pull-request' of https://gitlab.com/kraxel/qemu into staging

firmware updates for 11.0
- igvm: rework reset handling.
- igvm: add MADT parameter support.
- uefi: variable store fixes.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmmB5AYACgkQTLbY7tPo
# cThR7Q//d5Z9cIQEOn7hqAgsqyz4llvyLpZk+pWuyQmJ7iBtF7geP0p61iICi5vP
# +jyKJChHtPQzAQLqKwgHLWAuYSW82EZPh74YvL4MBNe7WX8LouHvCoTsOE28Nxqx
# EWDtucSwwwQpx/r1iSSHEHqjlV2MudlGFMaOb0+by57j2ZsAGEe/0J+yF07hhXLQ
# OxQY1l8gHC+PK6BnRLnwIlBVBe+o2E9hJeV0GA/zd1UufTxsan/r06T1JRsdNhPe
# vkBFedwPz+4+jKbOVWBp2pY5FSxmIEe+sOqRdhFvyvz+KBziAyisCNtv/eABrd9h
# Jk/yfvrDIZEJk7GtwMAC/un+zz/iQfu9BK3EAtT5OnUCEbj7HNaEjuStB2AnfBnw
# 4clhjPA+qwej1771zAuKC5HOc+2mMxbON/roD4nGcEY3WKq7JvjUrIopesJcgCCu
# TjV1UXAxyG6CRvsiUc3uesdleumAqt3I4+OryfnPY5SloYjlg+bEW8fpKvXmI82l
# uZsI1SL3yqXJMVQEh0cS7awquKKkjzNR0CGR+a9KBMl3kCiuAPPkevEhERpd1J6V
# W6zZrNI9IHczBKrZEJ42apXutGmADDZUdREjktc4gUBvTzC317bfSTGk/tvQQe7N
# lRr9KV+56bSVrnLiqcCzfVj8U2YTecsvO98Xp28W3nwwvIls3mQ=
# =npQG
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 03 Feb 2026 10:03:18 PM AEST
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [unknown]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [unknown]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [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: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* tag 'firmware-20260203-pull-request' of https://gitlab.com/kraxel/qemu:
  igvm: Fill MADT IGVM parameter field on x86_64
  igvm: Only build stubs if igvm is enabled
  igvm: Pass machine state to IGVM file processing
  igvm: Refactor qigvm_parameter_insert
  igvm: Add common function for finding parameter entries
  igvm: Move structs to internal header
  hw/acpi: Add standalone function to build MADT
  hw/acpi: Make BIOS linker optional
  hw/acpi: Make acpi_checksum() public
  igvm: move igvm file processing to reset callbacks
  igvm: add trace points for igvm file loading and processing
  igvm: move file load to complete callback
  igvm: make igvm-cfg object resettable
  igvm: reorganize headers
  hw/uefi: fix size negotiation
  hw/uefi: skip time check for append-write updates.
  docs/system/igvm.rst: Update external links

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
6 months agodisas: Have disas_set_info() take a const CPUState
Philippe Mathieu-Daudé [Thu, 29 Jan 2026 15:03:24 +0000 (16:03 +0100)] 
disas: Have disas_set_info() take a const CPUState

The CPUClass::disas_set_info() handler is meant to initialize
the %disassemble_info structure; it shoudn't alter the CPU state.
Enforce the CPUState can not be modified by having the handler
take a const pointer.

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

6 months agodisas: Make disassemble_info::target_info field const
Philippe Mathieu-Daudé [Thu, 29 Jan 2026 14:56:41 +0000 (15:56 +0100)] 
disas: Make disassemble_info::target_info field const

Disassemblers shouldn't need writeable context, so make the
disassemble_info::target_info field const.

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

6 months agodisas/riscv: Make rv_decode::cfg const
Philippe Mathieu-Daudé [Thu, 29 Jan 2026 14:56:27 +0000 (15:56 +0100)] 
disas/riscv: Make rv_decode::cfg const

Disassembler is not expected to alter the CPU config.
Besides, all other RISC-V methods takes a const RISCVCPUConfig.
Make the @cfg field of the rv_decode structure const, passing
a const pointer to disasm_inst().

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

6 months agotarget/arm: Have arm_sctlr_b() take a const @env argument
Philippe Mathieu-Daudé [Thu, 29 Jan 2026 15:01:48 +0000 (16:01 +0100)] 
target/arm: Have arm_sctlr_b() take a const @env argument

arm_sctlr_b() only access @env read-only, make it const.

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

6 months agotarget/arm: Have is_64() take a const @env argument
Philippe Mathieu-Daudé [Mon, 20 Jan 2025 02:54:31 +0000 (03:54 +0100)] 
target/arm: Have is_64() take a const @env argument

is_64() only access @env read-only, make it const.

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

6 months agotarget/arm: Have cpu_isar_feature() use a const ARMCPU object
Philippe Mathieu-Daudé [Mon, 20 Jan 2025 03:08:31 +0000 (04:08 +0100)] 
target/arm: Have cpu_isar_feature() use a const ARMCPU object

The @cpu_ variable is only accessed read-only, make it const.

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

6 months agotarget/arm: Have arm_feature() take a const @env argument
Philippe Mathieu-Daudé [Mon, 20 Jan 2025 02:51:38 +0000 (03:51 +0100)] 
target/arm: Have arm_feature() take a const @env argument

arm_feature() only access @env read-only, make it const.

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

6 months agotarget/alpha: Expand TCGv type for 64-bit target
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 23:26:22 +0000 (00:26 +0100)] 
target/alpha: Expand TCGv type for 64-bit target

The Alpha targets are only built as 64-bit:

  $ git grep TARGET_LONG_BITS configs/targets/alpha-*
  configs/targets/alpha-linux-user.mak:4:TARGET_LONG_BITS=64
  configs/targets/alpha-softmmu.mak:2:TARGET_LONG_BITS=64

Replace:

  TCGv -> TCGv_i64
  tcg_temp_new -> tcg_temp_new_i64

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: <20260202234550.34156-8-philmd@linaro.org>

6 months agotarget/alpha: Remove target_ulong uses in get_physical_address()
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 23:07:38 +0000 (00:07 +0100)] 
target/alpha: Remove target_ulong uses in get_physical_address()

%addr is a virtual address, so use the 'vaddr' type.
%pphys is a pointer to a physical address, so use the 'hwaddr' type.

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

6 months agotarget/alpha: Do not use target_ulong for page table entries / indexes
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 23:06:57 +0000 (00:06 +0100)] 
target/alpha: Do not use target_ulong for page table entries / indexes

%L[123]pte are loaded calling ldq_le_phys() which returns
a uint64_t. %pt is loaded with @ptbr, declared as uint64_t
in target/alpha/cpu.h:

  236    uint64_t ptbr;

%index is at most 1024 so can fit in uint16_t.

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

6 months agotarget/alpha: Do not use target_ulong for trap arguments
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 23:08:35 +0000 (00:08 +0100)] 
target/alpha: Do not use target_ulong for trap arguments

%mmcsr and %cause are filled with @trap_arg1 / @trap_arg2,
both declared as uint64_t in target/alpha/cpu.h:

    229     uint64_t trap_arg1;
    230     uint64_t trap_arg2;
    ...

Use uint64_t instead of target_ulong.

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

6 months agotarget/alpha: Replace target_ulong -> uint64_t in gdb_write_register()
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 23:00:21 +0000 (00:00 +0100)] 
target/alpha: Replace target_ulong -> uint64_t in gdb_write_register()

On Alpha, the target_ulong type expands to uint64_t.
Besides, ldq_be_p() returns a uint64_t type, and all
field / values accessed are uint64_t, see target/alpha/cpu.h:

  200 typedef struct CPUArchState {
  201     uint64_t ir[31];
  202     float64 fir[31];
  203     uint64_t pc;
  204     uint64_t unique;
  ...
  443 void cpu_alpha_store_fpcr (CPUAlphaState *env, uint64_t val);
  445 void cpu_alpha_store_gr(CPUAlphaState *env, unsigned reg, uint64_t val);

Use uint64_t instead of target_ulong.

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

6 months agotarget/alpha: Build system units in common source set
Philippe Mathieu-Daudé [Wed, 7 Jan 2026 08:30:32 +0000 (09:30 +0100)] 
target/alpha: Build system units in common source set

Since commits bb5de52524c ("target: Widen pc/cs_base in
cpu_get_tb_cpu_state") and 32f0c394bbf ("target: Use vaddr
in gen_intermediate_code") we remove all uses of the target_ulong
type in target/alpha/. Use the meson target_common_system_arch[]
source set to prevent further uses of target-specific types.

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

6 months agotarget/alpha: Avoid target-specific migration headers in machine.c
Philippe Mathieu-Daudé [Wed, 7 Jan 2026 08:30:24 +0000 (09:30 +0100)] 
target/alpha: Avoid target-specific migration headers in machine.c

machine.c doesn't use any target-specific macro defined by
the "migration/cpu.h" header. Use the minimum header required:
"migration/qemu-file-types.h" and "migration/vmstate.h", which
are not target-specific.

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

6 months agotarget/m68k: Inline translator_ld[uw,l,q]() calls
Philippe Mathieu-Daudé [Thu, 27 Nov 2025 15:50:59 +0000 (16:50 +0100)] 
target/m68k: Inline translator_ld[uw,l,q]() calls

In preparation of removing the translator_ld[uw,l,q]() methods,
inline them for the m68k target, expanding MO_TE -> MO_BE since
this architecture is only available in big endianness.

Mechanical change using the following Coccinelle 'spatch' script:

    @@
    expression env, db, pc, do_swap;
    @@
    (
    - translator_lduw(env, db, pc)
    + translator_lduw_end(env, db, pc, MO_BE)
    |
    - translator_ldl(env, db, pc)
    + translator_ldl_end(env, db, pc, MO_BE)
    |
    - translator_ldq(env, db, pc)
    + translator_ldq_end(env, db, pc, MO_BE)
    )

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20260202214050.98935-1-philmd@linaro.org>

6 months agotarget/i386: Inline translator_ld[uw,l,q]() calls
Philippe Mathieu-Daudé [Mon, 26 Jan 2026 19:08:24 +0000 (20:08 +0100)] 
target/i386: Inline translator_ld[uw,l,q]() calls

In preparation of removing the translator_ld[uw,l,q]() methods,
inline them for the x86 targets, expanding MO_TE -> MO_LE since
the architecture uses little endian order.

Mechanical change using the following Coccinelle 'spatch' script:

    @@
    expression env, db, pc, do_swap;
    @@
    (
    - translator_lduw(env, db, pc)
    + translator_lduw_end(env, db, pc, MO_LE)
    |
    - translator_ldl(env, db, pc)
    + translator_ldl_end(env, db, pc, MO_LE)
    |
    - translator_ldq(env, db, pc)
    + translator_ldq_end(env, db, pc, MO_LE)
    )

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

6 months agotarget/riscv: Inline translator_ld[uw,l,q]() calls
Philippe Mathieu-Daudé [Thu, 27 Nov 2025 15:54:20 +0000 (16:54 +0100)] 
target/riscv: Inline translator_ld[uw,l,q]() calls

In preparation of removing the translator_ld[uw,l,q]() methods,
inline them for the RISC-V targets, using mo_endian(ctx) -- which
we introduced in commit 504f7f304ff -- instead of MO_TE.

Mechanical change using the following Coccinelle 'spatch' script:

    @@
    expression env, db, pc, do_swap;
    @@
    (
    - translator_lduw(env, db, pc)
    + translator_lduw_end(env, db, pc, mo_endian(ctx))
    |
    - translator_ldl(env, db, pc)
    + translator_ldl_end(env, db, pc, mo_endian(ctx))
    |
    - translator_ldq(env, db, pc)
    + translator_ldq_end(env, db, pc, mo_endian(ctx))
    )

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

6 months agotarget/riscv: Inline cpu_ld[lq]_code() calls
Philippe Mathieu-Daudé [Thu, 20 Nov 2025 19:47:20 +0000 (20:47 +0100)] 
target/riscv: Inline cpu_ld[lq]_code() calls

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

Since RISC-V instructions are always stored in little-endian order
(see "Volume I: RISC-V Unprivileged ISA" document, chapter
'Instruction Encoding Spaces and Prefixes': "instruction fetch
in RISC-V is little-endian"), replace MO_TE -> MO_LE.

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

6 months agotarget/ppc: Inline cpu_ldl_code() call in ppc_ldl_code()
Philippe Mathieu-Daudé [Thu, 20 Nov 2025 20:00:33 +0000 (21:00 +0100)] 
target/ppc: Inline cpu_ldl_code() call in ppc_ldl_code()

In preparation of removing the cpu_ldl_code wrapper, inline it.

Get the runtime endianness with ppc_data_endian_env(), passing it
to cpu_ldl_code_mmu(). No need to swap versus qemu-system binary
anymore.

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

6 months agotarget/ppc: Check endianness at runtime in ppc_data_endian_env()
Philippe Mathieu-Daudé [Thu, 22 Jan 2026 20:22:14 +0000 (21:22 +0100)] 
target/ppc: Check endianness at runtime in ppc_data_endian_env()

Rather a runtime endianness check via env MSR over
a build-time one.

Now CPU can change endianness at runtime.

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

6 months agotarget/ppc: Introduce ppc_env_is_little_endian() helper
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 20:35:57 +0000 (21:35 +0100)] 
target/ppc: Introduce ppc_env_is_little_endian() helper

Centralize endianness check on MSR via a common helper.

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

6 months agotarget/ppc: Check endianness via env in ppc_disas_set_info()
Philippe Mathieu-Daudé [Thu, 4 Dec 2025 17:45:11 +0000 (18:45 +0100)] 
target/ppc: Check endianness via env in ppc_disas_set_info()

disas_set_info() shouldn't bother with env->hflags,
access env->msr directly.

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

6 months agotarget/ppc: Inline need_byteswap() and replace translator_ldl_swap()
Philippe Mathieu-Daudé [Mon, 2 Feb 2026 20:41:45 +0000 (21:41 +0100)] 
target/ppc: Inline need_byteswap() and replace translator_ldl_swap()

Rather than using a boolean with translator_ldl_swap(),
get the MemOp endianness with ppc_code_endian() and pass
it to translator_ldl_end().

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

6 months agotarget/ppc: Introduce ppc_code_endian_dc() helper
Philippe Mathieu-Daudé [Wed, 3 Dec 2025 17:38:11 +0000 (18:38 +0100)] 
target/ppc: Introduce ppc_code_endian_dc() helper

Introduce the ppc_code_endian_dc() helper which returns the
MemOp endianness for the CODE path.

Use it in need_byteswap(), removing one TARGET_BIG_ENDIAN.

Note, the target MemOp endianness can be evaluated as (see
commit 5c43a750b67 "accel/tcg: Implement translator_ld*_end"):

    MO_TE ^ (do_swap * MO_BSWAP)

For PPC we use the DisasContext::le_mode field to swap the
default (big-endian) order, so to get the PPC MemOp endianness
we can directly use:

    MO_BE ^ (ctx->le_mode * MO_BSWAP)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20260202210106.93257-7-philmd@linaro.org>

6 months agotarget/ppc: Introduce ppc_data_endian_env() helper
Philippe Mathieu-Daudé [Wed, 3 Dec 2025 18:08:28 +0000 (19:08 +0100)] 
target/ppc: Introduce ppc_data_endian_env() helper

Introduce ppc_data_endian_env() which returns the endian MemOp
of the data path from the vCPU env pointer. Keep it hardcoded
as MO_TE, the target built-time endianness.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-ID: <20260202210106.93257-6-philmd@linaro.org>

6 months agotarget/ppc: Expect page translation hash addresses to be aligned
Philippe Mathieu-Daudé [Thu, 22 Jan 2026 17:43:50 +0000 (18:43 +0100)] 
target/ppc: Expect page translation hash addresses to be aligned

The page translation hash addresses are aligned:
remove the misleading MO_UNALN flag.

Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20260202210106.93257-5-philmd@linaro.org>

6 months agotarget/ppc: Inline cpu_ld/st_data_ra() calls in do_hash()
Philippe Mathieu-Daudé [Wed, 26 Nov 2025 17:52:27 +0000 (18:52 +0100)] 
target/ppc: Inline cpu_ld/st_data_ra() calls in do_hash()

In preparation of removing the cpu_ld*_data_ra() and
cpu_st*_data_ra() calls, inline them. No logical change
intended.

We note the page translation hash address is expected to
be aligned, so the MO_UNALN flag is misleading. Next commit
will remove it.

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

6 months agotarget/ppc: Inline cpu_ld/st_mmuidx_ra() calls in memory helpers
Philippe Mathieu-Daudé [Wed, 26 Nov 2025 17:57:08 +0000 (18:57 +0100)] 
target/ppc: Inline cpu_ld/st_mmuidx_ra() calls in memory helpers

In preparation of removing the cpu_ld*_mmuidx_ra() and
cpu_st*_mmuidx_ra() calls, inline them.

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

6 months agotarget/ppc: Inline cpu_ldl_data_ra() calls in ICBI helpers
Philippe Mathieu-Daudé [Wed, 26 Nov 2025 18:03:15 +0000 (19:03 +0100)] 
target/ppc: Inline cpu_ldl_data_ra() calls in ICBI helpers

Inline the cpu_ldl_data_ra() call in preparation of
removing it. Since the returned value is discarded,
don't bother to set the access endianness.

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

6 months agotarget-info: add target_base_ppc, target_ppc and target_ppc64
Pierrick Bouvier [Sat, 31 Jan 2026 02:00:55 +0000 (18:00 -0800)] 
target-info: add target_base_ppc, target_ppc and target_ppc64

Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20260131020100.1115203-2-pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
6 months agovhost-user: ancilliary -> ancillary
Michael S. Tsirkin [Mon, 17 Nov 2025 11:54:28 +0000 (06:54 -0500)] 
vhost-user: ancilliary -> ancillary

My dictionary says the former spelling is incorrect.

Message-ID: <52339e58-4366-4b7c-872f-b28e05370a5d@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
6 months agoigvm: Fill MADT IGVM parameter field on x86_64
Oliver Steffen [Fri, 30 Jan 2026 05:47:14 +0000 (06:47 +0100)] 
igvm: Fill MADT IGVM parameter field on x86_64

Use the new acpi_build_madt_standalone() function to fill the MADT
parameter field.

The IGVM parameter can be consumed by Coconut SVSM [1], instead of
relying on the fw_cfg interface, which has caused problems before due to
unexpected access [2,3]. Using IGVM parameters is the default way for
Coconut SVSM across hypervisors; switching over would allow removing
specialized code paths for QEMU in Coconut.

Coconut SVSM needs to know the SMP configuration, but does not look at
any other ACPI data, nor does it interact with the PCI bus settings.
Since the MADT is static and not linked with other ACPI tables, it can
be supplied stand-alone like this.

Generating the MADT twice (during ACPI table building and IGVM processing)
seems acceptable, since there is no infrastructure to obtain the MADT
out of the ACPI table memory area.

In any case OVMF, which runs after SVSM has already been initialized,
will continue reading all ACPI tables via fw_cfg and provide fixed up
ACPI data to the OS as before without any changes.

The IGVM parameter handler is implemented for the i386 machine target
and stubbed for all others.

[1] https://github.com/coconut-svsm/svsm/pull/858
[2] https://gitlab.com/qemu-project/qemu/-/issues/2882
[3] https://github.com/coconut-svsm/svsm/issues/646

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-10-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agoigvm: Only build stubs if igvm is enabled
Oliver Steffen [Fri, 30 Jan 2026 05:47:13 +0000 (06:47 +0100)] 
igvm: Only build stubs if igvm is enabled

Change meson script to only include the IGVM stubs file if the IGVM
feature is enabled. It is used to handle architecture specific
differences within the IGVM backend, not to provide stubs of the backend
itself.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-9-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agoigvm: Pass machine state to IGVM file processing
Oliver Steffen [Fri, 30 Jan 2026 05:47:12 +0000 (06:47 +0100)] 
igvm: Pass machine state to IGVM file processing

Pass the full MachineState to the IGVM backend during file processing,
instead of just the ConfidentialGuestSupport struct (which is a member
of the MachineState).
This replaces the cgs parameter of qigvm_process_file() with the machine
state to make it available in the IGVM processing context.

We will use it later to generate MADT data there to pass to the guest
as IGVM parameter.

Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-8-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agoigvm: Refactor qigvm_parameter_insert
Oliver Steffen [Fri, 30 Jan 2026 05:47:11 +0000 (06:47 +0100)] 
igvm: Refactor qigvm_parameter_insert

Use qigvm_find_param_entry() also in qigvm_parameter_insert().
This changes behavior: Processing now stops after the first parameter
entry found. That is OK, because we expect only one matching entry
anyway.

Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-7-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agoigvm: Add common function for finding parameter entries
Oliver Steffen [Fri, 30 Jan 2026 05:47:10 +0000 (06:47 +0100)] 
igvm: Add common function for finding parameter entries

Move repeating code for finding the parameter entries in the IGVM
backend out of the parameter handlers into a common function.

A warning message is emitted in case a no parameter entry can be found
for a given index.

Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-6-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agoigvm: Move structs to internal header
Oliver Steffen [Fri, 30 Jan 2026 05:47:09 +0000 (06:47 +0100)] 
igvm: Move structs to internal header

Move QIgvm and QIgvmParameter struct definitions from the source file
into an IGVM internal header file to allow implementing architecture
specific IGVM code in other places, for example target/i386/igvm.c.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-5-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agohw/acpi: Add standalone function to build MADT
Oliver Steffen [Fri, 30 Jan 2026 05:47:08 +0000 (06:47 +0100)] 
hw/acpi: Add standalone function to build MADT

Add a function called `acpi_build_madt_standalone()` that builds a MADT
without the rest of the ACPI table structure.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-4-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agohw/acpi: Make BIOS linker optional
Oliver Steffen [Fri, 30 Jan 2026 05:47:07 +0000 (06:47 +0100)] 
hw/acpi: Make BIOS linker optional

Make the BIOS linker optional in acpi_table_end() and calculate the ACPI
table checksum directly if no linker is provided.

This makes it possible to call for example
acpi_build_madt() from outside the ACPI table builder context.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-3-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agohw/acpi: Make acpi_checksum() public
Oliver Steffen [Fri, 30 Jan 2026 05:47:06 +0000 (06:47 +0100)] 
hw/acpi: Make acpi_checksum() public

Make the ACPI table checksum calculation function (in core.c) public so
it can be reused in other parts of the ACPI code.

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Message-ID: <20260130054714.715928-2-osteffen@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
6 months agoigvm: move igvm file processing to reset callbacks
Gerd Hoffmann [Mon, 26 Jan 2026 12:37:55 +0000 (13:37 +0100)] 
igvm: move igvm file processing to reset callbacks

Move igvm file processing from machine init to reset callbacks.  With
that the igvm file is properly re-loaded on reset.  Also the loading
happens later in the init process now.  This will simplify future
support for some IGVM parameters which depend on initialization steps
which happen after machine init.

Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20260126123755.357378-6-kraxel@redhat.com>

6 months agoigvm: add trace points for igvm file loading and processing
Gerd Hoffmann [Mon, 26 Jan 2026 12:37:54 +0000 (13:37 +0100)] 
igvm: add trace points for igvm file loading and processing

Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20260126123755.357378-5-kraxel@redhat.com>

6 months agoigvm: move file load to complete callback
Gerd Hoffmann [Mon, 26 Jan 2026 12:37:53 +0000 (13:37 +0100)] 
igvm: move file load to complete callback

Add UserCreatableClass->complete callback function for igvm-cfg object.

Move file loading and parsing of the igvm file from the process function
to the new complete() callback function.  Keep the igvm file loaded
after processing, release it in finalize() instead, so we parse it only
once.

Reviewed-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20260126123755.357378-4-kraxel@redhat.com>