]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
7 days agohw/arm/aspeed: Move write_boot_rom to common SoC code
Jamin Lin [Thu, 25 Sep 2025 05:05:28 +0000 (13:05 +0800)] 
hw/arm/aspeed: Move write_boot_rom to common SoC code

Move the write_boot_rom helper from hw/arm/aspeed.c into
hw/arm/aspeed_soc_common.c so it can be reused by all ASPEED
machines. Export the API as aspeed_write_boot_rom() in
include/hw/arm/aspeed_soc.h and update the existing call site
to use the new helper.

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/20250925050535.2657256-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm/aspeed: Move aspeed_board_init_flashes() to common SoC code
Jamin Lin [Thu, 25 Sep 2025 05:05:27 +0000 (13:05 +0800)] 
hw/arm/aspeed: Move aspeed_board_init_flashes() to common SoC code

Relocate aspeed_board_init_flashes() from hw/arm/aspeed.c into
hw/arm/aspeed_soc_common.c so the helper can be reused by all
ASPEED machines. The API was already declared in
include/hw/arm/aspeed_soc.h; this change moves its
implementation out of the machine file to keep aspeed.c cleaner.

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/20250925050535.2657256-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agotests/functional/arm/test_aspeed_ast2600: Add PCIe and network test
Jamin Lin [Fri, 19 Sep 2025 09:30:12 +0000 (17:30 +0800)] 
tests/functional/arm/test_aspeed_ast2600: Add PCIe and network test

Extend the AST2600 functional tests with PCIe and network checks.

This patch introduces a new helper "do_ast2600_pcie_test()" that runs "lspci"
on the emulated system and verifies the presence of the expected PCIe devices:

- 80:00.0 Host bridge: ASPEED Technology, Inc. Device 2600
- 80:08.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge
- 81:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection

To exercise the PCIe network device, the test adds:

  -device e1000e,netdev=net1,bus=pcie.0
  -netdev user,id=net1

and assigns an IP address to the interface, verifying it with `ip addr`.

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/20250919093017.338309-14-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm/aspeed_ast27x0: Introduce 3 PCIe RCs for AST2700
Jamin Lin [Fri, 19 Sep 2025 09:30:11 +0000 (17:30 +0800)] 
hw/arm/aspeed_ast27x0: Introduce 3 PCIe RCs for AST2700

Add PCIe Root Complex support to the AST2700 SoC model.

The AST2700 A1 silicon revision provides three PCIe Root Complexes:

PCIe0 with its PHY at 0x12C15000, config (H2X) block at 0x120E0000,
MMIO window at 0x60000000, and GIC IRQ 56.

PCIe1 with its PHY at 0x12C15800, config (H2X) block at 0x120F0000,
MMIO window at 0x80000000, and GIC IRQ 57.

PCIe2 with its PHY at 0x14C1C000, config (H2X) block at 0x140D0000,
MMIO window at 0xA0000000, and IRQ routed through INTC4 bit 31
mapped to GIC IRQ 196.

