Misc HW patches for 2026-04-22
Subsystems (10)
The following changes since commit 95d65654ecbfd61fcc332044d1ee6cc9f04fa24e:
Open 11.1 development tree (2026-04-22 14:19:37 -0400)
are available in the Git repository at:
https://github.com/philmd/qemu.git tags/hw-misc-20260422
for you to fetch changes up to 053b4c8218c963c0e954bd7f4603db2a8f616711:
MAINTAINERS: Transfer CI maintenance to Pierrick (2026-04-22 21:53:16 +0200)
----------------------------------------------------------------
Misc HW patches
- Build hw/avr/ as common unit files
- Header cleanups around 'cpu.h' or duplicated lines
- Remove obsolete TPMIfClass::ppi_enabled field
- Cleanups around load/store API
- Restrict 'compat' properties API to system emulation
- Correct TPM PPCI ACPI for Windows guests on ARM Virt machine
- Simplify physical_memory_range_includes_clean()
- Avoid including CONFIG_DEVICES in hw/arm/smmuv3
- Initialize bus frequency in PPC e500 device tree blob
- More ATI VGA fixes
- Fix fuzzing issues on AVR power controller and SH4 MCU
- MAINTAINERS updates
----------------------------------------------------------------
Bin Guo (1):
physmem: Simplify dirty memory type checks with loop
Junjie Cao (2):
ati-vga: fix unsigned integer overflow in cursor bounds checks
ati-vga: mask out lock bit from CUR_OFFSET in cursor offset
calculation
Mohammadfaiz Bawa (3):
docs/specs/tpm: document PPI support on ARM64 virt hw/acpi/tpm: parameterize PPI base address in tpm_build_ppi_acpi hw/tpm: add PPI support to tpm-tis-device for ARM64 virt
Osama Abdelkader (3):
hw/virtio/virtio-iommu: remove duplicate include hw/hyperv: remove duplicate include hw/ppc/amigaone: remove duplicate include
Philippe Mathieu-Daudé (36):
hw/avr: Build as common unit files
hw/misc/cpc: Include missing 'hw/core/cpu.h' header hw/alpha: Include full path to target 'cpu.h' header hw/arm: Include full path to target 'cpu.h' header hw/avr: Include full path to target 'cpu.h' header hw/hppa: Include full path to target 'cpu.h' header hw/i386: Include full path to target 'cpu.h' header hw/m68k: Include full path to target 'cpu.h' header hw/microblaze: Include full path to target 'cpu.h' header hw/mips: Include full path to target 'cpu.h' header hw/or1k: Include full path to target 'cpu.h' header hw/ppc: Include full path to target 'cpu.h' header hw/riscv: Include full path to target 'cpu.h' header hw/s390x: Include full path to target 'cpu.h' header hw/sh4: Include full path to target 'cpu.h' header hw/sparc: Include full path to target 'cpu.h' header hw/tricore: Include full path to target 'cpu.h' header hw/xtensa: Include full path to target 'cpu.h' header hw/tpm: Factor tpm_ppi_enabled() out
hw/tpm: Add TPMIfClass::ppi_enabled field
hw/tpm: Remove CRBState::ppi_enabled field
hw/tpm: Propagate @ppi_enabled to tpm_tis_reset() and remove in
TPMState
hw/tpm: Simplify tpm_ppi_enabled()
hw/ppc/spapr: Un-inline rtas_load/store() helpers hw/hyperv: Replace legacy ld_phys() -> address_space_ld() system/memory: Constify various AddressSpace arguments (flatview) hw/core: Move compat_props_add() to 'hw/core/boards.h'
qom: Declare GlobalProperty structure in 'qom/compat-properties.h'
qom: Declare compat properties API in 'qom/compat-properties.h'
qom: Restrict compat properties API to system emulation hw/arm/smmuv3: Have smmuv3_accel_init() take an Error* parameter hw/arm/smmuv3: Avoid including CONFIG_DEVICES in hw/ header
MAINTAINERS: Remove my unused git tree locations
MAINTAINERS: Remove my disfunctional emails
MAINTAINERS: Remove PhilMD from NVMe Block Driver
MAINTAINERS: Transfer CI maintenance to Pierrick
Thomas Huth (2):
hw/misc: Fix the valid access size to the avr-power device hw/sh4/sh7750: Remove forgotten abort() in the MM_ITLB_DATA handler
Vivien LEGER (1):
hw/ppc/e500: fix bus-frequency property hardcoded to zero in CPU FDT
node
MAINTAINERS | 9 +- docs/specs/tpm.rst | 24 ++++ hw/arm/smmuv3-accel.h | 41 +------ hw/avr/boot.h | 2 +- hw/ppc/e500.h | 1 + hw/s390x/ipl.h | 2 +- hw/s390x/s390-hypercall.h | 2 +- hw/sd/sdmmc-internal.h | 2 +- hw/tpm/tpm_tis.h | 3 +- hw/xtensa/xtensa_memory.h | 2 +- include/crypto/tls-cipher-suites.h | 2 +- include/hw/acpi/tpm.h | 3 +- include/hw/arm/digic.h | 2 +- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +- include/hw/arm/fsl-imx7.h | 2 +- include/hw/arm/fsl-imx8mp.h | 2 +- include/hw/core/boards.h | 11 ++ include/hw/core/qdev-properties.h | 1 + include/hw/core/qdev.h | 27 ----- include/hw/i2c/arm_sbcon_i2c.h | 2 +- include/hw/i386/apic_internal.h | 2 +- include/hw/intc/mips_gic.h | 2 +- include/hw/misc/bcm2835_thermal.h | 2 +- include/hw/misc/led.h | 2 +- include/hw/ppc/pnv.h | 2 +- include/hw/ppc/spapr.h | 18 +-- include/hw/ppc/spapr_fadump.h | 2 +- include/hw/timer/bcm2835_systmr.h | 2 +- include/qemu/units.h | 2 +- include/qom/compat-properties.h | 40 +++++++ include/qom/object.h | 8 -- include/system/memory.h | 2 +- include/system/tpm.h | 9 ++ system/memory-internal.h | 5 +- accel/accel-system.c | 1 + backends/hostmem.c | 1 + crypto/tls-cipher-suites.c | 2 +- hw/acpi/tpm.c | 10 +- hw/alpha/dp264.c | 2 +- hw/alpha/typhoon.c | 2 +- hw/arm/boot.c | 2 +- hw/arm/exynos4210.c | 2 +- hw/arm/mps3r.c | 2 +- hw/arm/omap1.c | 2 +- hw/arm/realview.c | 2 +- hw/arm/smmuv3-accel-stubs.c | 52 +++++++++ hw/arm/smmuv3-accel.c | 3 +- hw/arm/smmuv3.c | 13 +-- hw/arm/virt-acpi-build.c | 9 +- hw/core/machine.c | 1 + hw/core/qdev-properties.c | 1 + hw/core/qdev.c | 1 + hw/display/ati.c | 12 +- hw/hppa/machine.c | 2 +- hw/hyperv/hyperv.c | 6 +- hw/hyperv/vmbus.c | 1 - hw/i386/acpi-build.c | 4 +- hw/i386/fw_cfg.c | 2 +- hw/i386/multiboot.c | 2 +- hw/i386/pc_q35.c | 1 + hw/i386/pc_sysfw_ovmf-stubs.c | 2 +- hw/i386/pc_sysfw_ovmf.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/intc/arm_gicv3_cpuif.c | 2 +- hw/intc/arm_gicv3_cpuif_common.c | 2 +- hw/intc/m68k_irqc.c | 2 +- hw/intc/sh_intc.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/m68k/an5206.c | 2 +- hw/m68k/mcf5206.c | 2 +- hw/m68k/mcf5208.c | 2 +- hw/m68k/mcf_intc.c | 2 +- hw/m68k/q800-glue.c | 2 +- hw/m68k/q800.c | 2 +- hw/m68k/virt.c | 2 +- hw/microblaze/boot.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- hw/mips/bootloader.c | 2 +- hw/mips/fuloong2e.c | 2 +- hw/mips/jazz.c | 2 +- hw/mips/malta.c | 2 +- hw/misc/avr_power.c | 3 + hw/misc/bcm2835_thermal.c | 2 +- hw/misc/led.c | 2 +- hw/misc/mips_cpc.c | 3 +- hw/misc/riscv_cmgcr.c | 2 +- hw/misc/riscv_cpc.c | 3 +- hw/or1k/boot.c | 2 +- hw/or1k/cputimer.c | 2 +- hw/or1k/or1k-sim.c | 2 +- hw/or1k/virt.c | 2 +- hw/ppc/amigaone.c | 1 - hw/ppc/e500.c | 2 +- hw/ppc/e500plat.c | 1 + hw/ppc/fw_cfg.c | 2 +- hw/ppc/mpc8544_guts.c | 2 +- hw/ppc/mpc8544ds.c | 3 +- hw/ppc/ppc440_uc.c | 2 +- hw/ppc/ppc4xx_devs.c | 2 +- hw/ppc/ppc_booke.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/spapr_rtas.c | 15 +++ hw/ppc/spapr_vhyp_mmu.c | 2 +- hw/ppc/virtex_ml507.c | 2 +- hw/riscv/microblaze-v-generic.c | 2 +- hw/s390x/ap-bridge.c | 2 +- hw/s390x/s390-hypercall.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/tod-tcg.c | 2 +- hw/sd/sd.c | 2 +- hw/sh4/r2d.c | 2 +- hw/sh4/sh7750.c | 1 - hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 2 +- hw/sparc64/niagara.c | 2 +- hw/sparc64/sparc64.c | 2 +- hw/sparc64/sun4u.c | 2 +- hw/timer/bcm2835_systmr.c | 2 +- hw/tpm/tpm_crb.c | 13 +-- hw/tpm/tpm_tis_common.c | 4 +- hw/tpm/tpm_tis_i2c.c | 2 +- hw/tpm/tpm_tis_isa.c | 12 +- hw/tpm/tpm_tis_sysbus.c | 13 ++- hw/tricore/tricore_testboard.c | 2 +- hw/usb/bus-stub.c | 2 +- hw/virtio/virtio-iommu.c | 1 - hw/xtensa/pic_cpu.c | 2 +- hw/xtensa/xtfpga.c | 2 +- qom/compat-properties.c | 116 ++++++++++++++++++++ qom/object.c | 102 +---------------- stubs/fw_cfg.c | 2 +- stubs/hotplug-stubs.c | 2 +- stubs/qdev.c | 2 +- stubs/qom-compat-properties.c | 20 ++++ system/memory.c | 2 +- system/physmem.c | 16 +-- system/rtc.c | 1 + system/vl.c | 1 + target/i386/sev.c | 1 + tests/qtest/fuzz-sb16-test.c | 2 +- tests/qtest/fuzz-sdcard-test.c | 2 +- tests/qtest/sdhci-test.c | 2 +- ui/vdagent.c | 1 + hw/arm/meson.build | 5 +- hw/misc/meson.build | 2 +- hw/timer/meson.build | 2 +- qom/meson.build | 3 + rust/bindings/qom-sys/lib.rs | 2 +- stubs/meson.build | 1 + tests/functional/aarch64/test_raspi3.py | 2 +- tests/functional/arm/test_bflt.py | 2 +- tests/functional/arm/test_raspi2.py | 2 +- tests/functional/m68k/test_nextcube.py | 2 +- tests/functional/mips/test_malta.py | 2 +- tests/functional/mips64el/test_fuloong2e.py | 2 +- tests/functional/mips64el/test_malta.py | 2 +- tests/functional/mipsel/test_malta.py | 2 +- tests/functional/ppc/test_40p.py | 2 +- tests/functional/qemu_test/tesseract.py | 2 +- 162 files changed, 499 insertions(+), 375 deletions(-) create mode 100644 include/qom/compat-properties.h create mode 100644 hw/arm/smmuv3-accel-stubs.c create mode 100644 qom/compat-properties.c create mode 100644 stubs/qom-compat-properties.c
Signature · 1 line
2.53.0
[PULL 01/48] hw/avr: Build as common unit files
Nothing there is target-specific anymore.
Message-Id: <[email protected]>
--- hw/misc/meson.build | 2 +- hw/timer/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/misc/meson.build +1 -1
@@ -152,7 +152,7 @@ system_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_ahb_apb_pnp.c')) system_ss.add(when: 'CONFIG_I2C_ECHO', if_true: files('i2c-echo.c')) -specific_ss.add(when: 'CONFIG_AVR_POWER', if_true: files('avr_power.c')) +system_ss.add(when: 'CONFIG_AVR_POWER', if_true: files('avr_power.c')) system_ss.add(when: 'CONFIG_MAC_VIA', if_true: files('mac_via.c'))
hw/timer/meson.build +1 -1
@@ -33,4 +33,4 @@ system_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c')) specific_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_timer.c')) system_ss.add(when: 'CONFIG_SIFIVE_PWM', if_true: files('sifive_pwm.c')) -specific_ss.add(when: 'CONFIG_AVR_TIMER16', if_true: files('avr_timer16.c')) +system_ss.add(when: 'CONFIG_AVR_TIMER16', if_true: files('avr_timer16.c'))
Signature · 1 line
2.53.0
[PULL 03/48] hw/alpha: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/alpha/dp264.c | 2 +- hw/alpha/typhoon.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/alpha/dp264.c +1 -1
@@ -7,7 +7,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/alpha/cpu.h" #include "exec/target_page.h" #include "elf.h" #include "hw/core/loader.h"
hw/alpha/typhoon.c +1 -1
@@ -12,7 +12,7 @@#include "exec/cpu-interrupt.h" #include "qapi/error.h" #include "hw/pci/pci_host.h" -#include "cpu.h" +#include "target/alpha/cpu.h" #include "hw/core/irq.h" #include "alpha_sys.h"
Signature · 1 line
2.53.0
[PULL 07/48] hw/i386: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- include/hw/i386/apic_internal.h | 2 +- hw/i386/multiboot.c | 2 +- hw/i386/pc_sysfw_ovmf.c | 2 +- hw/i386/vmmouse.c | 2 +- hw/isa/lpc_ich9.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
include/hw/i386/apic_internal.h +1 -1
@@ -21,7 +21,7 @@#ifndef QEMU_APIC_INTERNAL_H #define QEMU_APIC_INTERNAL_H -#include "cpu.h" +#include "target/i386/cpu.h" #include "hw/i386/apic.h" #include "system/memory.h" #include "qemu/timer.h"
hw/i386/multiboot.c +1 -1
@@ -24,7 +24,7 @@#include "qemu/osdep.h" #include "qemu/option.h" -#include "cpu.h" +#include "target/i386/cpu.h" #include "hw/nvram/fw_cfg.h" #include "multiboot.h" #include "hw/core/loader.h"
hw/i386/pc_sysfw_ovmf.c +1 -1
@@ -27,7 +27,7 @@#include "qemu/error-report.h" #include "hw/i386/pc.h" #include "exec/target_page.h" -#include "cpu.h" +#include "target/i386/cpu.h" #include "target/i386/sev.h" #include "kvm/tdx.h"
hw/i386/vmmouse.c +1 -1
@@ -29,7 +29,7 @@#include "hw/input/i8042.h" #include "hw/core/qdev-properties.h" #include "migration/vmstate.h" -#include "cpu.h" +#include "target/i386/cpu.h" #include "qom/object.h" #include "trace.h"
hw/isa/lpc_ich9.c +1 -1
@@ -30,7 +30,7 @@#include "qemu/osdep.h" #include "qemu/log.h" -#include "cpu.h" +#include "target/i386/cpu.h" #include "qapi/error.h" #include "qapi/visitor.h" #include "qemu/range.h"
Signature · 1 line
2.53.0
[PULL 05/48] hw/avr: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/avr/boot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/avr/boot.h +1 -1
@@ -12,7 +12,7 @@#define HW_AVR_BOOT_H #include "hw/core/boards.h" -#include "cpu.h" +#include "target/avr/cpu.h" /** * avr_load_firmware: load an image into a memory region
Signature · 1 line
2.53.0
[PULL 10/48] hw/mips: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- include/hw/intc/mips_gic.h | 2 +- hw/mips/bootloader.c | 2 +- hw/mips/fuloong2e.c | 2 +- hw/mips/jazz.c | 2 +- hw/mips/malta.c | 2 +- hw/misc/mips_cpc.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
include/hw/intc/mips_gic.h +1 -1
@@ -14,7 +14,7 @@#include "qemu/units.h" #include "hw/timer/mips_gictimer.h" #include "hw/core/sysbus.h" -#include "cpu.h" +#include "target/mips/cpu.h" #include "qom/object.h" /* * GIC Specific definitions
hw/mips/bootloader.c +1 -1
@@ -11,7 +11,7 @@#include "qemu/osdep.h" #include "qemu/bitops.h" -#include "cpu.h" +#include "target/mips/cpu.h" #include "hw/mips/bootloader.h" typedef enum bl_reg {
hw/mips/fuloong2e.c +1 -1
@@ -22,7 +22,7 @@#include "qemu/datadir.h" #include "qemu/units.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/mips/cpu.h" #include "hw/core/clock.h" #include "net/net.h" #include "hw/core/boards.h"
hw/mips/jazz.c +1 -1
@@ -52,7 +52,7 @@#ifdef CONFIG_TCG #include "accel/tcg/cpu-ops.h" #endif /* CONFIG_TCG */ -#include "cpu.h" +#include "target/mips/cpu.h" enum jazz_model_e {JAZZ_MAGNUM ,
hw/mips/malta.c +1 -1
@@ -61,7 +61,7 @@#include "hw/core/qdev-clock.h" #include "target/mips/internal.h" #include "trace.h" -#include "cpu.h" +#include "target/mips/cpu.h" #define ENVP_PADDR 0x2000#define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
hw/misc/mips_cpc.c +1 -1
@@ -19,7 +19,7 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/mips/cpu.h" #include "qemu/log.h" #include "qemu/module.h" #include "hw/core/cpu.h"
Signature · 1 line
2.53.0
[PULL 16/48] hw/sparc: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/sparc/leon3.c | 2 +- hw/sparc/sun4m.c | 2 +- hw/sparc64/niagara.c | 2 +- hw/sparc64/sparc64.c | 2 +- hw/sparc64/sun4u.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
hw/sparc/leon3.c +1 -1
@@ -30,7 +30,7 @@#include "qapi/error.h" #include "qemu/datadir.h" #include "exec/cpu-common.h" -#include "cpu.h" +#include "target/sparc/cpu.h" #include "hw/core/irq.h" #include "qemu/timer.h" #include "hw/core/ptimer.h"
hw/sparc/sun4m.c +1 -1
@@ -26,7 +26,7 @@#include "qemu/units.h" #include "qapi/error.h" #include "qemu/datadir.h" -#include "cpu.h" +#include "target/sparc/cpu.h" #include "exec/target_page.h" #include "hw/core/sysbus.h" #include "qemu/error-report.h"
hw/sparc64/niagara.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "block/block_int-common.h" #include "qemu/units.h" -#include "cpu.h" +#include "target/sparc/cpu.h" #include "hw/core/boards.h" #include "hw/char/serial-mm.h" #include "hw/misc/unimp.h"
hw/sparc64/sparc64.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/sparc/cpu.h" #include "hw/core/boards.h" #include "hw/sparc/sparc64.h" #include "qemu/timer.h"
hw/sparc64/sun4u.c +1 -1
@@ -27,7 +27,7 @@#include "qemu/error-report.h" #include "qapi/error.h" #include "qemu/datadir.h" -#include "cpu.h" +#include "target/sparc/cpu.h" #include "exec/target_page.h" #include "hw/core/irq.h" #include "hw/pci/pci.h"
Signature · 1 line
2.53.0
[PULL 06/48] hw/hppa: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/hppa/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/hppa/machine.c +1 -1
@@ -7,7 +7,7 @@#include "qemu/osdep.h" #include "qemu/datadir.h" -#include "cpu.h" +#include "target/hppa/cpu.h" #include "elf.h" #include "hw/core/loader.h" #include "qemu/error-report.h"
Signature · 1 line
2.53.0
[PULL 19/48] hw/tpm: Factor tpm_ppi_enabled() out
In reply to Philippe Mathieu-DaudéFactor out tpm_ppi_enabled() before modifying it in a unique place.
Message-Id: <[email protected]>
--- include/system/tpm.h | 9 +++++++++ hw/acpi/tpm.c | 2 +- hw/i386/acpi-build.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-)
include/system/tpm.h +9 -0
@@ -13,6 +13,7 @@#define QEMU_TPM_H #include "qapi/qapi-types-tpm.h" +#include "qapi/error.h" #include "qom/object.h" #ifdef CONFIG_TPM
@@ -78,6 +79,14 @@ static inline TPMVersion tpm_get_version(TPMIf *ti) return TPM_IF_GET_CLASS(ti)->get_version(ti); } +static inline bool tpm_ppi_enabled (TPMIf *ti) +{ +if (!ti) { +return false; + } +return object_property_get_bool (OBJECT (ti),"ppi" , &error_abort); +} +#else /* CONFIG_TPM */ #define tpm_init () (0)
hw/acpi/tpm.c +1 -1
@@ -25,7 +25,7 @@ void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev)Aml *method, *field, *ifctx, *ifctx2, *ifctx3, *func_mask, *not_implemented, *pak, *tpm2, *tpm3, *pprm, *pprq, *zero, *one; -if (!object_property_get_bool (OBJECT (tpm),"ppi" , &error_abort)) { +if (!tpm_ppi_enabled (tpm)) {return ; }
hw/i386/acpi-build.c +1 -1
@@ -2218,7 +2218,7 @@ void acpi_setup(void) tables.tcpalog->data, acpi_data_len(tables.tcpalog)); tpm =tpm_find (); -if (tpm &&object_property_get_bool (OBJECT (tpm),"ppi" , &error_abort)) { +if (tpm_ppi_enabled (tpm)) { tpm_config = (FwCfgTPMConfig ) { .tpmppi_address =cpu_to_le32 (TPM_PPI_ADDR_BASE ), .tpm_version =tpm_get_version (tpm),
Signature · 1 line
2.53.0
[PULL 24/48] hw/ppc/spapr: Un-inline rtas_load/store() helpers
In reply to Philippe Mathieu-DaudéThe 32-bit binary doesn't use these helpers, so don't need to compile them. Rather than using 64-bit target #ifdef'ry in a global header, un-inline the calls since the helpers are called from I/O (cold) path.
Message-Id: <[email protected]>
--- include/hw/ppc/spapr.h | 18 +++--------------- hw/ppc/spapr_rtas.c | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-)
include/hw/ppc/spapr.h +3 -15
@@ -796,21 +796,9 @@ static inline uint64_t ppc64_phys_to_real(uint64_t addr)return addr & ~0xF000000000000000ULL ; } -static inline uint32_t rtas_ld (target_ulong phys,int n) -{ -return ldl_be_phys (&address_space_memory, -ppc64_phys_to_real (phys +4 * n)); -} - -static inline uint64_t rtas_ldq (target_ulong phys,int n) -{ -return (uint64_t )rtas_ld (phys, n) <<32 |rtas_ld (phys, n +1 ); -} - -static inline void rtas_st (target_ulong phys,int n,uint32_t val) -{ -stl_be_phys (&address_space_memory,ppc64_phys_to_real (phys +4 * n), val); -} +uint32_t rtas_ld (target_ulong phys,int n); +uint64_t rtas_ldq (target_ulong phys,int n); +void rtas_st (target_ulong phys,int n,uint32_t val); typedef void (*spapr_rtas_fn)(PowerPCCPU *cpu, SpaprMachineState *sm, uint32_t token,
hw/ppc/spapr_rtas.c +15 -0
@@ -52,6 +52,21 @@#include "migration/blocker.h" #include "helper_regs.h" +uint32_t rtas_ld (target_ulong phys,int n) +{ +return ldl_be_phys (&address_space_memory,ppc64_phys_to_real (phys +4 * n)); +} + +uint64_t rtas_ldq (target_ulong phys,int n) +{ +return (uint64_t )rtas_ld (phys, n) <<32 |rtas_ld (phys, n +1 ); +} + +void rtas_st (target_ulong phys,int n,uint32_t val) +{ +stl_be_phys (&address_space_memory,ppc64_phys_to_real (phys +4 * n), val); +} + static void rtas_display_character(PowerPCCPU *cpu, SpaprMachineState *spapr, uint32_t token, uint32_t nargs, target_ulong args,
Signature · 1 line
2.53.0
[PULL 13/48] hw/riscv: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/misc/riscv_cmgcr.c | 2 +- hw/misc/riscv_cpc.c | 2 +- hw/riscv/microblaze-v-generic.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
hw/misc/riscv_cmgcr.c +1 -1
@@ -20,7 +20,7 @@#include "hw/misc/riscv_cmgcr.h" #include "hw/core/qdev-properties.h" -#include "cpu.h" +#include "target/riscv/cpu.h" #define CM_RESET_VEC 0x1FC00000#define GCR_ADDRSPACE_SZ 0x8000
hw/misc/riscv_cpc.c +1 -1
@@ -13,7 +13,7 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/riscv/cpu.h" #include "qemu/log.h" #include "qemu/module.h" #include "qemu/timer.h"
hw/riscv/microblaze-v-generic.c +1 -1
@@ -16,7 +16,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/riscv/cpu.h" #include "hw/core/sysbus.h" #include "system/system.h" #include "net/net.h"
Signature · 1 line
2.53.0
[PULL 20/48] hw/tpm: Add TPMIfClass::ppi_enabled field
In reply to Philippe Mathieu-DaudéEach TPM derived device has a @ppi_enabled field, itself exposed as a QOM property. External layers (like the ACPI subsystem) wanting to know whether a device implements PPI has to check for the QOM property available. This can be simplified by declaring a single field in the TPM interface.
Here we add such field to TPMIfClass, before converting each TPM devices to use it in the following commits.
Message-Id: <[email protected]>
--- include/system/tpm.h | 4 ++++ 1 file changed, 4 insertions(+)
include/system/tpm.h +4 -0
@@ -43,6 +43,7 @@ struct TPMIfClass {enum TpmModel model;void (*request_completed)(TPMIf *obj,int ret);enum TPMVersion (*get_version)(TPMIf *obj); +bool ppi_enabled; };#define TYPE_TPM_TIS_ISA "tpm-tis"
@@ -84,6 +85,9 @@ static inline bool tpm_ppi_enabled(TPMIf *ti)if (!ti) {return false; } +if (TPM_IF_GET_CLASS (ti)->ppi_enabled) { +return true; + }return object_property_get_bool (OBJECT (ti),"ppi" , &error_abort); }
Signature · 1 line
2.53.0
[PULL 12/48] hw/ppc: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- include/hw/ppc/pnv.h | 2 +- include/hw/ppc/spapr_fadump.h | 2 +- hw/ppc/mpc8544_guts.c | 2 +- hw/ppc/mpc8544ds.c | 2 +- hw/ppc/ppc440_uc.c | 2 +- hw/ppc/ppc4xx_devs.c | 2 +- hw/ppc/ppc_booke.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/spapr_vhyp_mmu.c | 2 +- hw/ppc/virtex_ml507.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-)
include/hw/ppc/pnv.h +1 -1
@@ -20,7 +20,7 @@#ifndef PPC_PNV_H #define PPC_PNV_H -#include "cpu.h" +#include "target/ppc/cpu.h" #include "hw/core/boards.h" #include "hw/core/sysbus.h" #include "hw/ipmi/ipmi.h"
include/hw/ppc/spapr_fadump.h +1 -1
@@ -6,7 +6,7 @@#ifndef PPC_SPAPR_FADUMP_H #define PPC_SPAPR_FADUMP_H -#include "cpu.h" +#include "target/ppc/cpu.h" /* Fadump commands */ #define FADUMP_CMD_REGISTER 1
hw/ppc/mpc8544_guts.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/osdep.h" #include "qemu/log.h" #include "system/runstate.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "hw/core/sysbus.h" #include "qom/object.h"
hw/ppc/mpc8544ds.c +1 -1
@@ -15,7 +15,7 @@#include "hw/ppc/openpic.h" #include "qemu/error-report.h" #include "qemu/units.h" -#include "cpu.h" +#include "target/ppc/cpu.h" static void mpc8544ds_fixup_devtree (void *fdt) {
hw/ppc/ppc440_uc.c +1 -1
@@ -19,7 +19,7 @@#include "hw/pci/pci.h" #include "exec/cpu-common.h" #include "system/reset.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "ppc440.h" /*****************************************************************************/
hw/ppc/ppc4xx_devs.c +1 -1
@@ -23,7 +23,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "hw/ppc/ppc4xx.h" #include "hw/core/qdev-properties.h" #include "qapi/error.h"
hw/ppc/ppc_booke.c +1 -1
@@ -23,7 +23,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "exec/target_page.h" #include "hw/ppc/ppc.h" #include "qemu/timer.h"
hw/ppc/prep_systemio.c +1 -1
@@ -33,7 +33,7 @@#include "qemu/error-report.h" /* for error_report() */ #include "qemu/module.h" #include "system/runstate.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "trace.h" #define TYPE_PREP_SYSTEMIO "prep-systemio"
hw/ppc/spapr_vhyp_mmu.c +1 -1
@@ -11,7 +11,7 @@#include "qemu/cutils.h" #include "qemu/memalign.h" #include "qemu/error-report.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "helper_regs.h" #include "hw/ppc/spapr.h" #include "mmu-hash64.h"
hw/ppc/virtex_ml507.c +1 -1
@@ -26,7 +26,7 @@#include "qemu/datadir.h" #include "qemu/units.h" #include "exec/page-protection.h" -#include "cpu.h" +#include "target/ppc/cpu.h" #include "hw/core/sysbus.h" #include "hw/char/serial-mm.h" #include "hw/block/flash.h"
Signature · 1 line
2.53.0
[PULL 27/48] hw/core: Move compat_props_add() to 'hw/core/boards.h'
In reply to Philippe Mathieu-Daudécompat_props_add() is only used by board models, no need to expose it to any device model. Restrict by defining it only in "hw/core/boards.h".
Message-Id: <[email protected]>
--- include/hw/core/boards.h | 10 ++++++++++ include/hw/core/qdev.h | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-)
include/hw/core/boards.h +10 -0
@@ -798,6 +798,16 @@ struct MachineState { } \ }while (0 ) +static inline void +compat_props_add (GPtrArray *arr, +GlobalProperty props[],size_t nelem) +{ +int i; +for (i =0 ; i < nelem; i++) { +g_ptr_array_add (arr, (void *)&props[i]); + } +} +extern GlobalProperty hw_compat_10_2[];extern const size_t hw_compat_10_2_len;
include/hw/core/qdev.h +0 -10
@@ -421,16 +421,6 @@ typedef struct GlobalProperty {bool optional; } GlobalProperty; -static inline void -compat_props_add (GPtrArray *arr, -GlobalProperty props[],size_t nelem) -{ -int i; -for (i =0 ; i < nelem; i++) { -g_ptr_array_add (arr, (void *)&props[i]); - } -} -/*** Board API. This should go away once we have a machine config file. ***/ /**
Signature · 1 line
2.53.0
[PULL 21/48] hw/tpm: Remove CRBState::ppi_enabled field
In reply to Philippe Mathieu-DaudéThe CRBState::ppi_enabled boolean was only set in the hw_compat_3_1[] array, via the 'ppi=false' property. We removed all machines using that array, and the array itself in commit a861ffef237 ("hw/core/machine: Remove the hw_compat_3_1[] array"). We can safely remove the now unused property. Since CRB devices always use PPI, simplify removing the CRBState::ppi_enabled field. Set the generic TPMIfClass::ppi_enabled so ACPI subsystem can keep checking its availability.
Message-Id: <[email protected]>
--- hw/tpm/tpm_crb.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
hw/tpm/tpm_crb.c +4 -9
@@ -43,7 +43,6 @@ struct CRBState {size_t be_buffer_size; -bool ppi_enabled;TPMPPI ppi; };typedef struct CRBState CRBState ;
@@ -228,16 +227,13 @@ static const VMStateDescription vmstate_tpm_crb = {static const Property tpm_crb_properties[] = {DEFINE_PROP_TPMBE ("tpmdev" , CRBState, tpmbe), -DEFINE_PROP_BOOL ("ppi" , CRBState, ppi_enabled, true), };static void tpm_crb_reset (void *dev) {CRBState *s =CRB (dev); -if (s->ppi_enabled) { -tpm_ppi_reset (&s->ppi); - } +tpm_ppi_reset (&s->ppi);tpm_backend_reset (s->tpmbe);memset (s->regs,0 ,sizeof (s->regs));
@@ -303,10 +299,8 @@ static void tpm_crb_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (get_system_memory (),TPM_CRB_ADDR_BASE +sizeof (s->regs), &s->cmdmem); -if (s->ppi_enabled) { -tpm_ppi_init (&s->ppi,get_system_memory (), -TPM_PPI_ADDR_BASE ,OBJECT (s)); - } +tpm_ppi_init (&s->ppi,get_system_memory (), +TPM_PPI_ADDR_BASE ,OBJECT (s));if (xen_enabled ()) {tpm_crb_reset (dev);
@@ -325,6 +319,7 @@ static void tpm_crb_class_init(ObjectClass *klass, const void *data) dc->vmsd = &vmstate_tpm_crb; dc->user_creatable = true; tc->model =TPM_MODEL_TPM_CRB ; + tc->ppi_enabled = true; tc->get_version = tpm_crb_get_version; tc->request_completed = tpm_crb_request_completed;
Signature · 1 line
2.53.0
[PULL 18/48] hw/xtensa: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/xtensa/xtensa_memory.h | 2 +- hw/xtensa/pic_cpu.c | 2 +- hw/xtensa/xtfpga.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
hw/xtensa/xtensa_memory.h +1 -1
@@ -28,7 +28,7 @@#ifndef XTENSA_MEMORY_H #define XTENSA_MEMORY_H -#include "cpu.h" +#include "target/xtensa/cpu.h" void xtensa_create_memory_regions(const XtensaMemory *memory, const char *name,
hw/xtensa/pic_cpu.c +1 -1
@@ -26,7 +26,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/xtensa/cpu.h" #include "exec/cpu-interrupt.h" #include "hw/core/irq.h" #include "qemu/log.h"
hw/xtensa/xtfpga.c +1 -1
@@ -28,7 +28,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/xtensa/cpu.h" #include "system/system.h" #include "hw/core/boards.h" #include "hw/core/loader.h"
Signature · 1 line
2.53.0
[PULL 14/48] hw/s390x: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/s390x/ipl.h | 2 +- hw/s390x/s390-hypercall.h | 2 +- hw/s390x/ap-bridge.c | 2 +- hw/s390x/s390-hypercall.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/tod-tcg.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
hw/s390x/ipl.h +1 -1
@@ -13,7 +13,7 @@#ifndef HW_S390_IPL_H #define HW_S390_IPL_H -#include "cpu.h" +#include "target/s390x/cpu.h" #include "exec/target_page.h" #include "system/address-spaces.h" #include "system/memory.h"
hw/s390x/s390-hypercall.h +1 -1
@@ -12,7 +12,7 @@#ifndef HW_S390_HYPERCALL_H #define HW_S390_HYPERCALL_H -#include "cpu.h" +#include "target/s390x/cpu.h" #define DIAG500_VIRTIO_NOTIFY 0/* legacy, implemented as a NOP */ #define DIAG500_VIRTIO_RESET 1/* legacy */
hw/s390x/ap-bridge.c +1 -1
@@ -14,7 +14,7 @@#include "qemu/bitops.h" #include "qemu/module.h" #include "hw/s390x/ap-bridge.h" -#include "cpu.h" +#include "target/s390x/cpu.h" static char *ap_bus_get_dev_path (DeviceState *dev) {
hw/s390x/s390-hypercall.c +1 -1
@@ -11,7 +11,7 @@#include "qemu/osdep.h" #include "qemu/error-report.h" -#include "cpu.h" +#include "target/s390x/cpu.h" #include "hw/s390x/s390-virtio-ccw.h" #include "hw/s390x/s390-hypercall.h" #include "hw/s390x/ioinst.h"
hw/s390x/s390-stattrib.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/error-report.h" #include "qapi/error.h" #include "qobject/qdict.h" -#include "cpu.h" +#include "target/s390x/cpu.h" /* 512KiB cover 2GB of guest memory */ #define CMMA_BLOCK_SIZE (512 * KiB)
hw/s390x/tod-tcg.c +1 -1
@@ -14,7 +14,7 @@#include "qemu/timer.h" #include "qemu/cutils.h" #include "qemu/module.h" -#include "cpu.h" +#include "target/s390x/cpu.h" #include "tcg/tcg_s390x.h" #include "system/rtc.h"
Signature · 1 line
2.53.0
[PULL 15/48] hw/sh4: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/intc/sh_intc.c | 2 +- hw/sh4/r2d.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/intc/sh_intc.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/osdep.h" #include "qemu/log.h" -#include "cpu.h" +#include "target/sh4/cpu.h" #include "hw/sh4/sh_intc.h" #include "hw/core/irq.h" #include "hw/sh4/sh.h"
hw/sh4/r2d.c +1 -1
@@ -27,7 +27,7 @@#include "qemu/units.h" #include "qapi/error.h" #include "qemu/error-report.h" -#include "cpu.h" +#include "target/sh4/cpu.h" #include "hw/core/sysbus.h" #include "hw/sh4/sh.h" #include "system/reset.h"
Signature · 1 line
2.53.0
[PULL 28/48] qom: Declare GlobalProperty structure in 'qom/compat-properties.h'
In reply to Philippe Mathieu-DaudéWhile GlobalProperty is expected to only be used by QDev board layer, it is used by the lower QOM API, so define it in the qom/ namespace. This helps to build binary which use QOM but don't need the QDev layer.
Message-Id: <[email protected]>
--- include/hw/core/boards.h | 1 + include/hw/core/qdev-properties.h | 1 + include/hw/core/qdev.h | 17 ---------------- include/qom/compat-properties.h | 32 +++++++++++++++++++++++++++++++ qom/object.c | 2 +- 5 files changed, 35 insertions(+), 18 deletions(-) create mode 100644 include/qom/compat-properties.h
include/hw/core/boards.h +1 -0
@@ -8,6 +8,7 @@#include "system/blockdev.h" #include "qapi/qapi-types-machine.h" #include "qemu/module.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "hw/core/cpu.h" #include "hw/core/resettable.h"
include/hw/core/qdev-properties.h +1 -0
@@ -1,6 +1,7 @@#ifndef QEMU_QDEV_PROPERTIES_H #define QEMU_QDEV_PROPERTIES_H +#include "qom/compat-properties.h" #include "hw/core/qdev.h" /**
include/hw/core/qdev.h +0 -17
@@ -404,23 +404,6 @@ struct BusState {ResettableState reset; }; -/** -* typedef GlobalProperty - a global property type -* -* @used: Set to true if property was used when initializing a device. -* @optional: If set to true, GlobalProperty will be skipped without errors -* if the property doesn't exist. -* -* An error is fatal for non-hotplugged devices, when the global is applied. -*/ -typedef struct GlobalProperty { -const char *driver; -const char *property; -const char *value; -bool used; -bool optional; -}GlobalProperty ; -/*** Board API. This should go away once we have a machine config file. ***/ /**
include/qom/compat-properties.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* QEMU Object Model +* +* Copyright IBM, Corp. 2011 +* +* Authors: +* Anthony Liguori <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef QEMU_COMPAT_PROPERTIES_H +#define QEMU_COMPAT_PROPERTIES_H + +/** +* typedef GlobalProperty - a global property type +* +* @used: Set to true if property was used when initializing a device. +* @optional: If set to true, GlobalProperty will be skipped without errors +* if the property doesn't exist. +* +* An error is fatal for non-hotplugged devices, when the global is applied. +*/ +typedef struct GlobalProperty { +const char *driver; +const char *property; +const char *value; +bool used; +bool optional; +}GlobalProperty ; + +#endif
qom/object.c +1 -1
@@ -11,8 +11,8 @@*/ #include "qemu/osdep.h" -#include "hw/core/qdev.h" #include "qapi/error.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "qom/object_interfaces.h" #include "qemu/cutils.h"
Signature · 1 line
2.53.0
[PULL 30/48] qom: Restrict compat properties API to system emulation
In reply to Philippe Mathieu-DaudéMove compat properties API definitions to their own file unit, compile it only when system emulation is configured. Add a pair of stubs for user emulation.
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + qom/compat-properties.c | 116 ++++++++++++++++++++++++++++++++++ qom/object.c | 100 ----------------------------- stubs/qom-compat-properties.c | 20 ++++++ qom/meson.build | 3 + stubs/meson.build | 1 + 6 files changed, 141 insertions(+), 100 deletions(-) create mode 100644 qom/compat-properties.c create mode 100644 stubs/qom-compat-properties.c
MAINTAINERS +1 -0
@@ -3551,6 +3551,7 @@ F: qapi/qom.json F: scripts/coccinelle/qom-parent-type.cocci F: scripts/qom-cast-macro-clean-cocci-gen.py F: qom/ +F: stubs/qom-compat-properties.c F: tests/unit/check-qom-interface.c F: tests/unit/check-qom-proplist.c F: tests/qtest/qom-test.c
qom/compat-properties.c new file +116 -0
116 lines not on this page · raw message
qom/object.c +0 -100
106 lines not on this page · raw message
stubs/qom-compat-properties.c new file +20 -0
@@ -0,0 +1,20 @@ +/* +* QEMU Object Model (compat properties stubs for user emulation) +* +* Copyright (c) Linaro +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "qom/compat-properties.h" + +void object_apply_compat_props (Object *obj) +{ +} + +bool object_apply_global_props (Object *obj,const GPtrArray *props, +Error **errp) +{ +return true; +}
qom/meson.build +3 -0
@@ -5,6 +5,9 @@ qom_ss.add(files( 'object_interfaces.c', 'qom-qobject.c', )) +if have_system + qom_ss.add(files('compat-properties.c')) +endif qmp_ss.add(files('qom-qmp-cmds.c')) system_ss.add(files('qom-hmp-cmds.c'))
stubs/meson.build +1 -0
@@ -54,6 +54,7 @@ if have_user # Symbols that are used by hw/core. stub_ss.add(files('cpu-synchronize-state.c')) stub_ss.add(files('cpu-destroy-address-spaces.c')) + stub_ss.add(files('qom-compat-properties.c')) # Stubs for QAPI events. Those can always be included in the build, but # they are not built at all for --disable-system builds.
Signature · 1 line
2.53.0
[PULL 08/48] hw/m68k: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/intc/m68k_irqc.c | 2 +- hw/m68k/an5206.c | 2 +- hw/m68k/mcf5206.c | 2 +- hw/m68k/mcf5208.c | 2 +- hw/m68k/mcf_intc.c | 2 +- hw/m68k/q800-glue.c | 2 +- hw/m68k/q800.c | 2 +- hw/m68k/virt.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
hw/intc/m68k_irqc.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "migration/vmstate.h" #include "hw/core/qdev-properties.h" #include "hw/core/nmi.h"
hw/m68k/an5206.c +1 -1
@@ -8,7 +8,7 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/m68k/mcf.h" #include "hw/core/boards.h" #include "hw/core/loader.h"
hw/m68k/mcf5206.c +1 -1
@@ -9,7 +9,7 @@#include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/log.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/core/qdev-properties.h" #include "hw/core/boards.h" #include "hw/core/irq.h"
hw/m68k/mcf5208.c +1 -1
@@ -20,7 +20,7 @@#include "qemu/log.h" #include "qapi/error.h" #include "qemu/datadir.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/core/irq.h" #include "hw/m68k/mcf.h" #include "hw/m68k/mcf_fec.h"
hw/m68k/mcf_intc.c +1 -1
@@ -10,7 +10,7 @@#include "qapi/error.h" #include "qemu/module.h" #include "qemu/log.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/core/irq.h" #include "hw/core/sysbus.h" #include "hw/m68k/mcf.h"
hw/m68k/q800-glue.c +1 -1
@@ -21,7 +21,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/m68k/q800-glue.h" #include "hw/core/boards.h" #include "hw/core/irq.h"
hw/m68k/q800.c +1 -1
@@ -26,7 +26,7 @@#include "qemu/guest-random.h" #include "exec/target_page.h" #include "system/system.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/core/boards.h" #include "hw/core/or-irq.h" #include "elf.h"
hw/m68k/virt.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/guest-random.h" #include "exec/target_page.h" #include "system/system.h" -#include "cpu.h" +#include "target/m68k/cpu.h" #include "hw/core/boards.h" #include "hw/core/qdev-properties.h" #include "elf.h"
Signature · 1 line
2.53.0
[PULL 11/48] hw/or1k: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/or1k/boot.c | 2 +- hw/or1k/cputimer.c | 2 +- hw/or1k/or1k-sim.c | 2 +- hw/or1k/virt.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
hw/or1k/boot.c +1 -1
@@ -7,7 +7,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/or1k/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" #include "elf.h"
hw/or1k/cputimer.c +1 -1
@@ -19,7 +19,7 @@*/ #include "qemu/osdep.h" -#include "cpu.h" +#include "target/or1k/cpu.h" #include "migration/vmstate.h" #include "qemu/timer.h" #include "system/reset.h"
hw/or1k/or1k-sim.c +1 -1
@@ -21,7 +21,7 @@#include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/or1k/cpu.h" #include "hw/core/irq.h" #include "hw/core/boards.h" #include "hw/char/serial-mm.h"
hw/or1k/virt.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/error-report.h" #include "qemu/guest-random.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/or1k/cpu.h" #include "system/address-spaces.h" #include "hw/core/irq.h" #include "hw/core/boards.h"
Signature · 1 line
2.53.0
[PULL 36/48] hw/arm/smmuv3: Avoid including CONFIG_DEVICES in hw/ header
In reply to Philippe Mathieu-DaudéBy turning the inline functions into stubs we can avoid the use of target-specific CONFIG_DEVICES include in a hw/ header, allowing to build the source files including it as common objects.
Message-Id: <[email protected]>
--- hw/arm/smmuv3-accel.h | 42 ------------------------------ hw/arm/smmuv3-accel-stubs.c | 52 +++++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 5 ++-- 3 files changed, 55 insertions(+), 44 deletions(-) create mode 100644 hw/arm/smmuv3-accel-stubs.c
hw/arm/smmuv3-accel.h +0 -42
@@ -14,7 +14,6 @@#ifdef CONFIG_LINUX #include <linux/iommufd.h> #endif -#include CONFIG_DEVICES /* * Represents an accelerated SMMU instance backed by an iommufd vIOMMU object.
@@ -41,7 +40,6 @@ typedef struct SMMUv3AccelDevice {SMMUv3AccelState *s_accel; } SMMUv3AccelDevice; -#ifdef CONFIG_ARM_SMMUV3_ACCEL bool smmuv3_accel_init (SMMUv3State *s,Error **errp);bool smmuv3_accel_install_ste (SMMUv3State *s,SMMUDevice *sdev,int sid,Error **errp);
@@ -53,45 +51,5 @@ bool smmuv3_accel_issue_inv_cmd(SMMUv3State *s, void *cmd, SMMUDevice *sdev,void smmuv3_accel_idr_override (SMMUv3State *s);bool smmuv3_accel_alloc_veventq (SMMUv3State *s,Error **errp);void smmuv3_accel_reset (SMMUv3State *s); -#else -#include "qapi/error.h" -static inline bool smmuv3_accel_init (SMMUv3State *s,Error **errp) -{ -error_setg (errp,"accel=on support not compiled in" ); -return false; -} -static inline bool -smmuv3_accel_install_ste (SMMUv3State *s,SMMUDevice *sdev,int sid, -Error **errp) -{ -return true; -} -static inline bool -smmuv3_accel_install_ste_range (SMMUv3State *s,SMMUSIDRange *range, -Error **errp) -{ -return true; -} -static inline bool smmuv3_accel_attach_gbpa_hwpt (SMMUv3State *s,Error **errp) -{ -return true; -} -static inline bool -smmuv3_accel_issue_inv_cmd (SMMUv3State *s,void *cmd,SMMUDevice *sdev, -Error **errp) -{ -return true; -} -static inline void smmuv3_accel_idr_override (SMMUv3State *s) -{ -} -static inline bool smmuv3_accel_alloc_veventq (SMMUv3State *s,Error **errp) -{ -return true; -} -static inline void smmuv3_accel_reset (SMMUv3State *s) -{ -} -#endif #endif /* HW_ARM_SMMUV3_ACCEL_H */
hw/arm/smmuv3-accel-stubs.c new file +52 -0
52 lines not on this page · raw message
hw/arm/meson.build +3 -2
@@ -84,8 +84,9 @@ arm_common_ss.add(when: 'CONFIG_ARMSSE', if_true: files('armsse.c')) arm_common_ss.add(when: 'CONFIG_FSL_IMX7', if_true: files('fsl-imx7.c', 'mcimx7d-sabre.c')) arm_common_ss.add(when: 'CONFIG_FSL_IMX8MP', if_true: files('fsl-imx8mp.c')) arm_common_ss.add(when: 'CONFIG_FSL_IMX8MP_EVK', if_true: files('imx8mp-evk.c')) -arm_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmuv3.c')) -arm_ss.add(when: 'CONFIG_ARM_SMMUV3_ACCEL', if_true: files('smmuv3-accel.c')) +arm_common_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmuv3.c')) +arm_common_ss.add(when: 'CONFIG_ARM_SMMUV3_ACCEL', if_true: files('smmuv3-accel.c')) +stub_ss.add(files('smmuv3-accel-stubs.c')) arm_common_ss.add(when: 'CONFIG_FSL_IMX6UL', if_true: files('fsl-imx6ul.c', 'mcimx6ul-evk.c')) arm_common_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c')) arm_common_ss.add(when: 'CONFIG_XEN', if_true: files(
Signature · 1 line
2.53.0
[PULL 31/48] docs/specs/tpm: document PPI support on ARM64 virt
In reply to Philippe Mathieu-DaudéFrom: Mohammadfaiz Bawa <[email protected]>
Document that tpm-tis-device on the ARM virt machine supports PPI with dynamically allocated MMIO via the platform bus, unlike x86 where PPI is at the fixed address 0xFED45000.
Also add hw/arm/virt-acpi-build.c and hw/acpi/tpm.c to the list of files related to TPM ACPI tables.
Message-ID: <[email protected]>
--- docs/specs/tpm.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
docs/specs/tpm.rst +24 -0
@@ -187,8 +187,32 @@ The location of the table is given by the fw_cfg ``tpmppi_address`` field. The PPI memory region size is 0x400 (``TPM_PPI_ADDR_SIZE``) to leave enough room for future updates. +PPI on ARM64 virt +----------------- + +The ARM virt machine supports PPI for ``tpm-tis-device`` as defined +in the `PPI specification`_. + +Unlike the x86 TIS device where the PPI memory region is mapped at +the fixed address ``0xFED45000`` (within the TIS MMIO range), the +ARM64 sysbus device registers PPI memory as a second MMIO region +on the platform bus. The platform bus assigns the guest physical +address dynamically at device plug time. The ACPI ``_DSM`` method +and PPI operation regions reference this dynamically resolved +address. + +PPI is controlled by the ``ppi`` property (default ``on``):: + + -device tpm-tis-device,tpmdev=tpm0,ppi=on + +Without PPI, guest operating systems such as Windows 11 +ARM64 will log errors when attempting to query TPM Physical +Presence capabilities via the ACPI ``_DSM`` method. + QEMU files related to TPM ACPI tables: - ``hw/i386/acpi-build.c`` + - ``hw/arm/virt-acpi-build.c`` + - ``hw/acpi/tpm.c`` - ``include/hw/acpi/tpm.h`` TPM backend devices
Signature · 1 line
2.53.0
[PULL 25/48] hw/hyperv: Replace legacy ld_phys() -> address_space_ld()
In reply to Philippe Mathieu-DaudéPrefer the address_space_ld/st API over the legacy ld/st_phys() because it allow checking for bus access fault, which shouldn't happen here.
Message-ID: <[email protected]>
--- hw/hyperv/hyperv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
hw/hyperv/hyperv.c +4 -1
@@ -709,13 +709,16 @@ uint16_t hyperv_hcall_signal_event(uint64_t param, bool fast)EventFlagHandler *handler;if (unlikely (!fast)) { +MemTxResult result;hwaddr addr = param;if (addr & (__alignof__(addr ) -1 )) {return HV_STATUS_INVALID_ALIGNMENT ; } - param =ldq_phys (&address_space_memory, addr); + param =address_space_ldq_le (&address_space_memory, addr, +MEMTXATTRS_UNSPECIFIED , &result); +assert (result ==MEMTX_OK ); }/*
Signature · 1 line
2.53.0
[PULL 43/48] hw/misc: Fix the valid access size to the avr-power device
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
Accessing the device with in non-single byte mode currently causes QEMU to abort:
$ echo "writew 0x800064 0x4142" | \ ./qemu-system-avr -M mega2560 -display none -qtest stdio -accel qtest [I 0.000000] OPENED [R +0.001784] writew 0x800064 0x4142 qemu-system-avr: ../../devel/qemu/hw/misc/avr_power.c:58: avr_mask_write: Assertion `offset == 0' failed. Aborted (core dumped)
Set the valid max access size to 1 to fix the problem.
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3393
Message-ID: <[email protected]>
--- hw/misc/avr_power.c | 3 +++ 1 file changed, 3 insertions(+)
hw/misc/avr_power.c +3 -0
@@ -73,6 +73,9 @@ static const MemoryRegionOps avr_mask_ops = { .impl = { .max_access_size = 1, }, + .valid = { + .max_access_size = 1, + }, };static void avr_mask_init (Object *dev)
Signature · 1 line
2.53.0
[PULL 29/48] qom: Declare compat properties API in 'qom/compat-properties.h'
In reply to Philippe Mathieu-DaudéWhile most of QEMU files use the QOM concept, few of them use the compatibility properties API (mostly use in system emulation). Move its prototype to a new "qom/compat-properties.h" header, keeping "qom/object.h" for generic QOM.
Message-Id: <[email protected]>
--- include/qom/compat-properties.h | 8 ++++++++ include/qom/object.h | 8 -------- accel/accel-system.c | 1 + backends/hostmem.c | 1 + hw/core/machine.c | 1 + hw/core/qdev-properties.c | 1 + hw/core/qdev.c | 1 + hw/i386/pc_q35.c | 1 + system/rtc.c | 1 + system/vl.c | 1 + target/i386/sev.c | 1 + ui/vdagent.c | 1 + rust/bindings/qom-sys/lib.rs | 2 +- 13 files changed, 19 insertions(+), 9 deletions(-)
include/qom/compat-properties.h +8 -0
@@ -29,4 +29,12 @@ typedef struct GlobalProperty { bool optional; } GlobalProperty; +void object_set_machine_compat_props (GPtrArray *compat_props); +void object_set_accelerator_compat_props (GPtrArray *compat_props); +void object_register_sugar_prop (const char *driver,const char *prop, +const char *value,bool optional); +void object_apply_compat_props (Object *obj); +bool object_apply_global_props (Object *obj,const GPtrArray *props, +Error **errp); +#endif
include/qom/object.h +0 -8
@@ -700,14 +700,6 @@ Object *object_new_with_propv(const char *typename,Error **errp, va_list vargs); -bool object_apply_global_props (Object *obj,const GPtrArray *props, -Error **errp); -void object_set_machine_compat_props (GPtrArray *compat_props); -void object_set_accelerator_compat_props (GPtrArray *compat_props); -void object_register_sugar_prop (const char *driver,const char *prop, -const char *value,bool optional); -void object_apply_compat_props (Object *obj); -/** * object_set_props: * @obj: the object instance to set properties on
accel/accel-system.c +1 -0
@@ -25,6 +25,7 @@#include "qemu/osdep.h" #include "qemu/accel.h" +#include "qom/compat-properties.h" #include "qapi/qapi-commands-accelerator.h" #include "monitor/monitor.h" #include "hw/core/boards.h"
backends/hostmem.c +1 -0
@@ -18,6 +18,7 @@#include "qapi/qapi-builtin-visit.h" #include "qapi/visitor.h" #include "qemu/config-file.h" +#include "qom/compat-properties.h" #include "qom/object_interfaces.h" #include "qemu/mmap-alloc.h" #include "qemu/madvise.h"
hw/core/machine.c +1 -0
@@ -21,6 +21,7 @@#include "qapi/qapi-visit-machine.h" #include "qapi/qapi-commands-machine.h" #include "qemu/madvise.h" +#include "qom/compat-properties.h" #include "qom/object_interfaces.h" #include "system/cpus.h" #include "system/system.h"
hw/core/qdev-properties.c +1 -0
@@ -10,6 +10,7 @@#include "qemu/units.h" #include "qemu/cutils.h" #include "qdev-prop-internal.h" +#include "qom/compat-properties.h" #include "qom/qom-qobject.h" void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
hw/core/qdev.c +1 -0
@@ -32,6 +32,7 @@#include "qapi/visitor.h" #include "qemu/error-report.h" #include "qemu/option.h" +#include "qom/compat-properties.h" #include "hw/core/irq.h" #include "hw/core/qdev-properties.h" #include "hw/core/boards.h"
hw/i386/pc_q35.c +1 -0
@@ -56,6 +56,7 @@#include "hw/usb/hcd-uhci.h" #include "qapi/error.h" #include "qemu/error-report.h" +#include "qom/compat-properties.h" #include "system/numa.h" #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h"
system/rtc.c +1 -0
@@ -28,6 +28,7 @@#include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/timer.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "system/replay.h" #include "system/system.h"
system/vl.c +1 -0
@@ -119,6 +119,7 @@#include "qapi/string-input-visitor.h" #include "qapi/opts-visitor.h" #include "qapi/clone-visitor.h" +#include "qom/compat-properties.h" #include "qom/object_interfaces.h" #include "semihosting/semihost.h" #include "crypto/init.h"
target/i386/sev.c +1 -0
@@ -36,6 +36,7 @@#include "system/reset.h" #include "trace.h" #include "migration/blocker.h" +#include "qom/compat-properties.h" #include "qom/object.h" #include "monitor/monitor.h" #include "monitor/hmp.h"
ui/vdagent.c +1 -0
@@ -5,6 +5,7 @@#include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/units.h" +#include "qom/compat-properties.h" #include "hw/core/qdev.h" #include "hw/core/qdev-properties.h" #include "migration/blocker.h"
rust/bindings/qom-sys/lib.rs +1 -1
@@ -18,7 +18,7 @@ clippy::too_many_arguments )] -use glib_sys::{GHashTable ,GHashTableIter ,GPtrArray ,GSList }; +use glib_sys::{GHashTable ,GHashTableIter ,GSList };use util_sys::{Error ,QDict ,QObject ,Visitor };#[cfg( MESON )]
Signature · 1 line
2.53.0
[PULL 22/48] hw/tpm: Propagate @ppi_enabled to tpm_tis_reset() and remove in TPMState
In reply to Philippe Mathieu-DaudéOf the TPM devices using FIFO mode, only the ISA variant has PPI, and calls tpm_ppi_init() to initialize the PPI state. Propagate @ppi_enabled to tpm_tis_reset() so it only resets the PPI part when requested (ISA case) otherwise the PPI is in uninitialized state. Remove the now unused TPMState::ppi_enabled field. Set the generic TPMIfClass::ppi_enabled so ACPI subsystem can keep checking its availability.
Message-Id: <[email protected]>
--- hw/tpm/tpm_tis.h | 3 +-- hw/tpm/tpm_tis_common.c | 4 ++-- hw/tpm/tpm_tis_i2c.c | 2 +- hw/tpm/tpm_tis_isa.c | 10 ++++------ hw/tpm/tpm_tis_sysbus.c | 2 +- 5 files changed, 9 insertions(+), 12 deletions(-)
hw/tpm/tpm_tis.h +1 -2
@@ -75,7 +75,6 @@ typedef struct TPMState {size_t be_buffer_size; -bool ppi_enabled;TPMPPI ppi; } TPMState;
@@ -83,7 +82,7 @@ extern const VMStateDescription vmstate_locty;extern const MemoryRegionOps tpm_tis_memory_ops;int tpm_tis_pre_save (TPMState *s); -void tpm_tis_reset (TPMState *s); +void tpm_tis_reset (TPMState *s,bool ppi_enabled);enum TPMVersion tpm_tis_get_tpm_version (TPMState *s);void tpm_tis_request_completed (TPMState *s,int ret);uint32_t tpm_tis_read_data (TPMState *s,hwaddr addr,unsigned size);
hw/tpm/tpm_tis_common.c +2 -2
@@ -813,7 +813,7 @@ enum TPMVersion tpm_tis_get_tpm_version(TPMState *s)* This function is called when the machine starts, resets or due to * S3 resume. */ -void tpm_tis_reset (TPMState *s) +void tpm_tis_reset (TPMState *s,bool ppi_enabled) {int c;
@@ -821,7 +821,7 @@ void tpm_tis_reset(TPMState *s) s->be_buffer_size =MIN (tpm_backend_get_buffer_size (s->be_driver),TPM_TIS_BUFFER_MAX ); -if (s->ppi_enabled) { +if (ppi_enabled) {tpm_ppi_reset (&s->ppi); }tpm_backend_reset (s->be_driver);
hw/tpm/tpm_tis_i2c.c +1 -1
@@ -523,7 +523,7 @@ static void tpm_tis_i2c_reset(DeviceState *dev) i2cst->csum_enable =0 ; i2cst->loc_sel =0x00 ; -return tpm_tis_reset (s); +return tpm_tis_reset (s, false); }static void tpm_tis_i2c_class_init (ObjectClass *klass,const void *data)
hw/tpm/tpm_tis_isa.c +4 -6
@@ -88,13 +88,12 @@ static void tpm_tis_isa_reset(DeviceState *dev)TPMStateISA *isadev =TPM_TIS_ISA (dev);TPMState *s = &isadev->state; -return tpm_tis_reset (s); +return tpm_tis_reset (s, true); }static const Property tpm_tis_isa_properties[] = {DEFINE_PROP_UINT32 ("irq" , TPMStateISA, state.irq_num,TPM_TIS_IRQ ),DEFINE_PROP_TPMBE ("tpmdev" , TPMStateISA, state.be_driver), -DEFINE_PROP_BOOL ("ppi" , TPMStateISA, state.ppi_enabled, true), };static void tpm_tis_isa_initfn (Object *obj)
@@ -132,10 +131,8 @@ static void tpm_tis_isa_realizefn(DeviceState *dev, Error **errp)memory_region_add_subregion (isa_address_space (ISA_DEVICE (dev)),TPM_TIS_ADDR_BASE , &s->mmio); -if (s->ppi_enabled) { -tpm_ppi_init (&s->ppi,isa_address_space (ISA_DEVICE (dev)), -TPM_PPI_ADDR_BASE ,OBJECT (dev)); - } +tpm_ppi_init (&s->ppi,isa_address_space (ISA_DEVICE (dev)), +TPM_PPI_ADDR_BASE ,OBJECT (dev)); }static void build_tpm_tis_isa_aml (AcpiDevAmlIf *adev,Aml *scope)
@@ -175,6 +172,7 @@ static void tpm_tis_isa_class_init(ObjectClass *klass, const void *data)device_class_set_props (dc, tpm_tis_isa_properties); dc->vmsd = &vmstate_tpm_tis_isa; tc->model =TPM_MODEL_TPM_TIS ; + tc->ppi_enabled = true; dc->realize = tpm_tis_isa_realizefn;device_class_set_legacy_reset (dc, tpm_tis_isa_reset); tc->request_completed = tpm_tis_isa_request_completed;
hw/tpm/tpm_tis_sysbus.c +1 -1
@@ -87,7 +87,7 @@ static void tpm_tis_sysbus_reset(DeviceState *dev)TPMStateSysBus *sbdev =TPM_TIS_SYSBUS (dev);TPMState *s = &sbdev->state; -return tpm_tis_reset (s); +return tpm_tis_reset (s, false); }static const Property tpm_tis_sysbus_properties[] = {
Signature · 1 line
2.53.0
[PULL 32/48] hw/acpi/tpm: parameterize PPI base address in tpm_build_ppi_acpi
In reply to Philippe Mathieu-DaudéFrom: Mohammadfaiz Bawa <[email protected]>
Add a ppi_base parameter to tpm_build_ppi_acpi() instead of hardcoding TPM_PPI_ADDR_BASE. This prepares for ARM64 support where PPI memory is dynamically allocated by the platform bus and the address is not known at compile time.
Update the x86 callers (ISA TIS and CRB) to pass TPM_PPI_ADDR_BASE explicitly. No behavioral change.
Message-ID: <[email protected]>
--- include/hw/acpi/tpm.h | 3 ++- hw/acpi/tpm.c | 8 ++++---- hw/i386/acpi-build.c | 2 +- hw/tpm/tpm_tis_isa.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-)
include/hw/acpi/tpm.h +2 -1
@@ -20,6 +20,7 @@#include "hw/core/registerfields.h" #include "hw/acpi/aml-build.h" #include "system/tpm.h" +#include "exec/hwaddr.h" #ifdef CONFIG_TPM
@@ -250,7 +251,7 @@ REG32(CRB_DATA_BUFFER, 0x80)*/ #define TPM_I2C_INT_ENABLE_MASK 0x0 -void tpm_build_ppi_acpi (TPMIf *tpm,Aml *dev); +void tpm_build_ppi_acpi (TPMIf *tpm,Aml *dev,hwaddr ppi_base);#endif /* CONFIG_TPM */
hw/acpi/tpm.c +4 -4
@@ -20,7 +20,7 @@#include "qapi/error.h" #include "hw/acpi/tpm.h" -void tpm_build_ppi_acpi (TPMIf *tpm,Aml *dev) +void tpm_build_ppi_acpi (TPMIf *tpm,Aml *dev,hwaddr ppi_base) {Aml *method, *field, *ifctx, *ifctx2, *ifctx3, *func_mask, *not_implemented, *pak, *tpm2, *tpm3, *pprm, *pprq, *zero, *one;
@@ -40,7 +40,7 @@ void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev)*/ aml_append (dev,aml_operation_region ("TPP2" ,AML_SYSTEM_MEMORY , -aml_int (TPM_PPI_ADDR_BASE +0x100 ), +aml_int (ppi_base +0x100 ),0x5A )); field =aml_field ("TPP2" ,AML_ANY_ACC ,AML_NOLOCK ,AML_PRESERVE );aml_append (field,aml_named_field ("PPIN" ,8 ));
@@ -56,7 +56,7 @@ void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev)aml_append (dev,aml_operation_region ("TPP3" ,AML_SYSTEM_MEMORY , -aml_int (TPM_PPI_ADDR_BASE + +aml_int (ppi_base +0x15a /* movv, docs/specs/tpm.rst */ ),0x1 )); field =aml_field ("TPP3" ,AML_BYTE_ACC ,AML_NOLOCK ,AML_PRESERVE );
@@ -78,7 +78,7 @@ void tpm_build_ppi_acpi(TPMIf *tpm, Aml *dev)aml_append (method,aml_operation_region ("TPP1" ,AML_SYSTEM_MEMORY , -aml_add (aml_int (TPM_PPI_ADDR_BASE ), op,NULL ),0x1 )); +aml_add (aml_int (ppi_base), op,NULL ),0x1 )); field =aml_field ("TPP1" ,AML_BYTE_ACC ,AML_NOLOCK ,AML_PRESERVE );aml_append (field,aml_named_field ("TPPF" ,8 ));aml_append (method, field);
hw/i386/acpi-build.c +1 -1
@@ -1219,7 +1219,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,aml_append (dev,aml_name_decl ("_STA" ,aml_int (0xf )));aml_append (dev,aml_name_decl ("_UID" ,aml_int (1 ))); -tpm_build_ppi_acpi (tpm, dev); +tpm_build_ppi_acpi (tpm, dev,TPM_PPI_ADDR_BASE );aml_append (sb_scope, dev); }
hw/tpm/tpm_tis_isa.c +1 -1
@@ -159,7 +159,7 @@ static void build_tpm_tis_isa_aml(AcpiDevAmlIf *adev, Aml *scope)*/ /* aml_append(crs, aml_irq_no_flags(isadev->state.irq_num)); */ aml_append (dev,aml_name_decl ("_CRS" , crs)); -tpm_build_ppi_acpi (ti, dev); +tpm_build_ppi_acpi (ti, dev,TPM_PPI_ADDR_BASE );aml_append (scope, dev); }
Signature · 1 line
2.53.0
[PULL 41/48] hw/hyperv: remove duplicate include
In reply to Philippe Mathieu-DaudéFrom: Osama Abdelkader <[email protected]>
exec/target_page.h is included twice
Message-ID: <[email protected]>
Message-ID: <[email protected]>
--- hw/hyperv/hyperv.c | 1 - hw/hyperv/vmbus.c | 1 - 2 files changed, 2 deletions(-)
hw/hyperv/hyperv.c +0 -1
@@ -26,7 +26,6 @@#include "hw/hyperv/hyperv.h" #include "qom/object.h" #include "target/i386/kvm/hyperv-proto.h" -#include "exec/target_page.h" struct SynICState {DeviceState parent_obj;
hw/hyperv/vmbus.c +0 -1
@@ -21,7 +21,6 @@#include "hw/core/sysbus.h" #include "exec/cpu-common.h" #include "system/kvm.h" -#include "exec/target_page.h" #include "trace.h" enum {
Signature · 1 line
2.53.0
[PULL 09/48] hw/microblaze: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/microblaze/boot.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
hw/microblaze/boot.c +1 -1
@@ -26,7 +26,7 @@#include "qemu/osdep.h" #include "qemu/datadir.h" -#include "cpu.h" +#include "target/microblaze/cpu.h" #include "qemu/option.h" #include "qemu/config-file.h" #include "qemu/error-report.h"
hw/microblaze/petalogix_ml605_mmu.c +1 -1
@@ -28,7 +28,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/microblaze/cpu.h" #include "hw/core/sysbus.h" #include "net/net.h" #include "hw/block/flash.h"
hw/microblaze/petalogix_s3adsp1800_mmu.c +1 -1
@@ -27,7 +27,7 @@#include "qemu/target-info.h" #include "qemu/units.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/microblaze/cpu.h" #include "hw/core/sysbus.h" #include "net/net.h" #include "hw/block/flash.h"
hw/microblaze/xlnx-zynqmp-pmu.c +1 -1
@@ -19,7 +19,7 @@#include "qapi/error.h" #include "system/address-spaces.h" #include "hw/core/boards.h" -#include "cpu.h" +#include "target/microblaze/cpu.h" #include "boot.h" #include "hw/intc/xlnx-zynqmp-ipi.h"
Signature · 1 line
2.53.0
[PULL 02/48] hw/misc/cpc: Include missing 'hw/core/cpu.h' header
In reply to Philippe Mathieu-DaudéThe "hw/core/cpu.h" header is indirectly included. Include it explicitly otherwise we get when refactoring unrelated headers:
../hw/misc/mips_cpc.c:36:53: error: unknown type name 'run_on_cpu_data'
36 | static void mips_cpu_reset_async_work(CPUState *cs, run_on_cpu_data data)
| ^
../hw/misc/mips_cpc.c:40:5: error: call to undeclared function 'cpu_reset'
40 | cpu_reset(cs);
| ^
../hw/misc/riscv_cpc.c:34:54: error: unknown type name 'run_on_cpu_data'
34 | static void riscv_cpu_reset_async_work(CPUState *cs, run_on_cpu_data data)
| ^
../hw/misc/riscv_cpc.c:39:5: error: call to undeclared function 'cpu_reset'
39 | cpu_reset(cs);
| ^Message-Id: <[email protected]>
--- hw/misc/mips_cpc.c | 1 + hw/misc/riscv_cpc.c | 1 + 2 files changed, 2 insertions(+)
hw/misc/mips_cpc.c +1 -0
@@ -22,6 +22,7 @@#include "cpu.h" #include "qemu/log.h" #include "qemu/module.h" +#include "hw/core/cpu.h" #include "hw/core/sysbus.h" #include "migration/vmstate.h"
hw/misc/riscv_cpc.c +1 -0
@@ -18,6 +18,7 @@#include "qemu/module.h" #include "qemu/timer.h" #include "qemu/bitops.h" +#include "hw/core/cpu.h" #include "hw/core/sysbus.h" #include "migration/vmstate.h"
Signature · 1 line
2.53.0
[PULL 23/48] hw/tpm: Simplify tpm_ppi_enabled()
In reply to Philippe Mathieu-DaudéTPM instances don't expose any "ppi" property anymore, remove that dead code.
Message-Id: <[email protected]>
--- include/system/tpm.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
include/system/tpm.h +1 -5
@@ -13,7 +13,6 @@#define QEMU_TPM_H #include "qapi/qapi-types-tpm.h" -#include "qapi/error.h" #include "qom/object.h" #ifdef CONFIG_TPM
@@ -85,10 +84,7 @@ static inline bool tpm_ppi_enabled(TPMIf *ti)if (!ti) {return false; } -if (TPM_IF_GET_CLASS (ti)->ppi_enabled) { -return true; - } - return object_property_get_bool(OBJECT(ti), "ppi", &error_abort); + return TPM_IF_GET_CLASS(ti)->ppi_enabled; }#else /* CONFIG_TPM */
Signature · 1 line
2.53.0
[PULL 04/48] hw/arm: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- include/hw/arm/digic.h | 2 +- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +- include/hw/arm/fsl-imx7.h | 2 +- include/hw/arm/fsl-imx8mp.h | 2 +- hw/arm/boot.c | 2 +- hw/arm/exynos4210.c | 2 +- hw/arm/mps3r.c | 2 +- hw/arm/omap1.c | 2 +- hw/arm/realview.c | 2 +- hw/arm/smmuv3.c | 2 +- hw/intc/arm_gicv3_cpuif.c | 2 +- hw/intc/arm_gicv3_cpuif_common.c | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-)
include/hw/arm/digic.h +1 -1
@@ -18,7 +18,7 @@#ifndef HW_ARM_DIGIC_H #define HW_ARM_DIGIC_H -#include "cpu.h" +#include "target/arm/cpu.h" #include "hw/timer/digic-timer.h" #include "hw/char/digic-uart.h" #include "qom/object.h"
include/hw/arm/fsl-imx6.h +1 -1
@@ -35,7 +35,7 @@#include "hw/pci-host/designware.h" #include "hw/core/or-irq.h" #include "system/memory.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "qom/object.h" #define TYPE_FSL_IMX6 "fsl-imx6"
include/hw/arm/fsl-imx6ul.h +1 -1
@@ -34,7 +34,7 @@#include "hw/usb/chipidea.h" #include "hw/usb/imx-usb-phy.h" #include "system/memory.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "qom/object.h" #include "qemu/units.h"
include/hw/arm/fsl-imx7.h +1 -1
@@ -37,7 +37,7 @@#include "hw/pci-host/designware.h" #include "hw/usb/chipidea.h" #include "hw/core/or-irq.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "qom/object.h" #include "qemu/units.h"
include/hw/arm/fsl-imx8mp.h +1 -1
@@ -9,7 +9,7 @@#ifndef FSL_IMX8MP_H #define FSL_IMX8MP_H -#include "cpu.h" +#include "target/arm/cpu.h" #include "hw/char/imx_serial.h" #include "hw/gpio/imx_gpio.h" #include "hw/i2c/imx_i2c.h"
hw/arm/boot.c +1 -1
@@ -14,7 +14,7 @@#include <libfdt.h> #include "hw/arm/boot.h" #include "hw/arm/linux-boot-if.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "exec/tswap.h" #include "exec/target_page.h" #include "system/kvm.h"
hw/arm/exynos4210.c +1 -1
@@ -24,7 +24,7 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "exec/tswap.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "hw/cpu/a9mpcore.h" #include "hw/core/irq.h" #include "system/blockdev.h"
hw/arm/mps3r.c +1 -1
@@ -29,7 +29,7 @@#include "qapi/error.h" #include "qobject/qlist.h" #include "system/address-spaces.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "system/system.h" #include "hw/core/boards.h" #include "hw/core/or-irq.h"
hw/arm/omap1.c +1 -1
@@ -22,7 +22,7 @@#include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "system/address-spaces.h" #include "exec/cpu-common.h" #include "hw/core/hw-error.h"
hw/arm/realview.c +1 -1
@@ -9,7 +9,7 @@#include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "hw/core/sysbus.h" #include "hw/arm/boot.h" #include "hw/arm/primecell.h"
hw/arm/smmuv3.c +1 -1
@@ -26,7 +26,7 @@#include "hw/core/qdev-properties.h" #include "hw/core/qdev.h" #include "hw/pci/pci.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "exec/target_page.h" #include "trace.h" #include "qemu/log.h"
hw/intc/arm_gicv3_cpuif.c +1 -1
@@ -19,7 +19,7 @@#include "trace.h" #include "gicv3_internal.h" #include "hw/core/irq.h" -#include "cpu.h" +#include "target/arm/cpu.h" #include "target/arm/cpregs.h" #include "target/arm/cpu-features.h" #include "target/arm/internals.h"
hw/intc/arm_gicv3_cpuif_common.c +1 -1
@@ -11,7 +11,7 @@#include "qemu/osdep.h" #include "gicv3_internal.h" -#include "cpu.h" +#include "target/arm/cpu.h" void gicv3_set_gicv3state (CPUState *cpu,GICv3CPUState *s) {
Signature · 1 line
2.53.0
[PULL 34/48] physmem: Simplify dirty memory type checks with loop
In reply to Philippe Mathieu-DaudéFrom: Bin Guo <[email protected]>
In physical_memory_range_includes_clean(), we have three nearly identical if-statements checking different DIRTY_MEMORY types (VGA, CODE, MIGRATION). This code duplication makes maintenance harder and increases the risk of inconsistencies when adding new dirty memory types.
Replace the repetitive checks with a simple loop that iterates through all DIRTY_MEMORY_NUM types, checking only those specified in the mask. This reduces code size and makes it easier to add new dirty memory types in the future.
Message-ID: <[email protected]>
--- system/physmem.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)
system/physmem.c +5 -11
@@ -981,17 +981,11 @@ uint8_t physical_memory_range_includes_clean(ram_addr_t start, {uint8_t ret =0 ; -if (mask & (1 <<DIRTY_MEMORY_VGA ) && - !physical_memory_all_dirty (start, length,DIRTY_MEMORY_VGA )) { - ret |= (1 <<DIRTY_MEMORY_VGA ); - } -if (mask & (1 <<DIRTY_MEMORY_CODE ) && - !physical_memory_all_dirty (start, length,DIRTY_MEMORY_CODE )) { - ret |= (1 <<DIRTY_MEMORY_CODE ); - } -if (mask & (1 <<DIRTY_MEMORY_MIGRATION ) && - !physical_memory_all_dirty (start, length,DIRTY_MEMORY_MIGRATION )) { - ret |= (1 <<DIRTY_MEMORY_MIGRATION ); +for (int i =0 ; i <DIRTY_MEMORY_NUM ; i++) { +if ((mask & (1 << i)) && + !physical_memory_all_dirty (start, length, i)) { + ret |= (1 << i); + } }return ret; }
Signature · 1 line
2.53.0
[PULL 37/48] hw/ppc/e500: fix bus-frequency property hardcoded to zero in CPU FDT node
In reply to Philippe Mathieu-DaudéFrom: Vivien LEGER <[email protected]>
The bus-frequency property in the CPU FDT node was hardcoded to 0. This is incorrect - it should reflect the actual platform bus clock frequency, as firmware and RTOSes use it to derive peripheral clock rates.
Notably, the RTEMS QorIQ BSP uses bus-frequency to program the MPIC global timer interval. With bus-frequency=0, the timer interval overflows to ~85 seconds, preventing any clock interrupts from firing.
Fix by adding a bus_freq field to PPCE500MachineClass and using it in the FDT generator. Set bus_freq = PLATFORM_CLK_FREQ_HZ (400MHz) for existing machines, matching the existing clock_freq value.
Message-ID: <[email protected]>
--- hw/ppc/e500.h | 1 + hw/ppc/e500.c | 2 +- hw/ppc/e500plat.c | 1 + hw/ppc/mpc8544ds.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-)
hw/ppc/e500.h +1 -0
@@ -40,6 +40,7 @@ struct PPCE500MachineClass {hwaddr pci_mmio_bus_base;hwaddr spin_base;uint32_t clock_freq; +uint32_t bus_freq;uint32_t tb_freq; };
hw/ppc/e500.c +1 -1
@@ -518,7 +518,7 @@ static int ppce500_load_device_tree(PPCE500MachineState *pms, env->icache_line_size);qemu_fdt_setprop_cell (fdt, cpu_name,"d-cache-size" ,0x8000 );qemu_fdt_setprop_cell (fdt, cpu_name,"i-cache-size" ,0x8000 ); -qemu_fdt_setprop_cell (fdt, cpu_name,"bus-frequency" ,0 ); +qemu_fdt_setprop_cell (fdt, cpu_name,"bus-frequency" , pmc->bus_freq);if (cpu->cpu_index) {qemu_fdt_setprop_string (fdt, cpu_name,"status" ,"disabled" ); qemu_fdt_setprop_string(fdt, cpu_name, "enable-method",
hw/ppc/e500plat.c +1 -0
@@ -94,6 +94,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, const void *data) pmc->pci_mmio_bus_base =0xE0000000ULL ; pmc->spin_base =0xFEF000000ULL ; pmc->clock_freq =PLATFORM_CLK_FREQ_HZ ; + pmc->bus_freq =PLATFORM_CLK_FREQ_HZ ; pmc->tb_freq =PLATFORM_CLK_FREQ_HZ ; mc->desc ="generic paravirt e500 platform" ;
hw/ppc/mpc8544ds.c +1 -0
@@ -56,6 +56,7 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc, const void *data) pmc->pci_pio_base =0xE1000000ULL ; pmc->spin_base =0xEF000000ULL ; pmc->clock_freq =PLATFORM_CLK_FREQ_HZ ; + pmc->bus_freq =PLATFORM_CLK_FREQ_HZ ; pmc->tb_freq =PLATFORM_CLK_FREQ_HZ ; mc->desc ="mpc8544ds" ;
Signature · 1 line
2.53.0
[PULL 44/48] hw/sh4/sh7750: Remove forgotten abort() in the MM_ITLB_DATA handler
In reply to Philippe Mathieu-DaudéFrom: Thomas Huth <[email protected]>
QEMU currently aborts when the guest writes to the MM_ITLB_DATA register:
echo "writel 0xf3000000 0x11223344" | \
./qemu-system-sh4 -M r2d -display none -accel qtest -qtest stdio
[I 0.000000] OPENED
[R +0.004476] writel 0xf3000000 0x11223344
Aborted (core dumped)
Looking at the history of the code, the abort() here has likely just been forgotten when the register handler had been implemented (it used to be a reminder about unimplemented functionality initially):
https://gitlab.com/qemu-project/qemu/-/commit/9f97309a70f12df5f9104f1f
Thus simply remove the abort() now to get rid of the problem.
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3420
Message-ID: <[email protected]>
--- hw/sh4/sh7750.c | 1 - 1 file changed, 1 deletion(-)
hw/sh4/sh7750.c +0 -1
@@ -687,7 +687,6 @@ static void sh7750_mmct_write(void *opaque, hwaddr addr,break ;case MM_ITLB_DATA :cpu_sh4_write_mmaped_itlb_data (&s->cpu->env, addr, mem_value); -abort ();break ;case MM_OCACHE_ADDR :case MM_OCACHE_DATA :
Signature · 1 line
2.53.0
[PULL 42/48] hw/ppc/amigaone: remove duplicate include
In reply to Philippe Mathieu-DaudéFrom: Osama Abdelkader <[email protected]>
hw/ppc/ppc.h is included twice
Message-ID: <[email protected]>
--- hw/ppc/amigaone.c | 1 - 1 file changed, 1 deletion(-)
hw/ppc/amigaone.c +0 -1
@@ -20,7 +20,6 @@#include "hw/isa/vt82c686.h" #include "hw/ide/pci.h" #include "hw/i2c/smbus_eeprom.h" -#include "hw/ppc/ppc.h" #include "exec/cpu-common.h" #include "system/block-backend.h" #include "system/qtest.h"
Signature · 1 line
2.53.0
[PULL 47/48] MAINTAINERS: Remove PhilMD from NVMe Block Driver
In reply to Philippe Mathieu-DaudéI'm not following this code anymore, no need
to be listed as reviewer.
My gratitude to Stefan for everything he taught me while supervising this topic. I truly appreciate the time he spent helping me in many occasions. Thank you very much Stefan!
Message-Id: <[email protected]>
--- MAINTAINERS | 1 - 1 file changed, 1 deletion(-)
MAINTAINERS +0 -1
@@ -4253,7 +4253,6 @@ F: block/null.c NVMe Block Driver M: Stefan Hajnoczi <[email protected]> R: Fam Zheng <[email protected]> -R: Philippe Mathieu-Daudé <[email protected]> L: [email protected] S: Supported F: block/nvme*
Signature · 1 line
2.53.0
[PULL 38/48] ati-vga: fix unsigned integer overflow in cursor bounds checks
In reply to Philippe Mathieu-DaudéFrom: Junjie Cao <[email protected]>
The cursor bounds checks compare (srcoff + N) against vram_size, but both sides are uint32_t so the addition can wrap past UINT32_MAX when srcoff underflows from the cur_hv_offs subtraction, causing the check to be bypassed.
Rewrite the checks as (srcoff > vram_size - N) to avoid the overflow-prone addition, matching the style already used in ati_mm_read() and ati_mm_write().
Message-ID: <[email protected]>
--- hw/display/ati.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/display/ati.c +2 -2
@@ -149,7 +149,7 @@ static void ati_cursor_define(ATIVGAState *s)/* FIXME handle cur_hv_offs correctly */ srcoff = s->regs.cur_offset - (s->regs.cur_hv_offs >>16 ) - (s->regs.cur_hv_offs &0xffff ) *16 ; -if (srcoff +64 *16 > s->vga.vram_size) { +if (srcoff > s->vga.vram_size -64 *16 ) {return ; }for (int i =0 ; i <64 ; i++, srcoff +=16 ) {
@@ -206,7 +206,7 @@ static void ati_cursor_draw_line(VGACommonState *vga, uint8_t *d, int scr_y) }/* FIXME handle cur_hv_offs correctly */ srcoff = s->cursor_offset + (scr_y - vga->hw_cursor_y) *16 ; -if (srcoff +16 > s->vga.vram_size) { +if (srcoff > s->vga.vram_size -16 ) {return ; } dp = &dp[vga->hw_cursor_x];
Signature · 1 line
2.53.0
[PULL 35/48] hw/arm/smmuv3: Have smmuv3_accel_init() take an Error* parameter
In reply to Philippe Mathieu-DaudéBy giving smmuv3_accel_init() the ability to populate an error, we can fail early in smmu_realize() when CONFIG_ARM_SMMUV3_ACCEL is not available, simplifying smmu_validate_property().
Message-Id: <[email protected]>
--- hw/arm/smmuv3-accel.h | 7 +++++-- hw/arm/smmuv3-accel.c | 3 ++- hw/arm/smmuv3.c | 11 +++-------- 3 files changed, 10 insertions(+), 11 deletions(-)
hw/arm/smmuv3-accel.h +5 -2
@@ -42,7 +42,7 @@ typedef struct SMMUv3AccelDevice { } SMMUv3AccelDevice;#ifdef CONFIG_ARM_SMMUV3_ACCEL -void smmuv3_accel_init (SMMUv3State *s); +bool smmuv3_accel_init (SMMUv3State *s,Error **errp);bool smmuv3_accel_install_ste (SMMUv3State *s,SMMUDevice *sdev,int sid,Error **errp); bool smmuv3_accel_install_ste_range(SMMUv3State *s, SMMUSIDRange *range,
@@ -54,8 +54,11 @@ void smmuv3_accel_idr_override(SMMUv3State *s);bool smmuv3_accel_alloc_veventq (SMMUv3State *s,Error **errp);void smmuv3_accel_reset (SMMUv3State *s);#else -static inline void smmuv3_accel_init (SMMUv3State *s) +#include "qapi/error.h" +static inline bool smmuv3_accel_init (SMMUv3State *s,Error **errp) { +error_setg (errp,"accel=on support not compiled in" ); +return false; } static inline bool smmuv3_accel_install_ste(SMMUv3State *s, SMMUDevice *sdev, int sid,
hw/arm/smmuv3-accel.c +2 -1
@@ -917,11 +917,12 @@ static void smmuv3_accel_as_init(SMMUv3State *s)address_space_init (shared_as_sysmem, &root,"smmuv3-accel-as-sysmem" ); } -void smmuv3_accel_init (SMMUv3State *s) +bool smmuv3_accel_init (SMMUv3State *s,Error **errp) {SMMUState *bs =ARM_SMMU (s); s->s_accel =g_new0 (SMMUv3AccelState,1 ); bs->iommu_ops = &smmuv3_accel_ops;smmuv3_accel_as_init (s); +return true; }
hw/arm/smmuv3.c +3 -8
@@ -1965,13 +1965,6 @@ static void smmu_reset_exit(Object *obj, ResetType type)static bool smmu_validate_property (SMMUv3State *s,Error **errp) { -#ifndef CONFIG_ARM_SMMUV3_ACCEL -if (s->accel) { -error_setg (errp,"accel=on support not compiled in" ); -return false; - } -#endif -if (s->ats ==ON_OFF_AUTO_AUTO ) {error_setg (errp,"ats auto mode is not supported" );return false;
@@ -2033,7 +2026,9 @@ static void smmu_realize(DeviceState *d, Error **errp) }if (s->accel) { -smmuv3_accel_init (s); +if (!smmuv3_accel_init (s, errp)) { +return ; + }error_setg (&s->migration_blocker,"Migration not supported with SMMUv3 " "accelerator mode enabled" );if (migrate_add_blocker (&s->migration_blocker, errp) <0 ) {
Signature · 1 line
2.53.0
[PULL 39/48] ati-vga: mask out lock bit from CUR_OFFSET in cursor offset calculation
In reply to Philippe Mathieu-DaudéFrom: Junjie Cao <[email protected]>
Bit 31 of CUR_OFFSET is the cursor lock bit, not part of the actual cursor address (bits 26:4). Although the callers already check for the lock bit and return early, mask it out with 0x07fffff0 when computing the cursor source offset so the calculation only uses the address bits.
Message-ID: <[email protected]>
--- hw/display/ati.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
hw/display/ati.c +5 -3
@@ -147,7 +147,7 @@ static void ati_cursor_define(ATIVGAState *s)return ;/* Do not update cursor if locked or rendered by guest */ }/* FIXME handle cur_hv_offs correctly */ - srcoff = s->regs.cur_offset - (s->regs.cur_hv_offs >>16 ) - + srcoff = (s->regs.cur_offset &0x07fffff0 ) - (s->regs.cur_hv_offs >>16 ) - (s->regs.cur_hv_offs &0xffff ) *16 ;if (srcoff > s->vga.vram_size -64 *16 ) {return ;
@@ -176,13 +176,15 @@ static void ati_cursor_invalidate(VGACommonState *vga)if (s->cursor_size != size || vga->hw_cursor_x != s->regs.cur_hv_pos >>16 || vga->hw_cursor_y != (s->regs.cur_hv_pos &0xffff ) || - s->cursor_offset != s->regs.cur_offset - (s->regs.cur_hv_offs >>16 ) - + s->cursor_offset != (s->regs.cur_offset &0x07fffff0 ) - + (s->regs.cur_hv_offs >>16 ) - (s->regs.cur_hv_offs &0xffff ) *16 ) {/* Remove old cursor then update and show new one if needed */ vga_invalidate_scanlines (vga, vga->hw_cursor_y, vga->hw_cursor_y +63 ); vga->hw_cursor_x = s->regs.cur_hv_pos >>16 ; vga->hw_cursor_y = s->regs.cur_hv_pos &0xffff ; - s->cursor_offset = s->regs.cur_offset - (s->regs.cur_hv_offs >>16 ) - + s->cursor_offset = (s->regs.cur_offset &0x07fffff0 ) - + (s->regs.cur_hv_offs >>16 ) - (s->regs.cur_hv_offs &0xffff ) *16 ; s->cursor_size = size;if (size) {
Signature · 1 line
2.53.0
[PULL 40/48] hw/virtio/virtio-iommu: remove duplicate include
In reply to Philippe Mathieu-DaudéFrom: Osama Abdelkader <[email protected]>
qemu/reserved-region.h is included twice
Message-ID: <[email protected]>
--- hw/virtio/virtio-iommu.c | 1 - 1 file changed, 1 deletion(-)
hw/virtio/virtio-iommu.c +0 -1
@@ -28,7 +28,6 @@#include "system/kvm.h" #include "system/reset.h" #include "system/system.h" -#include "qemu/reserved-region.h" #include "qemu/units.h" #include "qapi/error.h" #include "qemu/error-report.h"
Signature · 1 line
2.53.0
[PULL 46/48] MAINTAINERS: Remove my disfunctional emails
In reply to Philippe Mathieu-DaudéWith retrospective, mentioning email in authorship wasn't really useful, more now than these addresses are dead:
- [email protected]
- [email protected]
Simply remove them.
Message-Id: <[email protected]>
--- hw/sd/sdmmc-internal.h | 2 +- include/crypto/tls-cipher-suites.h | 2 +- include/hw/i2c/arm_sbcon_i2c.h | 2 +- include/hw/misc/bcm2835_thermal.h | 2 +- include/hw/misc/led.h | 2 +- include/hw/timer/bcm2835_systmr.h | 2 +- include/qemu/units.h | 2 +- crypto/tls-cipher-suites.c | 2 +- hw/i386/fw_cfg.c | 2 +- hw/i386/pc_sysfw_ovmf-stubs.c | 2 +- hw/misc/bcm2835_thermal.c | 2 +- hw/misc/led.c | 2 +- hw/ppc/fw_cfg.c | 2 +- hw/sd/sd.c | 2 +- hw/timer/bcm2835_systmr.c | 2 +- hw/usb/bus-stub.c | 2 +- stubs/fw_cfg.c | 2 +- stubs/hotplug-stubs.c | 2 +- stubs/qdev.c | 2 +- tests/qtest/fuzz-sb16-test.c | 2 +- tests/qtest/fuzz-sdcard-test.c | 2 +- tests/qtest/sdhci-test.c | 2 +- tests/functional/aarch64/test_raspi3.py | 2 +- tests/functional/arm/test_bflt.py | 2 +- tests/functional/arm/test_raspi2.py | 2 +- tests/functional/m68k/test_nextcube.py | 2 +- tests/functional/mips/test_malta.py | 2 +- tests/functional/mips64el/test_fuloong2e.py | 2 +- tests/functional/mips64el/test_malta.py | 2 +- tests/functional/mipsel/test_malta.py | 2 +- tests/functional/ppc/test_40p.py | 2 +- tests/functional/qemu_test/tesseract.py | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-)
hw/sd/sdmmc-internal.h +1 -1
@@ -1,7 +1,7 @@/* * SD/MMC cards common * -* Copyright (c) 2018 Philippe Mathieu-Daudé <[email protected]> +* Copyright (c) 2018 Philippe Mathieu-Daudé * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory.
include/crypto/tls-cipher-suites.h +1 -1
@@ -3,7 +3,7 @@* * Copyright (c) 2018-2020 Red Hat, Inc. * -* Author: Philippe Mathieu-Daudé <[email protected]> +* Author: Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
include/hw/i2c/arm_sbcon_i2c.h +1 -1
@@ -5,7 +5,7 @@* * Copyright (c) 2006-2007 CodeSourcery. * Copyright (c) 2012 Oskar Andero <[email protected]> -* Copyright (C) 2020 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2020 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
include/hw/misc/bcm2835_thermal.h +1 -1
@@ -1,7 +1,7 @@/* * BCM2835 dummy thermal sensor * -* Copyright (C) 2019 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2019 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
include/hw/misc/led.h +1 -1
@@ -1,7 +1,7 @@/* * QEMU single LED device * -* Copyright (C) 2020 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2020 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
include/hw/timer/bcm2835_systmr.h +1 -1
@@ -1,7 +1,7 @@/* * BCM2835 SYS timer emulation * -* Copyright (c) 2019 Philippe Mathieu-Daudé <[email protected]> +* Copyright (c) 2019 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
include/qemu/units.h +1 -1
@@ -2,7 +2,7 @@* IEC binary prefixes definitions * * Copyright (C) 2015 Nikunj A Dadhania, IBM Corporation -* Copyright (C) 2018 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2018 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
crypto/tls-cipher-suites.c +1 -1
@@ -3,7 +3,7 @@* * Copyright (c) 2018-2020 Red Hat, Inc. * -* Author: Philippe Mathieu-Daudé <[email protected]> +* Author: Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
hw/i386/fw_cfg.c +1 -1
@@ -4,7 +4,7 @@* Copyright (c) 2019 Red Hat, Inc. * * Author: -* Philippe Mathieu-Daudé <[email protected]> +* Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later *
hw/i386/pc_sysfw_ovmf-stubs.c +1 -1
@@ -4,7 +4,7 @@* Copyright (c) 2021 Red Hat, Inc. * * Author: -* Philippe Mathieu-Daudé <[email protected]> +* Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later *
hw/misc/bcm2835_thermal.c +1 -1
@@ -1,7 +1,7 @@/* * BCM2835 dummy thermal sensor * -* Copyright (C) 2019 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2019 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
hw/misc/led.c +1 -1
@@ -1,7 +1,7 @@/* * QEMU single LED device * -* Copyright (C) 2020 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2020 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
hw/ppc/fw_cfg.c +1 -1
@@ -4,7 +4,7 @@* Copyright (c) 2019 Red Hat, Inc. * * Author: -* Philippe Mathieu-Daudé <[email protected]> +* Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later *
hw/sd/sd.c +1 -1
@@ -6,7 +6,7 @@* * Copyright (c) 2006 Andrzej Zaborowski <[email protected]> * Copyright (c) 2007 CodeSourcery -* Copyright (c) 2018 Philippe Mathieu-Daudé <[email protected]> +* Copyright (c) 2018 Philippe Mathieu-Daudé * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions
hw/timer/bcm2835_systmr.c +1 -1
@@ -1,7 +1,7 @@/* * BCM2835 SYS timer emulation * -* Copyright (C) 2019 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2019 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later *
hw/usb/bus-stub.c +1 -1
@@ -1,7 +1,7 @@/* * QEMU USB device emulation stubs * -* Copyright (C) 2021 Philippe Mathieu-Daudé <[email protected]> +* Copyright (C) 2021 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
stubs/fw_cfg.c +1 -1
@@ -4,7 +4,7 @@* Copyright (c) 2019 Red Hat, Inc. * * Author: -* Philippe Mathieu-Daudé <[email protected]> +* Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later *
stubs/hotplug-stubs.c +1 -1
@@ -4,7 +4,7 @@* Copyright (c) Red Hat * * Authors: -* Philippe Mathieu-Daudé <[email protected]>, +* Philippe Mathieu-Daudé, * * SPDX-License-Identifier: GPL-2.0-or-later *
stubs/qdev.c +1 -1
@@ -4,7 +4,7 @@* Copyright (c) 2021 Red Hat, Inc. * * Author: -* Philippe Mathieu-Daudé <[email protected]> +* Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later *
tests/qtest/fuzz-sb16-test.c +1 -1
@@ -1,7 +1,7 @@/* * QTest fuzzer-generated testcase for sb16 audio device * -* Copyright (c) 2021 Philippe Mathieu-Daudé <[email protected]> +* Copyright (c) 2021 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
tests/qtest/fuzz-sdcard-test.c +1 -1
@@ -1,7 +1,7 @@/* * QTest fuzzer-generated testcase for sdcard device * -* Copyright (c) 2021 Philippe Mathieu-Daudé <[email protected]> +* Copyright (c) 2021 Philippe Mathieu-Daudé * * SPDX-License-Identifier: GPL-2.0-or-later */
tests/qtest/sdhci-test.c +1 -1
@@ -1,7 +1,7 @@/* * QTest testcase for SDHCI controllers * -* Written by Philippe Mathieu-Daudé <[email protected]> +* Written by Philippe Mathieu-Daudé * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory.
tests/functional/aarch64/test_raspi3.py +1 -1
@@ -3,7 +3,7 @@ # Functional test that boots a Linux kernel on a Raspberry Pi machine # and checks the console # -# Copyright (c) 2020 Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) 2020 Philippe Mathieu-Daudé # # SPDX-License-Identifier: GPL-2.0-or-later
tests/functional/arm/test_bflt.py +1 -1
@@ -2,7 +2,7 @@ # # Test the bFLT loader format # -# Copyright (C) 2019 Philippe Mathieu-Daudé <[email protected]> +# Copyright (C) 2019 Philippe Mathieu-Daudé # # SPDX-License-Identifier: GPL-2.0-or-later
tests/functional/arm/test_raspi2.py +1 -1
@@ -3,7 +3,7 @@ # Functional test that boots a Linux kernel on a Raspberry Pi machine # and checks the console # -# Copyright (c) 2019 Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) 2019 Philippe Mathieu-Daudé # # SPDX-License-Identifier: GPL-2.0-or-later
tests/functional/m68k/test_nextcube.py +1 -1
@@ -2,7 +2,7 @@ # # Functional test that boots a VM and run OCR on the framebuffer # -# Copyright (c) 2019 Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) 2019 Philippe Mathieu-Daudé # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory.
tests/functional/mips/test_malta.py +1 -1
@@ -2,7 +2,7 @@ # # Functional tests for the big-endian 32-bit MIPS Malta board # -# Copyright (c) Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) Philippe Mathieu-Daudé # # SPDX-License-Identifier: GPL-2.0-or-later
tests/functional/mips64el/test_fuloong2e.py +1 -1
@@ -2,7 +2,7 @@ # # Functional tests for the Lemote Fuloong-2E machine. # -# Copyright (c) 2019 Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) 2019 Philippe Mathieu-Daudé # # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory.
tests/functional/mips64el/test_malta.py +1 -1
@@ -2,7 +2,7 @@ # # Functional tests for the little-endian 64-bit MIPS Malta board # -# Copyright (c) Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) Philippe Mathieu-Daudé # # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory.
tests/functional/mipsel/test_malta.py +1 -1
@@ -2,7 +2,7 @@ # # Functional tests for the little-endian 32-bit MIPS Malta board # -# Copyright (c) Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) Philippe Mathieu-Daudé # # This work is licensed under the terms of the GNU GPL, version 2 or later. # See the COPYING file in the top-level directory.
tests/functional/ppc/test_40p.py +1 -1
@@ -2,7 +2,7 @@ # # Functional test that boots a PReP/40p machine and checks its serial console. # -# Copyright (c) Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) Philippe Mathieu-Daudé # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory.
tests/functional/qemu_test/tesseract.py +1 -1
@@ -1,6 +1,6 @@ # ... # -# Copyright (c) 2019 Philippe Mathieu-Daudé <[email protected]> +# Copyright (c) 2019 Philippe Mathieu-Daudé # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory.
Signature · 1 line
2.53.0
[PULL 33/48] hw/tpm: add PPI support to tpm-tis-device for ARM64 virt
In reply to Philippe Mathieu-DaudéFrom: Mohammadfaiz Bawa <[email protected]>
Add PPI memory region and ACPI _STA, _DSM to tpm-tis-sysbus so Windows 11 ARM64 guests no longer log Event ID 15 errors from tpm.sys on every boot.
Message-ID: <[email protected]>
--- hw/arm/virt-acpi-build.c | 9 ++++++++- hw/tpm/tpm_tis_sysbus.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +8 -1
@@ -240,7 +240,8 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)Aml *dev =aml_device ("TPM0" );aml_append (dev,aml_name_decl ("_HID" ,aml_string ("MSFT0101" )));aml_append (dev,aml_name_decl ("_STR" ,aml_string ("TPM 2.0 Device" ))); -aml_append (dev,aml_name_decl ("_UID" ,aml_int (0 ))); +aml_append (dev,aml_name_decl ("_UID" ,aml_int (1 ))); +aml_append (dev,aml_name_decl ("_STA" ,aml_int (0xF )));Aml *crs =aml_resource_template (); aml_append(crs,
@@ -248,6 +249,12 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms) (uint32_t )memory_region_size (sbdev_mr), AML_READ_WRITE));aml_append (dev,aml_name_decl ("_CRS" , crs)); + +hwaddr ppi_base =platform_bus_get_mmio_addr (pbus, sbdev,1 ); +if (ppi_base !=-1 ) { + ppi_base += pbus_base; +tpm_build_ppi_acpi (TPM_IF (sbdev), dev, ppi_base); + } aml_append(scope, dev); }#endif
hw/tpm/tpm_tis_sysbus.c +11 -0
@@ -30,6 +30,7 @@#include "hw/core/sysbus.h" #include "tpm_tis.h" #include "qom/object.h" +#include "qemu/memalign.h" struct TPMStateSysBus {/*< private >*/
@@ -99,6 +100,7 @@ static void tpm_tis_sysbus_initfn(Object *obj) {TPMStateSysBus *sbdev =TPM_TIS_SYSBUS (obj);TPMState *s = &sbdev->state; +size_t host_page_size =qemu_real_host_page_size (); memory_region_init_io(&s->mmio, obj, &tpm_tis_memory_ops, s, "tpm-tis-mmio",
@@ -106,6 +108,12 @@ static void tpm_tis_sysbus_initfn(Object *obj)sysbus_init_mmio (SYS_BUS_DEVICE (obj), &s->mmio);sysbus_init_irq (SYS_BUS_DEVICE (obj), &s->irq); + + s->ppi.buf =qemu_memalign (host_page_size, +ROUND_UP (TPM_PPI_ADDR_SIZE , host_page_size)); +memory_region_init_ram_device_ptr (&s->ppi.ram, obj,"tpm-ppi" , +TPM_PPI_ADDR_SIZE , s->ppi.buf); +sysbus_init_mmio (SYS_BUS_DEVICE (obj), &s->ppi.ram); }static void tpm_tis_sysbus_realizefn (DeviceState *dev,Error **errp)
@@ -122,6 +130,8 @@ static void tpm_tis_sysbus_realizefn(DeviceState *dev, Error **errp)error_setg (errp,"'tpmdev' property is required" );return ; } + +vmstate_register_ram (&s->ppi.ram, dev); }static void tpm_tis_sysbus_class_init (ObjectClass *klass,const void *data)
@@ -132,6 +142,7 @@ static void tpm_tis_sysbus_class_init(ObjectClass *klass, const void *data)device_class_set_props (dc, tpm_tis_sysbus_properties); dc->vmsd = &vmstate_tpm_tis_sysbus; tc->model =TPM_MODEL_TPM_TIS ; + tc->ppi_enabled = true; dc->realize = tpm_tis_sysbus_realizefn;device_class_set_legacy_reset (dc, tpm_tis_sysbus_reset); tc->request_completed = tpm_tis_sysbus_request_completed;
Signature · 1 line
2.53.0
[PULL 48/48] MAINTAINERS: Transfer CI maintenance to Pierrick
In reply to Philippe Mathieu-DaudéPass the torch to Pierrick who does much better and useful work in this area: https://github.com/p-b-o/qemu-ci
Remove me from custom runner files since I don't have contact with OSUOSL or IBM.
Message-Id: <[email protected]>
--- MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
MAINTAINERS +2 -3
@@ -4478,7 +4478,7 @@ Build and test automation Build and test automation, general continuous integration M: Alex Bennée <[email protected]> T: git https://gitlab.com/stsquad/qemu testing/next -M: Philippe Mathieu-Daudé <[email protected]> +M: Pierrick Bouvier <[email protected]> S: Maintained F: .github/workflows/lockdown.yml F: .gitlab-ci.yml
@@ -4524,13 +4524,11 @@ F: .gitlab-ci.d/windows.yml Guest Test Compilation Support M: Alex Bennée <[email protected]> -R: Philippe Mathieu-Daudé <[email protected]> S: Maintained F: tests/tcg/Makefile.target GitLab custom runners (HW sponsored by Linaro, OSUOSL and IBM) M: Alex Bennée <[email protected]> -M: Philippe Mathieu-Daudé <[email protected]> S: Maintained F: .gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml F: .gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml
@@ -4565,6 +4563,7 @@ M: Paolo Bonzini <[email protected]> R: Marc-André Lureau <[email protected]> R: Daniel P. Berrange <[email protected]> R: Philippe Mathieu-Daudé <[email protected]> +R: Pierrick Bouvier <[email protected]> S: Maintained F: meson.build F: meson_options.txt
Signature · 1 line
2.53.0
[PULL 26/48] system/memory: Constify various AddressSpace arguments (flatview)
In reply to Philippe Mathieu-DaudéMark the AddressSpace structure const when it is only accessed read-only.
Message-Id: <[email protected]>
--- include/system/memory.h | 2 +- system/memory-internal.h | 5 +++-- system/memory.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-)
include/system/memory.h +1 -1
@@ -1201,7 +1201,7 @@ struct FlatView {MemoryRegion *root; }; -static inline FlatView *address_space_to_flatview (AddressSpace *as) +static inline FlatView *address_space_to_flatview (const AddressSpace *as) {return qatomic_rcu_read (&as->current_map); }
system/memory-internal.h +3 -2
@@ -20,12 +20,13 @@ static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv)return fv->dispatch; } -static inline AddressSpaceDispatch *address_space_to_dispatch (AddressSpace *as) +static inline +AddressSpaceDispatch *address_space_to_dispatch (const AddressSpace *as) {return flatview_to_dispatch (address_space_to_flatview (as)); } -FlatView *address_space_get_flatview (AddressSpace *as); +FlatView *address_space_get_flatview (const AddressSpace *as);void flatview_unref (FlatView *view);extern const MemoryRegionOps unassigned_mem_ops;
system/memory.c +1 -1
@@ -819,7 +819,7 @@ static void address_space_add_del_ioeventfds(AddressSpace *as, } } -FlatView *address_space_get_flatview (AddressSpace *as) +FlatView *address_space_get_flatview (const AddressSpace *as) {FlatView *view;
Signature · 1 line
2.53.0
[PULL 45/48] MAINTAINERS: Remove my unused git tree locations
In reply to Philippe Mathieu-DaudéI haven't used these for years. And as explained in [*] QEMU development workflow doesn't leverage subsystem's git trees. Remove them.
Message-Id: <[email protected]>
--- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-)
MAINTAINERS +0 -2
@@ -2270,7 +2270,6 @@ T: git https://github.com/jasowang/qemu.git net Parallel NOR Flash devices M: Philippe Mathieu-Daudé <[email protected]> -T: git https://gitlab.com/philmd/qemu.git pflash-next S: Maintained F: hw/block/pflash_cfi*.c F: include/hw/block/flash.h
@@ -2870,7 +2869,6 @@ F: include/hw/nvram/fw_cfg.h F: include/standard-headers/linux/qemu_fw_cfg.h F: tests/qtest/libqos/fw_cfg.c F: tests/qtest/fw_cfg-test.c -T: git https://github.com/philmd/qemu.git fw_cfg-next XIVE R: Gautam Menghani <[email protected]>
Signature · 1 line
2.53.0
[PULL 17/48] hw/tricore: Include full path to target 'cpu.h' header
In reply to Philippe Mathieu-DaudéMessage-Id: <[email protected]>
--- hw/tricore/tricore_testboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/tricore/tricore_testboard.c +1 -1
@@ -21,7 +21,7 @@#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "cpu.h" +#include "target/tricore/cpu.h" #include "net/net.h" #include "hw/core/boards.h" #include "hw/core/loader.h"
Signature · 1 line
2.53.0