Each RC instantiates a PHY device, a PCIe config (H2X) bridge, and an MMIO
alias region. The per-RC MMIO alias size is 0x20000000. The AST2700 A0
silicon revision does not support PCIe Root Complexes, so pcie_num is set
to 0 in that variant.

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/20250919093017.338309-13-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Disable Root Device and place Root Port at 00:00.0 to AST2700
Jamin Lin [Fri, 19 Sep 2025 09:30:10 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Disable Root Device and place Root Port at 00:00.0 to AST2700

AST2700 does not implement a PCIe Root Device; each RC exposes a single
PCIe Root Port at devfn 0:0.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/20250919093017.338309-12-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add AST2700 PCIe config with dedicated H2X blocks
Jamin Lin [Fri, 19 Sep 2025 09:30:09 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add AST2700 PCIe config with dedicated H2X blocks

Introduce PCIe config (H2X) support for the AST2700 SoC.

Unlike the AST2600, the AST2700 provides three independent Root Complexes,
each with its own H2X (AHB to PCIe bridge) register block of size 0x100.
All RCs use the same MSI address (0x000000F0). The H2X block includes
two different access paths:

1. CFGI (internal bridge): used to access the host bridge itself, always
   with BDF=0. The AST2700 controller simplifies the design by exposing
   only one register (H2X_CFGI_TLP) with fields for ADDR[15:0], BEN[19:16],
   and WR[20]. This is not a full TLP descriptor as in the external case.
   For QEMU readability and code reuse, the model converts H2X_CFGI_TLP
   into a standard TLP TX descriptor with BDF forced to 0 and then calls
   the existing helpers aspeed_pcie_cfg_readwrite() and
   aspeed_pcie_cfg_translate_write().

2. CFGE (external EP access): used to access external endpoints. The
   AST2700 design provides H2X_CFGE_TLP1 and a small FIFO at H2X_CFGE_TLPN.
   For reads, TX DESC0 is stored in TLP1 and DESC1/DESC2 in TLPN FIFO
   slots. For writes, TX DESC0 is stored in TLP1, DESC1/DESC2 in TLPN
   FIFO[0..1], and TX write data in TLPN FIFO[2].

The implementation extends AspeedPCIECfgState with a small FIFO and index,
wires up new register definitions for AST2700, and adds a specific ops
table and class (TYPE_ASPEED_2700_PCIE_CFG). The reset handler clears the
FIFO state. Interrupt and MSI status registers are also supported.

This provides enough modeling for firmware and drivers to use any of the
three PCIe RCs on AST2700 with their own dedicated H2X config window,
while reusing existing TLP decode helpers in QEMU.

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/20250919093017.338309-11-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add AST2700 PCIe PHY
Jamin Lin [Fri, 19 Sep 2025 09:30:08 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add AST2700 PCIe PHY

Introduce a PCIe Host Controller PHY model for AST2700. This adds an
AST2700 specific PHY type (TYPE_ASPEED_2700_PCIE_PHY) with a 0x800 byte
register space and link-status bits compatible with the firmware’s
expectations.

AST2700 provides three PCIe RCs; PCIe0 and PCIe1 are GEN4, PCIe2 is
GEN2. The PHY exposes:
PEHR_2700_LINK_GEN2 at 0x344, bit 18 indicates GEN2 link up
PEHR_2700_LINK_GEN4 at 0x358, bit 8 indicates GEN4 link up

In real hardware these GEN2/GEN4 link bits are mutually exclusive.
QEMU does not model GEN2 vs GEN4 signaling differences, so the reset
handler sets both bits to 1. This keeps the model simple and lets
firmware see the link as up; firmware will read the appropriate
register per RC port to infer the intended mode.

The header gains TYPE_ASPEED_2700_PCIE_PHY; the new class derives from
TYPE_ASPEED_PCIE_PHY, sets nr_regs to 0x800 >> 2, and installs an
AST2700 reset routine that programs the class code (0x06040011) and the
GEN2/GEN4 status bits.

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/20250919093017.338309-10-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm/aspeed_ast2600: Add PCIe RC support (RC_H only)
Jamin Lin [Fri, 19 Sep 2025 09:30:07 +0000 (17:30 +0800)] 
hw/arm/aspeed_ast2600: Add PCIe RC support (RC_H only)

Wire up the PCIe Root Complex in the AST2600 SoC model.

According to the AST2600 firmware driver, only the RC_H controller is
supported. RC_H uses PCIe PHY1 at 0x1e6ed200 and the PCIe config (H2X)
register block at 0x1e770000. The RC_H MMIO window is mapped at
0x70000000–0x80000000. RC_L is not modeled. The RC_H interrupt is
wired to IRQ 168. Only RC_H is realized and connected to the SoC
interrupt controller.

The SoC integration initializes PCIe PHY1, instantiates a single RC
instance, wires its MMIO regions, and connects its interrupt. An alias
region is added to map the RC MMIO space into the guest physical address
space.

This provides enough functionality for firmware and guest drivers to
discover and use the AST2600 RC_H Root Complex while leaving RC_L
unimplemented.

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/20250919093017.338309-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm/aspeed: Wire up PCIe devices in SoC model
Jamin Lin [Fri, 19 Sep 2025 09:30:06 +0000 (17:30 +0800)] 
hw/arm/aspeed: Wire up PCIe devices in SoC model

Add PCIe controller and PHY instances to the Aspeed SoC state and device
enum. This prepares the SoC model to host PCIe Root Complexes and their
associated PHYs.

Although the AST2600 supports only a single Root Complex, the AST2700
provides three Root Complexes. For this reason, the model defines arrays
of three PCIe config/PHY objects and enumerates three PCIe device IDs so
that both SoCs can be represented consistently.

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/20250919093017.338309-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add MSI support and per-RC IOMMU address space
Jamin Lin [Fri, 19 Sep 2025 09:30:05 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add MSI support and per-RC IOMMU address space

Add MSI support to the ASPEED PCIe RC/Config model and introduce a per-RC
"IOMMU root" address space to correctly route MSI writes.

On AST2700 all RCs use the same MSI address, and the MSI target is PCI
system memory (not normal DRAM). If the MSI window were mapped into real
system RAM, an endpoint's write could be observed by other RCs and
spuriously trigger their interrupts. To avoid this, each RC now owns an
isolated IOMMU root AddressSpace that contains a small MSI window and a
DRAM alias region for normal DMA.

The MSI window captures writes and asserts the RC IRQ. MSI status bits
are tracked in new H2X RC_H registers (R_H2X_RC_H_MSI_EN{0,1} and
R_H2X_RC_H_MSI_STS{0,1}). Clearing all status bits drops the IRQ. The
default MSI address is set to 0x1e77005c and can be overridden via the
msi-addr property.

This keeps MSI traffic contained within each RC while preserving normal
DMA to system DRAM. It enables correct MSI/MSI-X interrupt delivery when
multiple RCs use the same MSI target address.

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/20250919093017.338309-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add AST2600 PCIe Root Port and make address configurable
Jamin Lin [Fri, 19 Sep 2025 09:30:04 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add AST2600 PCIe Root Port and make address configurable

Introduce an ASPEED PCIe Root Port and wire it under the RC. The root port
is modeled as TYPE_ASPEED_PCIE_ROOT_PORT (subclass of TYPE_PCIE_ROOT_PORT).

Key changes:
- Add TYPE_ASPEED_PCIE_ROOT_PORT (PCIESlot-based) with vendor/device IDs
  and AER capability offset.
- Extend AspeedPCIERcState to embed a root_port instance and a
  configurable rp_addr.
- Add "rp-addr" property to the RC to place the root port at a specific
  devfn on the root bus.
- Set the root port's "chassis" property to ensure a unique chassis per RC.
- Extend AspeedPCIECfgClass with rc_rp_addr defaulting to PCI_DEVFN(8,0).

Rationale:
- AST2600 places the root port at 80:08.0 (bus 0x80, dev 8, fn 0).
- AST2700 must place the root port at 00:00.0, and it supports three RCs.
  Each root port must therefore be uniquely identifiable; uses the
  PCIe "chassis" ID for that.
- Providing a configurable "rp-addr" lets platforms select the correct
  devfn per SoC family, while the "chassis" property ensures uniqueness
  across multiple RC instances on AST2700.

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/20250919093017.338309-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add AST2600 PCIe Root Device support
Jamin Lin [Fri, 19 Sep 2025 09:30:03 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add AST2600 PCIe Root Device support

Introduce a PCIe Root Device for AST2600 platform.

The AST2600 root complex exposes a PCIe root device at bus 80, devfn 0.
This root device is implemented as a child of the PCIe RC and modeled
as a host bridge PCI function (class_id = PCI_CLASS_BRIDGE_HOST).

Key changes:
- Add a new device type "aspeed.pcie-root-device".
- Instantiate the root device as part of AspeedPCIERcState.
- Initialize it during RC realize() and attach it to the root bus.
- Mark the root device as non-user-creatable.
- Add RC boolean property "has-rd" to control whether the Root Device is
  created (platforms can enable/disable it as needed).

Note: Only AST2600 implements this PCIe root device. AST2700 does not
provide one.

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/20250919093017.338309-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add AST2600 PCIe config space and host bridge
Jamin Lin [Fri, 19 Sep 2025 09:30:02 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add AST2600 PCIe config space and host bridge

Introduce PCIe config and host bridge model for the AST2600 platform.

This patch adds support for the H2X (AHB to PCIe Bus Bridge) controller
with a 0x100 byte register space. The register layout is shared between
two root complexes: 0x00–0x7f is common, 0x80–0xbf for RC_L, and 0xc0–0xff
for RC_H. Only RC_H is modeled in this implementation.

The RC_H bus uses bus numbers in the 0x80–0xff range instead of the
standard root bus 0x00. To allow the PCI subsystem to discover devices,
the host bridge logic remaps the root bus number back to 0x00 whenever the
configured bus number matches the "bus-nr" property.

New MMIO callbacks are added for the H2X config space:
- aspeed_pcie_cfg_read() and aspeed_pcie_cfg_write() handle register
  accesses.
- aspeed_pcie_cfg_readwrite() provides configuration read/write support.
- aspeed_pcie_cfg_translate_write() handles PCIe byte-enable semantics for
  write operations.

The reset handler initializes the H2X register block with default values
as defined in the AST2600 datasheet.

Additional changes:
- Implement ASPEED PCIe root complex (TYPE_ASPEED_PCIE_RC).
- Wire up interrupt propagation via aspeed_pcie_rc_set_irq().
- Add tracepoints for config read/write and INTx handling.

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/20250919093017.338309-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci-host/aspeed: Add AST2600 PCIe PHY model
Jamin Lin [Fri, 19 Sep 2025 09:30:01 +0000 (17:30 +0800)] 
hw/pci-host/aspeed: Add AST2600 PCIe PHY model

This patch introduces an initial ASPEED PCIe PHY/host controller model to
support the AST2600 SoC. It provides a simple register block with MMIO
read/write callbacks, integration into the build system, and trace events
for debugging.

Key changes:

1. PCIe PHY MMIO read/write callbacks
   Implemented aspeed_pcie_phy_read() and aspeed_pcie_phy_write() to
   handle 32-bit register accesses.

2. Build system and Kconfig integration
   Added CONFIG_PCI_EXPRESS_ASPEED in hw/pci-host/Kconfig and meson
   rules.
   Updated ASPEED_SOC in hw/arm/Kconfig to imply PCI_DEVICES and select
   PCI_EXPRESS_ASPEED.

3. Trace events for debug
   New tracepoints aspeed_pcie_phy_read and aspeed_pcie_phy_write allow
   monitoring MMIO accesses.

4. Register space and defaults (AST2600 reference)
   Expose a 0x100 register space, as documented in the AST2600 datasheet.
   On reset, set default values:
   PEHR_ID: Vendor ID = ASPEED, Device ID = 0x1150
   PEHR_CLASS_CODE = 0x06040006
   PEHR_DATALINK = 0xD7040022
   PEHR_LINK: bit[5] set to 1 to indicate link up.

This provides a skeleton device for the AST2600 platform. It enables
firmware to detect the PCIe link as up by default and allows future
extension.

This commit is the starting point of the series to introduce ASPEED PCIe
Root Complex (RC) support. Based on previous work from Cédric Le Goater,
the following commits in this series extend and refine the implementation:

- Add a PCIe Root Port so that devices can be attached without requiring an
extra bridge.
- Restrict the Root Port device instantiation to the AST2600 platform.
- Integrate aspeed_cfg_translate_write() to support both AST2600 and AST2700.
- Add MSI support and a preliminary RC IOMMU address space.
- Fix issues with MSI interrupt clearing.
- Extend support to the AST2700 SoC.
- Drop the AST2600 RC_L support.
- Introduce PCIe RC functional tests covering both AST2600 and AST2700.

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/20250919093017.338309-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/pci/pci_ids: Add PCI vendor ID for ASPEED
Jamin Lin [Fri, 19 Sep 2025 09:30:00 +0000 (17:30 +0800)] 
hw/pci/pci_ids: Add PCI vendor ID for ASPEED

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/20250919093017.338309-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agotests/functional/arm: Add AST2600 boot test with generated OTP image
Kane-Chen-AS [Wed, 17 Sep 2025 03:59:17 +0000 (11:59 +0800)] 
tests/functional/arm: Add AST2600 boot test with generated OTP image

Add a functional test that boots an AST2600 machine with a generated
OTP image. The test verifies that OTP contents are read during early
boot and that the system reaches the expected console prompt.

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/20250917035917.4141723-4-kane_chen@aspeedtech.com
[ clg: checkpath fixes ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agotests/functional/arm: Add AST1030 boot test with generated OTP image
Kane-Chen-AS [Wed, 17 Sep 2025 03:59:16 +0000 (11:59 +0800)] 
tests/functional/arm: Add AST1030 boot test with generated OTP image

Add a functional test that boots an AST1030 machine with a generated
OTP image. The test verifies that OTP contents are read during early
boot and that the system reaches the expected console prompt.

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/20250917035917.4141723-3-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agotests/functional/arm: Add helper to generate OTP images
Kane-Chen-AS [Wed, 17 Sep 2025 03:59:15 +0000 (11:59 +0800)] 
tests/functional/arm: Add helper to generate OTP images

Add a small helper that generates OTP images at test time. This lets
multiple test cases create default OTP contents without shipping prebuilt
fixtures and keeps the tests self-contained.

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/20250917035917.4141723-2-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm/aspeed Move ast2700-evb alias to ast2700a1-evb
Jamin Lin [Tue, 2 Sep 2025 06:25:50 +0000 (14:25 +0800)] 
hw/arm/aspeed Move ast2700-evb alias to ast2700a1-evb

This patch moves the "ast2700-evb" alias from the A0 to A1.
The A0 machine remains available via its explicit name
("ast2700a0-evb"), while functional tests are updated to
target A0 by name instead of relying on the generic alias.

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/20250902062550.3797040-1-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agodocs/system/arm/aspeed: Document OTP memory options
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:07 +0000 (17:40 +0800)] 
docs/system/arm/aspeed: Document OTP memory options

Add documentation for the OTP memory module used by AST2600 and AST1030
SoCs, and describe options for using a pre-generated image or an
internal buffer. Include example commands for configuration and image
generation.

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/20250812094011.2617526-11-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/misc/aspeed_sbc: Handle OTP write command for voltage mode registers
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:05 +0000 (17:40 +0800)] 
hw/misc/aspeed_sbc: Handle OTP write command for voltage mode registers

Extend OTP command handling to recognize specific voltage mode register
addresses and emulate the expected hardware behavior. Without this
change, legitimate voltage mode change requests would be incorrectly
reported as "Unknown command" and logged as an error.

This implementation does not perform actual mode changes, but ensures
that valid requests are accepted and ignored as per hardware behavior.

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/20250812094011.2617526-9-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/misc/aspeed_sbc: Add CAMP2 support for OTP data reads
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:04 +0000 (17:40 +0800)] 
hw/misc/aspeed_sbc: Add CAMP2 support for OTP data reads

The OTP space contains three types of entries: data, conf, and strap.
Data entries consist of two DWORDs, while the other types contain
only one DWORD. This change adds the R_CAMP2 register (0x024 / 4) to
store the second DWORD when reading from the OTP data region.

With this enhancement, OTP reads now correctly return both DWORDs for
data entries via the CAMP registers, along with improved address
validation and error handling.

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/20250812094011.2617526-8-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm: Integrate ASPEED OTP memory support into AST1030 SoCs
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:03 +0000 (17:40 +0800)] 
hw/arm: Integrate ASPEED OTP memory support into AST1030 SoCs

The has_otp attribute is enabled in the SBC subclasses for AST1030 to
control the presence of OTP support per SoC type.

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/20250812094011.2617526-7-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/nvram/aspeed_otp: Add OTP programming semantics and tracing
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:02 +0000 (17:40 +0800)] 
hw/nvram/aspeed_otp: Add OTP programming semantics and tracing

Implement correct OTP programming behavior for Aspeed OTP:
- Support read-modify-write flow with one-way bit programming:
  * prog_bit uses 0s as the "to-be-programmed" mask.
  * Even-indexed words: 0->1, odd-indexed words: 1->0.
  * Reject non-programmable requests and log conflicts.
- Enable unaligned accesses in MemoryRegionOps.
  Since each OTP address maps to a 1DW (4B) or 2DW (8B) block in the
  backing store, upper-layer accesses may be unaligned to block
  boundaries.

This matches the irreversible, word-parity-dependent programming rules
of Aspeed SoCs and exposes changes via QEMU trace events.

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/20250812094011.2617526-6-kane_chen@aspeedtech.com
[ clg: Fixed PRIx64 format in aspeed_otp_write() ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/nvram/aspeed_otp: Add 'drive' property to support block backend
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:01 +0000 (17:40 +0800)] 
hw/nvram/aspeed_otp: Add 'drive' property to support block backend

This patch introduces a 'drive' property to the Aspeed OTP device,
allowing it to be backed by a block device. Users can now preload
OTP data via QEMU CLI using a block backend.

Example usage:
  ./qemu-system-arm \
    -blockdev driver=file,filename=otpmem.img,node-name=otp \
    -global aspeed-otp.drive=otp \
    ...

If the drive is provided, its content will be loaded as the initial OTP
state. Otherwise, an internal memory buffer will be used.

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/20250812094011.2617526-5-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/arm: Integrate ASPEED OTP memory support into AST2600 SoCs
Kane-Chen-AS [Tue, 12 Aug 2025 09:40:00 +0000 (17:40 +0800)] 
hw/arm: Integrate ASPEED OTP memory support into AST2600 SoCs

The has_otp attribute is enabled in the SBC subclasses for AST2600 to
control the presence of OTP support per SoC type.

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/20250812094011.2617526-4-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/misc/aspeed_sbc: Connect ASPEED OTP memory device to SBC
Kane-Chen-AS [Tue, 12 Aug 2025 09:39:59 +0000 (17:39 +0800)] 
hw/misc/aspeed_sbc: Connect ASPEED OTP memory device to SBC

This patch connects the aspeed.otp device to the ASPEED Secure Boot
Controller (SBC) model. It implements OTP memory access via the SBC's
command interface and enables emulation of secure fuse programming
flows.

The following OTP commands are supported:
  - READ: reads a 32-bit word from OTP memory into internal registers
  - PROG: programs a 32-bit word value to the specified OTP address

Trace events are added to observe read/program operations and command
handling flow.

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/20250812094011.2617526-3-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
7 days agohw/nvram/aspeed_otp: Add ASPEED OTP memory device model
Kane-Chen-AS [Tue, 12 Aug 2025 09:39:58 +0000 (17:39 +0800)] 
hw/nvram/aspeed_otp: Add ASPEED OTP memory device model

Introduce a QEMU device model for ASPEED's One-Time Programmable (OTP)
memory.

This model simulates a word-addressable OTP region used for secure
fuse storage. The OTP memory can operate with an internal memory
buffer.

The OTP model provides a memory-like interface through a dedicated
AddressSpace, allowing other device models (e.g., SBC) to issue
transactions as if accessing a memory-mapped region.

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/20250812094011.2617526-2-kane_chen@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
8 days agoMerge tag 'pull-loongarch-20250928' of https://github.com/bibo-mao/qemu into staging
Richard Henderson [Sun, 28 Sep 2025 16:01:35 +0000 (09:01 -0700)] 
Merge tag 'pull-loongarch-20250928' of https://github.com/bibo-mao/qemu into staging

loongarch queue

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQNhkKjomWfgLCz0aQfewwSUazn0QUCaNjtuwAKCRAfewwSUazn
# 0Z9VAQDuqEzBEj0I3L7AtJgwRxSau+sw9FqUdAjQguM9mA29ggD7BOBFwHpjx68t
# 8MMstQuZN2mFRwzfukIdLDZclPCKkAM=
# =L9oL
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 28 Sep 2025 01:11:39 AM PDT
# gpg:                using EDDSA key 0D8642A3A2659F80B0B3D1A41F7B0C1251ACE7D1
# gpg: Good signature from "bibo mao <maobibo@loongson.cn>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 7044 3A00 19C0 E97A 31C7  13C4 8E86 8FB7 A176 9D4C
#      Subkey fingerprint: 0D86 42A3 A265 9F80 B0B3  D1A4 1F7B 0C12 51AC E7D1

* tag 'pull-loongarch-20250928' of https://github.com/bibo-mao/qemu:
  target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid()
  target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid_or_g()
  target/loongarch: Invalid tlb entry in invalidate_tlb()
  target/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid
  target/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid_or_g
  target/loongarch: Change return value type with loongarch_tlb_search_cb()
  target/loongarch: Add common API loongarch_tlb_search_cb()
  target/loongarch: Add tlb search callback in loongarch_tlb_search()
  target/loongarch: Fix page size set issue with CSR_STLBPS
  target/loongarch: Update TLB index selection method
  target/loongarch: Reduce TLB flush with helper_tlbwr
  target/loongarch: Add parameter tlb pointer with fill_tlb_entry
  target/loongarch: Use mmu idx bitmap method when flush TLB

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8 days agoMerge tag 'pull-loongarch-20250928' of https://github.com/gaosong715/qemu into staging
Richard Henderson [Sun, 28 Sep 2025 16:00:36 +0000 (09:00 -0700)] 
Merge tag 'pull-loongarch-20250928' of https://github.com/gaosong715/qemu into staging

pull-loongarch-20250928

v2: fix build win64 errors.

# -----BEGIN PGP SIGNATURE-----
#
# iLMEAAEIAB0WIQTKRzxE1qCcGJoZP81FK5aFKyaCFgUCaNkDHQAKCRBFK5aFKyaC
# Fn06A/0SQKLVcktq2lX+aRurdGw/LKt/1mtSFJes6s5VVCrNuFFzmkXzjs/m0CcX
# scgDF67Z+PhJpLtNLRV8FiJ+z3bOH/j+yRHqj1xnvvITb+i5bUYbt+A81wrzX6Bi
# J/Ayqu49oQj33hX3lqTcTBmwYDBc2v7nu0PfvFqOUi9bTvYgfA==
# =C4NB
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 28 Sep 2025 02:42:53 AM PDT
# gpg:                using RSA key CA473C44D6A09C189A193FCD452B96852B268216
# gpg: Good signature from "Song Gao <gaosong@loongson.cn>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CA47 3C44 D6A0 9C18 9A19  3FCD 452B 9685 2B26 8216

* tag 'pull-loongarch-20250928' of https://github.com/gaosong715/qemu:
  hw/loongarch: Implement DINTC plug/unplug interfaces
  target/loongarch:Implement csrrd CSR_MSGIR register
  target/loongarch: Add CSR_ESTAT.bit15 and CSR_ECFG.bit15 for msg interrupts.
  hw/loongarch: Implement dintc set irq
  hw/loongarch: Implement dintc realize and unrealize
  hw/loongarch: DINTC add a MemoryRegion
  target/loongarch: add msg interrupt CSR registers
  loongarch: add a direct interrupt controller device
  hw/loongarch: add misc register support dmsi
  hw/loongarch: add virt feature dmsi support
  target/loongarch: move some machine define to virt.h

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
8 days agohw/loongarch: Implement DINTC plug/unplug interfaces
Song Gao [Tue, 16 Sep 2025 12:21:09 +0000 (20:21 +0800)] 
hw/loongarch: Implement DINTC plug/unplug interfaces

when cpu added, connect dintc irq to cpu INT_DMSI irq pin.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-ID: <20250916122109.749813-12-gaosong@loongson.cn>

8 days agotarget/loongarch:Implement csrrd CSR_MSGIR register
Song Gao [Tue, 16 Sep 2025 12:21:08 +0000 (20:21 +0800)] 
target/loongarch:Implement csrrd CSR_MSGIR register

implement the read-clear feature for CSR_MSGIR register.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-ID: <20250916122109.749813-11-gaosong@loongson.cn>

8 days agotarget/loongarch: Add CSR_ESTAT.bit15 and CSR_ECFG.bit15 for msg interrupts.
Song Gao [Tue, 16 Sep 2025 12:21:07 +0000 (20:21 +0800)] 
target/loongarch: Add CSR_ESTAT.bit15 and CSR_ECFG.bit15 for msg interrupts.

Add CSR_ESTAT.bit15 and CSR_ECFG.bit15 for DINTC irq.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-ID: <20250916122109.749813-10-gaosong@loongson.cn>

8 days agohw/loongarch: Implement dintc set irq
Song Gao [Tue, 16 Sep 2025 12:21:06 +0000 (20:21 +0800)] 
hw/loongarch: Implement dintc set irq

Implement dintc set irq and update CSR_MSGIS.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-ID: <20250916122109.749813-9-gaosong@loongson.cn>

8 days agohw/loongarch: Implement dintc realize and unrealize
Song Gao [Tue, 16 Sep 2025 12:21:05 +0000 (20:21 +0800)] 
hw/loongarch: Implement dintc realize and unrealize

Implement th DINTC realize and unrealize.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-8-gaosong@loongson.cn>

8 days agohw/loongarch: DINTC add a MemoryRegion
Song Gao [Tue, 16 Sep 2025 12:21:04 +0000 (20:21 +0800)] 
hw/loongarch: DINTC add a MemoryRegion

the DINTC use [2fe00000-2ff00000) Memory.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-7-gaosong@loongson.cn>

8 days agotarget/loongarch: add msg interrupt CSR registers
Song Gao [Tue, 16 Sep 2025 12:21:03 +0000 (20:21 +0800)] 
target/loongarch: add msg interrupt CSR registers

include CSR_MSGIS0-3, CSR_MSGIR and CSR_MSGIE.

Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Message-ID: <20250916122109.749813-6-gaosong@loongson.cn>

8 days agoloongarch: add a direct interrupt controller device
Song Gao [Tue, 16 Sep 2025 12:21:02 +0000 (20:21 +0800)] 
loongarch: add a direct interrupt controller device

Add Loongarch direct interrupt controller device base Definition.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-5-gaosong@loongson.cn>

8 days agohw/loongarch: add misc register support dmsi
Song Gao [Tue, 16 Sep 2025 12:21:01 +0000 (20:21 +0800)] 
hw/loongarch: add misc register support dmsi

Add feature register and misc register for dmsi feature checking and
setting

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-4-gaosong@loongson.cn>

8 days agohw/loongarch: add virt feature dmsi support
Song Gao [Tue, 16 Sep 2025 12:21:00 +0000 (20:21 +0800)] 
hw/loongarch: add virt feature dmsi support

dmsi feature is added in LoongArchVirtMachinState, and it is used
to check whether virt machine supports the directy Message-Interrupts.
and by default set dmsi with ON_OFF_AUTO_AUTO.
LoongArchVirtMachineState adds misc_feature and misc_status for misc
features and status. and set the default dintc feature bit.
Msgint feature is added in LoongArchCPU, and it is used to check
whether th cpu supports the Message-Interrupts and by default set
mesgint with ON_OFF_AUTO_AUTO.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-3-gaosong@loongson.cn>

8 days agotarget/loongarch: move some machine define to virt.h
Song Gao [Tue, 16 Sep 2025 12:20:59 +0000 (20:20 +0800)] 
target/loongarch: move some machine define to virt.h

move some machine define to virt.h

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-2-gaosong@loongson.cn>

8 days agotarget/loongarch: Only flush one TLB entry in helper_invtlb_page_asid()
Bibo Mao [Thu, 4 Sep 2025 11:16:57 +0000 (19:16 +0800)] 
target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid()

With function helper_invtlb_page_asid(), only one TLB entry in
LoongArch emulated TLB is invalidated. so with QEMU TLB, it is not
necessary to flush all QEMU TLB, only flush address range specified
LoongArch emulated TLB is ok. Here invalidate_tlb_entry() is called
so that only QEMU TLB entry with specified address range is flushed.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Only flush one TLB entry in helper_invtlb_page_asid_or_g()
Bibo Mao [Thu, 4 Sep 2025 11:11:25 +0000 (19:11 +0800)] 
target/loongarch: Only flush one TLB entry in helper_invtlb_page_asid_or_g()

With function helper_invtlb_page_asid_or_g(), only one TLB entry in
LoongArch emulated TLB is invalidated. so with QEMU TLB, it is not
necessary to flush all QEMU TLB, only flush address range specified
LoongArch emulated TLB is ok. Here invalidate_tlb_entry() is called
so that only QEMU TLB entry with specified address range is flushed.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Invalid tlb entry in invalidate_tlb()
Bibo Mao [Thu, 4 Sep 2025 10:07:18 +0000 (18:07 +0800)] 
target/loongarch: Invalid tlb entry in invalidate_tlb()

Invalid tlb entry in function invalidate_tlb(), and its usage is
simple and easy to use.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
8 days agotarget/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid
Bibo Mao [Thu, 4 Sep 2025 09:52:03 +0000 (17:52 +0800)] 
target/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid

With function helper_invtlb_page_asid(), currently it is to search
TLB entry one by one. Instead STLB can be searched at first with hash
method, and then search MTLB with one by one method

Here common API loongarch_tlb_search_cb() is used in function
helper_invtlb_page_asid()

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid_or_g
Bibo Mao [Thu, 4 Sep 2025 09:46:12 +0000 (17:46 +0800)] 
target/loongarch: Use loongarch_tlb_search_cb in helper_invtlb_page_asid_or_g

With function helper_invtlb_page_asid_or_g(), currently it is to
search TLB entry one by one. Instead STLB can be searched at first
with hash method, and then search MTLB with one by one method.

Here common API loongarch_tlb_search_cb() is used in function
helper_invtlb_page_asid_or_g().

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Change return value type with loongarch_tlb_search_cb()
Bibo Mao [Thu, 4 Sep 2025 09:32:05 +0000 (17:32 +0800)] 
target/loongarch: Change return value type with loongarch_tlb_search_cb()

With function loongarch_tlb_search_cb(), change return value type from
bool type to pointer LoongArchTLB *, the pointer type can be use directly
in future.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
8 days agotarget/loongarch: Add common API loongarch_tlb_search_cb()
Bibo Mao [Thu, 4 Sep 2025 08:06:03 +0000 (16:06 +0800)] 
target/loongarch: Add common API loongarch_tlb_search_cb()

Common API loongarch_tlb_search_cb() is added here to search TLB entry
with specified address.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Add tlb search callback in loongarch_tlb_search()
Bibo Mao [Sat, 2 Aug 2025 02:58:40 +0000 (10:58 +0800)] 
target/loongarch: Add tlb search callback in loongarch_tlb_search()

With function loongarch_tlb_search(), it is to search TLB entry with
speficied virtual address, the difference is selection with asid and
global bit. Here add selection callback with asid and global bit.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Fix page size set issue with CSR_STLBPS
Bibo Mao [Wed, 3 Sep 2025 03:17:56 +0000 (11:17 +0800)] 
target/loongarch: Fix page size set issue with CSR_STLBPS

When modify register CSR_STLBPS, the page size should come from
input parameter rather than old value.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
8 days agotarget/loongarch: Update TLB index selection method
Bibo Mao [Wed, 30 Jul 2025 02:32:54 +0000 (10:32 +0800)] 
target/loongarch: Update TLB index selection method

With function helper_tlbfill(), since there is no suitable TLB entry,
new TLB will be added and flush one old TLB entry. The old TLB entry
index is selected randomly now, instead it can be optimized as
following:
  1. invalid TLB entry can be selected at first.
  2. TLB entry with other ASID can be selected secondly
  3. random method is used by last.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Reduce TLB flush with helper_tlbwr
Bibo Mao [Thu, 24 Jul 2025 12:34:35 +0000 (20:34 +0800)] 
target/loongarch: Reduce TLB flush with helper_tlbwr

With function helper_tlbwr(), specified LoongArch TLB entry will be
updated. There are two PTE pages in one TLB entry called even/odd
pages. Supposing even/odd page is normal/none state, when odd page
is added, TLB entry is changed as normal/normal state and even page
keeps unchanged.

In this situation, it is not necessary to flush QEMU TLB since even
page keep unchanged and odd page is newly changed. Here check whether
PTE page is the same or not, TLB flush can be skipped if both are the
same or newly added.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Add parameter tlb pointer with fill_tlb_entry
Bibo Mao [Thu, 24 Jul 2025 11:57:34 +0000 (19:57 +0800)] 
target/loongarch: Add parameter tlb pointer with fill_tlb_entry

With function fill_tlb_entry(), it will update LoongArch emulated
TLB information. Here parameter tlb pointer is added so that TLB
entry will be updated based on relative TLB CSR registers.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
8 days agotarget/loongarch: Use mmu idx bitmap method when flush TLB
Bibo Mao [Wed, 3 Sep 2025 02:46:01 +0000 (10:46 +0800)] 
target/loongarch: Use mmu idx bitmap method when flush TLB

With API tlb_flush_range_by_mmuidx(), bitmap of mmu idx should be used
rather than itself. Also bitmap of MMU_KERNEL_IDX and MMU_USER_IDX are
used rather than that of current running mmu idx when flush TLB.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
9 days agoMerge tag 'pull-target-arm-20250926' of https://gitlab.com/pm215/qemu into staging
Richard Henderson [Fri, 26 Sep 2025 20:27:00 +0000 (13:27 -0700)] 
Merge tag 'pull-target-arm-20250926' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * reimplement VHE alias register handling
 * replace magic GIC values by proper definitions
 * convert power control DPRINTF() uses to trace events
 * better reset related tracepoints
 * implement ID_AA64PFR2_EL1
 * hw/usb/hcd-uhci: don't assert for SETUP to non-0 endpoint
 * net/passt: Fix build failure due to missing GIO dependency

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmjWnkUZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3upeD/4x0k6ciiJ2wRE1PFUA2KHZ
# bS12+j6Um5BNdcZtRV1aT3x3xOrW3X0JTcmhb9/UdpEPki/krQQgQX50tOiLCeU2
# U4lZke5160Gk3ThdkpELlQDnCVDuNR0wxYgy1GBgAInCa/T/qFnyWwaWBIooCCUh
# +UMJ9tP4XWKvKlkzw9ONFYChxerY2enpOewEbnfSU4NPg9pU8OEZ3yeFWaLZ3Tnl
# 0bei/iFFeuN8RtgJEkuqWI6oENEZZbxGtJ+J/+wvggAfOzfy0I6CmW6y9tQMmKe8
# fTnCQ837uHmlRPWQ615M2wWydbJ1ffdEIYDb5U6UsbfG8sMt5+qg38yo0AyDs6RK
# qJkTceuhqFTDIoi92o2+NFnohCTfASeYaCHjODgcdjGUtbZO7LZ31fOKQrdsHc5e
# chAOnzNxCu9Bt4UqpUmb+ED0fXWDahV1tmgazFS2LORYxnr2q+/WJEdwSgHXNzVy
# 2rdyUx7v7U1finhRE1nAdy8XwJTCQ3gDwDbPGBrH9mhR9DnK6eotFCljI2XnDtAE
# f1i0w/47cnyRW6KsBVK6dJObiOfBRrRYqe3Rt4nA4xjeCNmWcr5IcytpnL/2YT1p
# 1vj+RklbcK7Ns+kWH3H2a9b44zKQrtGGXf8fcNyAqT1YrzrrLUqaiKTfesGfjWit
# ekMWOulOe6UePnoC3SJHFw==
# =+Aj+
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 26 Sep 2025 07:08:05 AM PDT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [unknown]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [unknown]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [unknown]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [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: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20250926' of https://gitlab.com/pm215/qemu: (44 commits)
  target/arm: Implement ID_AA64PFR2_EL1
  target/arm: Move ID register field defs to cpu-features.h
  target/arm: Trace vCPU reset call
  target/arm: Trace emulated firmware reset call
  target/arm: Convert power control DPRINTF() uses to trace events
  target/arm: Replace magic GIC values by proper definitions
  target/arm: Remove define_arm_vh_e2h_redirects_aliases
  target/arm: Rename some cpreg to their aarch64 names
  target/arm: Redirect VHE FOO_EL12 to FOO_EL1 during translation
  target/arm: Redirect VHE FOO_EL1 -> FOO_EL2 during translation
  target/arm: Split out redirect_cpreg
  target/arm: Rename TBFLAG_A64_NV2_MEM_E20 with *_E2H
  target/arm: Move endianness fixup for 32-bit registers
  target/arm: Move writeback of CP_ANY fields
  target/arm: Move alias setting for wildcards
  target/arm: Remove name argument to alloc_cpreg
  target/arm: Hoist the allocation of ARMCPRegInfo
  target/arm: Split out alloc_cpreg
  target/arm: Add key parameter to add_cpreg_to_hashtable
  target/arm: Move cpreg elimination to define_one_arm_cp_reg
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9 days agoMerge tag 'pull-10.2-maintainer-260925-1' of https://gitlab.com/stsquad/qemu into...
Richard Henderson [Fri, 26 Sep 2025 20:26:30 +0000 (13:26 -0700)] 
Merge tag 'pull-10.2-maintainer-260925-1' of https://gitlab.com/stsquad/qemu into staging

September maintainer updates (scripts, semihosting, plugins)

 - new gitlab-failure-analysis script
 - tweak checkpath to ignore license in removed lines
 - refactor semihosting to build once
 - add explicit assert to execlog for coverity
 - new uftrace plugin

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmjWWJYACgkQ+9DbCVqe
# KkS1sgf+LsP0jsc1wKhzBhO4WarXXacWCDxK22riJ3aolm+gJ+b0WI4ds18A0e3R
# z/J8VJVxBZ+6Hid+tOCQwfZ+Hb1p9IofzBdZryGUvwguviNdlpEChhXXnoZkicym
# aGcC/jYRkhTx42dKRdZrSzPd3ccipqop9RvGx57bjCSBAEHYNz679p4z91kNR5a9
# UfcCzIQHbBUPZo0F9gQkNnBrjsJQhvF+gXPmmsmBI1pby6gNRQvFshrTQ1C32VpL
# VgXNc9cZ6vaREWlgb6izNjsMP7cYTMH2Ppxty/FyEMg7GTfWRjI6Ec8fJKjPFtKr
# ZbCNNAeJ9uLK6pJfTk2YxYabxx3JuQ==
# =cR9e
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 26 Sep 2025 02:10:46 AM PDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-10.2-maintainer-260925-1' of https://gitlab.com/stsquad/qemu: (24 commits)
  contrib/plugins/uftrace: add documentation
  contrib/plugins/uftrace_symbols.py
  contrib/plugins/uftrace: implement x64 support
  contrib/plugins/uftrace: generate additional files for uftrace
  contrib/plugins/uftrace: implement privilege level tracing
  contrib/plugins/uftrace: implement tracing
  contrib/plugins/uftrace: track callstack
  contrib/plugins/uftrace: define cpu operations and implement aarch64
  contrib/plugins/uftrace: skeleton file
  contrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure
  semihosting/arm-compat-semi: compile once in system and per target for user mode
  semihosting/arm-compat-semi: remove dependency on cpu.h
  semihosting/arm-compat-semi: eradicate target_long
  semihosting/arm-compat-semi: replace target_ulong
  semihosting/arm-compat-semi: eradicate sizeof(target_ulong)
  include/semihosting/common-semi: extract common_semi API
  target/{arm, riscv}/common-semi-target: eradicate target_ulong
  target/riscv/common-semi-target: remove sizeof(target_ulong)
  semihosting/arm-compat-semi: change common_semi_sys_exit_extended
  semihosting/guestfd: compile once for system/user
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
9 days agoMerge tag 'pull-vfio-20250926' of https://github.com/legoater/qemu into staging
Richard Henderson [Fri, 26 Sep 2025 20:26:08 +0000 (13:26 -0700)] 
Merge tag 'pull-vfio-20250926' of https://github.com/legoater/qemu into staging

vfio queue:

* New vfio-user functional test
* Improved naming conventions

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmjWJaEACgkQUaNDx8/7
# 7KE9Kw/+Ne/AJBxJ0EceK6oCX/1d/56l8dlY7/PHa/LuX8LDzZq42c6+CC2bQ5Ze
# +C5RvM1aavUkvlW73jjmXs1/sdvqq5etGpxbf+hjlLh7uXFaceszWw0+ljH11Pk3
# INZj4iVrPTX7A2d9Gip0ouTFc02DYYllKpUnpbN9MYk0WRgoMBvZISc9T6A28oj1
# Zm24XWOW5ySux9IDIm+zSpvtRp+5r5PgwwwPZvNKBa5jqfJiw6+ZmejLUNEvwfgr
# vkBCGuCywzf+l5wX5z+ofl5GDd6YyRa5W+nDQE7viDwo0XTtZC3WxRKDpqdAruld
# fPjuflqHUpqnyabFuVVc5VV9iyBLGs0cFt2BHPn0vHRZTaCNAGZKZZDzVOP9EYuK
# Jmx5B2vCTnVbg2ZfG+ErEYAVVX97Tgks0xtUxGOpJwbImlRCKdwbrDKSFWT5NYCN
# BlfZX4iFrWLo2fntWP4c3DtM7w6Vn/x5hevyy9pD3i5D8zqDx3FaYJCuM4+5KFAO
# WenxUIkjOcJ829NBfQvF2HtJDEeuLv3eMxszU4pyRnH1vsk38ofOfvZVl2uQd7XT
# NrW207wAAOO+QxrelUGIuuMwhYuh16KnHkjjVe0yEh6htBF5ceIImqZH8SU97qWU
# vQjbcmx/fNQKlKCLc+JOCQz+KJyKahPDGcHi1vxEKXObHFI0rfw=
# =Jl4i
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 25 Sep 2025 10:33:21 PM PDT
# 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-vfio-20250926' of https://github.com/legoater/qemu: (29 commits)
  include/hw/vfio/vfio-device.h: fix include header guard name
  vfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info
  vfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize()
  vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()
  vfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[]
  vfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init()
  vfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info
  vfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init()
  vfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[]
  vfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[]
  vfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info
  vfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init()
  hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE
  vfio/pci.c: rename vfio_pci_dev_info to vfio_pci_info
  vfio/pci.c: rename vfio_pci_dev_class_init() to vfio_pci_class_init()
  vfio/pci.c: rename vfio_instance_finalize() to vfio_pci_finalize()
  vfio/pci.c: rename vfio_instance_init() to vfio_pci_init()
  vfio/spapr.c: rename VFIOContainer bcontainer field to parent_obj
  vfio/spapr.c: use QOM casts where appropriate
  vfio/vfio-iommufd.h: rename VFIOContainer bcontainer field to parent_obj
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
10 days agotarget/arm: Implement ID_AA64PFR2_EL1
Peter Maydell [Tue, 23 Sep 2025 17:57:51 +0000 (18:57 +0100)] 
target/arm: Implement ID_AA64PFR2_EL1

Currently we define the ID_AA64PFR2_EL1 encoding as reserved (with
the required RAZ behaviour for unassigned system registers in the ID
register encoding space).  Newer architecture versions start to
define fields in this ID register, so define the appropriate
constants and implement it as an ID register backed by a field in
cpu->isar.  Since none of our CPUs set that isar field to non-zero,
there is no behavioural change here (other than the name exposed to
the user via the gdbstub), but this paves the way for implementing
the new features that use fields in this register.

The fields here are the ones documented in rev L.b of the Arm ARM.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
10 days agotarget/arm: Move ID register field defs to cpu-features.h
Peter Maydell [Tue, 23 Sep 2025 17:57:50 +0000 (18:57 +0100)] 
target/arm: Move ID register field defs to cpu-features.h

Currently we define constants for the ID register fields in cpu.h.
This means they're defined for a lot more code in QEMU than actually
needs them.  Move them to cpu-features.h, which is where we define
the feature functions that test fields in these registers.

There's only one place where we need to use some of these macro
definitions that we weren't already including cpu-features.h:
linux-user/arm/target_proc.h.  Otherwise this patch is a pure
movement of code from one file to the other.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
10 days agotarget/arm: Trace vCPU reset call
Philippe Mathieu-Daudé [Wed, 24 Sep 2025 16:32:54 +0000 (18:32 +0200)] 
target/arm: Trace vCPU reset call

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agotarget/arm: Trace emulated firmware reset call
Philippe Mathieu-Daudé [Wed, 24 Sep 2025 16:32:53 +0000 (18:32 +0200)] 
target/arm: Trace emulated firmware reset call

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agotarget/arm: Convert power control DPRINTF() uses to trace events
Philippe Mathieu-Daudé [Wed, 24 Sep 2025 16:32:52 +0000 (18:32 +0200)] 
target/arm: Convert power control DPRINTF() uses to trace events

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agotarget/arm: Replace magic GIC values by proper definitions
Philippe Mathieu-Daudé [Thu, 25 Sep 2025 03:21:51 +0000 (05:21 +0200)] 
target/arm: Replace magic GIC values by proper definitions

Prefer the FIELD_DP64() macro and self-describing GIC
definitions over magic values.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 days agocontrib/plugins/uftrace: add documentation
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:10 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: add documentation

This documentation summarizes how to use the plugin, and present two
examples of the possibilities offered by it, in system and user mode.

As well, it explains how to rebuild and reproduce those examples.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-10-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-26-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace_symbols.py
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:09 +0000 (10:37 +0100)] 
contrib/plugins/uftrace_symbols.py

usage:  contrib/plugins/uftrace_symbols.py \
        --prefix-symbols \
        arm-trusted-firmware/build/qemu/debug/bl1/bl1.elf \
        arm-trusted-firmware/build/qemu/debug/bl2/bl2.elf \
        arm-trusted-firmware/build/qemu/debug/bl31/bl31.elf \
        u-boot/u-boot:0x60000000 \
        u-boot/u-boot.relocated:0x000000023f6b6000 \
        linux/vmlinux

Will generate symbols and memory mapping files for uftrace, allowing to
have an enhanced trace, instead of raw addresses.

It takes a collection of elf files, and automatically find all their
symbols, and generate an ordered memory map based on that.

This script uses the python (native) pyelftools module.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250902075042.223990-9-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-25-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: implement x64 support
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:08 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: implement x64 support

It's trivial to implement x64 support, as it's the same stack layout
as aarch64.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-8-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-24-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: generate additional files for uftrace
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:07 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: generate additional files for uftrace

Beyond traces per cpu, uftrace expect to find some specific files.
- info: contains information about machine/program run
  those values are not impacting uftrace behaviour (only reported by
  uftrace info), and we simply added empty strings.
- memory mapping: how every binary is mapped in memory. For system mode,
  we generate an empty mapping (uftrace_symbols.py, coming in future
  commit, will take care of that). For user mode, we copy current
  /proc/self/maps. We don't need to do any special filtering, as
  reported addresses will necessarily concern guest program, and not
  QEMU and its libraries.
- task: list of tasks. We present every vcpu/privilege level as a
  separate process, as it's the best view we can have when generating a
  (visual) chrome trace. Using threads is less convenient in terms of
  UI.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-7-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-23-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: implement privilege level tracing
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:06 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: implement privilege level tracing

We add new option trace-privilege-level=bool, which will create a
separate trace for each privilege level.
This allows to follow changes of privilege during execution.

We implement aarch64 operations to track current privilege level
accordingly.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-6-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-22-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: implement tracing
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:05 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: implement tracing

We implement tracing, following uftrace format.
Trace is flushed every 32 MB, so file operations don't impact
performance at runtime.

A different trace is generated per cpu, and we ensure they have a unique
name, based on vcpu_index, while keeping room for privilege level coming
in next commit.

Uftrace format is not officially documented, but it can be found here:
https://github.com/namhyung/uftrace/blob/v0.18/libmcount/record.c#L909

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-5-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-21-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: track callstack
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:04 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: track callstack

We now track callstack, based on frame pointer analysis. We can detect
function calls, returns, and discontinuities.
We implement a frame pointer based unwinding that is used for
discontinuities.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-4-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-20-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: define cpu operations and implement aarch64
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:03 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: define cpu operations and implement aarch64

We define a new CpuOps structure that will be used to implement tracking
independently of guest architecture.

As well, we now instrument only instructions following ones that might
have touched the frame pointer.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-3-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-19-alex.bennee@linaro.org>

10 days agocontrib/plugins/uftrace: skeleton file
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:02 +0000 (10:37 +0100)] 
contrib/plugins/uftrace: skeleton file

We define a scoreboard that will hold our data per cpu. As well, we
define a buffer per cpu that will be used to read registers and memories
in a thread-safe way.

For now, we just instrument all instructions with an empty callback.

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250902075042.223990-2-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-18-alex.bennee@linaro.org>

10 days agocontrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure
Peter Maydell [Mon, 22 Sep 2025 09:37:01 +0000 (10:37 +0100)] 
contrib/plugins/execlog: Explicitly check for qemu_plugin_read_register() failure

In insn_check_regs() we don't explicitly check whether
qemu_plugin_read_register() failed, which confuses Coverity into
thinking that sz can be -1 in the memcmp().  In fact the assertion
that sz == reg->last->len means this can't happen, but it's clearer
to both humans and Coverity if we explicitly assert that sz > 0, as
we already do in init_vcpu_register().

Coverity: CID 16119011611902
Fixes: af6e4e0a22c1 ("contrib/plugins: extend execlog to track register changes")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250710144543.1187715-1-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-17-alex.bennee@linaro.org>

10 days agosemihosting/arm-compat-semi: compile once in system and per target for user mode
Pierrick Bouvier [Mon, 22 Sep 2025 09:37:00 +0000 (10:37 +0100)] 
semihosting/arm-compat-semi: compile once in system and per target for user mode

We don't have any target dependency left in system mode, so we can
compile once.

User mode depends on qemu.h, which is duplicated between linux and bsd,
so we can't easily compile it once.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-13-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-16-alex.bennee@linaro.org>

10 days agosemihosting/arm-compat-semi: remove dependency on cpu.h
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:59 +0000 (10:36 +0100)] 
semihosting/arm-compat-semi: remove dependency on cpu.h

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-12-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-15-alex.bennee@linaro.org>

10 days agosemihosting/arm-compat-semi: eradicate target_long
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:58 +0000 (10:36 +0100)] 
semihosting/arm-compat-semi: eradicate target_long

We use int64_t or int32_t depending on ret size.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-11-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-14-alex.bennee@linaro.org>

10 days agosemihosting/arm-compat-semi: replace target_ulong
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:57 +0000 (10:36 +0100)] 
semihosting/arm-compat-semi: replace target_ulong

Replace with vaddr or uint64_t where appropriate.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-10-pierrick.bouvier@linaro.org>
[AJB: tweak commit message]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-13-alex.bennee@linaro.org>

10 days agosemihosting/arm-compat-semi: eradicate sizeof(target_ulong)
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:56 +0000 (10:36 +0100)] 
semihosting/arm-compat-semi: eradicate sizeof(target_ulong)

No semantic change.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-9-pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-12-alex.bennee@linaro.org>

10 days agoinclude/semihosting/common-semi: extract common_semi API
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:55 +0000 (10:36 +0100)] 
include/semihosting/common-semi: extract common_semi API

We transform target/{arm,riscv}/common-semi-target.h headers to proper
compilation units, and use them in arm-compat-semi.c.

This way, we can include only the declaration header (which is target
agnostic), and selectively link the appropriate implementation based on
current target.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-8-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-11-alex.bennee@linaro.org>

10 days agotarget/{arm, riscv}/common-semi-target: eradicate target_ulong
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:54 +0000 (10:36 +0100)] 
target/{arm, riscv}/common-semi-target: eradicate target_ulong

We replace mechanically with uint64_t.
There is no semantic change, and allows us to extract a proper API from
this set of functions.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-7-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-10-alex.bennee@linaro.org>

10 days agotarget/riscv/common-semi-target: remove sizeof(target_ulong)
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:53 +0000 (10:36 +0100)] 
target/riscv/common-semi-target: remove sizeof(target_ulong)

Only riscv64 extends SYS_EXIT, similar to aarch64.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-6-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-9-alex.bennee@linaro.org>

10 days agosemihosting/arm-compat-semi: change common_semi_sys_exit_extended
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:52 +0000 (10:36 +0100)] 
semihosting/arm-compat-semi: change common_semi_sys_exit_extended

We now check only is sys_exit is extended.
This allows to break dependency to TARGET_SYS_EXIT_EXTENDED which will
not be available anymore from this code.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-5-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-8-alex.bennee@linaro.org>

10 days agosemihosting/guestfd: compile once for system/user
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:51 +0000 (10:36 +0100)] 
semihosting/guestfd: compile once for system/user

We move relevant code to semihosting/arm-compat-semi.c, and add
functions to query CONFIG_ARM_COMPATIBLE_SEMIHOSTING at runtime.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-4-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-7-alex.bennee@linaro.org>

10 days agosemihosting/syscalls: replace uint64_t with vaddr where appropriate
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:50 +0000 (10:36 +0100)] 
semihosting/syscalls: replace uint64_t with vaddr where appropriate

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-3-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-6-alex.bennee@linaro.org>

10 days agosemihosting/syscalls: compile once in system and per target for user mode
Pierrick Bouvier [Mon, 22 Sep 2025 09:36:49 +0000 (10:36 +0100)] 
semihosting/syscalls: compile once in system and per target for user mode

We replace target_ulong mechanically by uint64_t.
We can't compile (easily) this code once for user, as it relies on
various target/function types, so leave it in specific_ss for user mode.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-ID: <20250822150058.18692-2-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-5-alex.bennee@linaro.org>

10 days agocheckpatch: Ignore removed lines in license check
Nabih Estefan [Mon, 22 Sep 2025 09:36:48 +0000 (10:36 +0100)] 
checkpatch: Ignore removed lines in license check

When running the license check, if we are updating a license it is
possible for the checkpatch script to test against old license lines
instead of newer ones, since the removal lines appear before the
addition lines in a .patch file.

Fix this by skipping over lines that start with "-" in the checkpatch
script.

Signed-off-by: Nabih Estefan <nabihestefan@google.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250916165928.10048-1-nabihestefan@google.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-4-alex.bennee@linaro.org>

10 days agoscripts/ci: add gitlab-failure-analysis script
Alex Bennée [Mon, 22 Sep 2025 09:36:47 +0000 (10:36 +0100)] 
scripts/ci: add gitlab-failure-analysis script

This is a script designed to collect data from multiple pipelines and
analyse the failure modes they have. By default it will probe the last
3 failed jobs on the staging branch. However this can all be
controlled by the CLI:

  ./scripts/ci/gitlab-failure-analysis --count 2 --branch=testing/next --id 39915562 --status=
  running pipeline 2028486060, total jobs 125, skipped 5, failed 0,  39742 tests, 0 failed tests
  success pipeline 2015018135, total jobs 125, skipped 5, failed 0,  49219 tests, 0 failed tests

You can also skip failing jobs and just dump the tests:

  ./scripts/ci/gitlab-failure-analysis --branch= --id 39915562 --status= --skip-jobs --pipeline 1946202491 1919542960
  failed pipeline 1946202491, total jobs 127, skipped 5, failed 26,  38742 tests, 278 skipped tests, 2 failed tests
    Failed test qemu.qemu:qtest+qtest-s390x / qtest-s390x/boot-serial-test, check-system-opensuse, 1 /s390x/boot-serial/s390-ccw-virtio - FATAL-ERROR: Failed to find expected string. Please check '/tmp/qtest-boot-serial-sW77EA3'
    Failed test qemu.qemu:qtest+qtest-aarch64 / qtest-aarch64/arm-cpu-features, check-system-opensuse, 1 /aarch64/arm/query-cpu-model-expansion - ERROR:../tests/qtest/arm-cpu-features.c:459:test_query_cpu_model_expansion: assertion failed (_error == "The CPU type 'host' requires KVM"): ("The CPU type 'host' requires hardware accelerator" == "The CPU type 'host' requires KVM")
  failed pipeline 1919542960, total jobs 127, skipped 5, failed 2,  48753 tests, 441 skipped tests, 1 failed tests
    Failed test qemu.qemu:unit / test-aio, msys2-64bit, 12 /aio/timer/schedule - ERROR:../tests/unit/test-aio.c:413:test_timer_schedule: assertion failed: (aio_poll(ctx, true))

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20250922093711.2768983-3-alex.bennee@linaro.org>

11 days agoinclude/hw/vfio/vfio-device.h: fix include header guard name
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:36 +0000 (12:31 +0100)] 
include/hw/vfio/vfio-device.h: fix include header guard name

The header guard was incorrectly called HW_VFIO_VFIO_COMMON_H instead of
HW_VFIO_VFIO_DEVICE_H.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-29-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:35 +0000 (12:31 +0100)] 
vfio-user/pci.c: rename vfio_user_pci_dev_info to vfio_user_pci_info

This changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-28-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize()
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:34 +0000 (12:31 +0100)] 
vfio-user/pci.c: rename vfio_user_instance_finalize() to vfio_user_pci_finalize()

This is the more typical naming convention for QOM finalize() functions, in
particular it changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-27-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:33 +0000 (12:31 +0100)] 
vfio-user/pci.c: rename vfio_user_instance_init() to vfio_user_pci_init()

This is the more typical naming convention for QOM init() functions, in
particular it changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-26-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[]
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:32 +0000 (12:31 +0100)] 
vfio-user/pci.c: rename vfio_user_pci_dev_properties[] to vfio_user_pci_properties[]

This changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-25-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init()
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:31 +0000 (12:31 +0100)] 
vfio-user/pci.c: rename vfio_user_pci_dev_class_init() to vfio_user_pci_class_init()

This changes the function prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-24-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:30 +0000 (12:31 +0100)] 
vfio/pci.c: rename vfio_pci_nohotplug_dev_info to vfio_pci_nohotplug_info

This changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-23-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init()
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:29 +0000 (12:31 +0100)] 
vfio/pci.c: rename vfio_pci_nohotplug_dev_class_init() to vfio_pci_nohotplug_class_init()

This changes the function prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-22-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[]
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:28 +0000 (12:31 +0100)] 
vfio/pci.c: rename vfio_pci_dev_nohotplug_properties[] to vfio_pci_nohotplug_properties[]

This changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-21-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[]
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:27 +0000 (12:31 +0100)] 
vfio/pci.c: rename vfio_pci_dev_properties[] to vfio_pci_properties[]

This changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-20-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:26 +0000 (12:31 +0100)] 
vfio/pci.c: rename vfio_pci_base_dev_info to vfio_pci_device_info

This changes the prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-19-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agovfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init()
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:25 +0000 (12:31 +0100)] 
vfio/pci.c: rename vfio_pci_base_dev_class_init() to vfio_pci_device_class_init()

This changes the function prefix to match the name of the QOM type.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-18-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
11 days agohw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE
Mark Cave-Ayland [Thu, 25 Sep 2025 11:31:24 +0000 (12:31 +0100)] 
hw/vfio/types.h: rename TYPE_VFIO_PCI_BASE to TYPE_VFIO_PCI_DEVICE

This brings the QOM type name in line with the underlying VFIOPCIDevice structure.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250925113159.1760317-17-mark.caveayland@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>