Merge tag 'hw-misc-20260331' of https://github.com/philmd/qemu into staging

Misc HW patches

Few fixes and MAINTAINERS updates.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmnLyKIACgkQ4+MsLN6t
# wN5PNw/9ELCMUEt9V+K4NvfHYEeBAj3TvjxqJSoZ2NI8NrOP4edzWz690D4Hdqg/
# Ptt+OpgQicfxCpFrH3VNC7v69zaVRPB17BAlwMOJDF7x/2vRa4RsaPDpM3zYy3NA
# Rc+ujc/Umt8T3O0qVVcRExGx4XhHyo7ed55GPMXNcMFmG2ndmX2K/ZJfRCBWqSjd
# aMsqG/ZnT5WR7MgWL4jOC3oZsOg53FlNl4cVDV5HuVKzR8kK3M2u1nDFB2Oyi7Wa
# /9d6h5lwXRW5VrccNMM2wSoQqeYiChq7/ZcxBgmZrgbq9vlsSFQ/ea+3NloTLbx9
# 7SVwR7XHL2Bo8Civ6VjmyStt8bRCNOAYD4cg2br/EDhO9rnyVNpaCcYprAcK9I+H
# CKcwWBzKvgzkboCqU5rXrE1m5E+eZX9xiz3K0J7up+m72rGunhOIeou4gAY4wtFj
# d7F5dCzzC7wn+iIK45KtDpGTb9chlOoTTx0auwco9Av1C5ZqqoVa1+Dpf4wKnb2+
# 2Hzpz5L7R8UxYWTyYuL3ZDOqaVc5ZIpxrYwbzLI8VO1lHN0vPfzNLXfUaIPO4XNm
# JL0GDUV4CetFVAQJHFckUEpI+NAGkajvmY5bckwSA1CXWGDqGmRIuaL9ML9R79/V
# yZUZ0z/WHJQlH8Q953BE2SxQzhql/ZKDQeQSP/LVmVaJW2arBAw=
# =vddZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 31 14:14:10 2026 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'hw-misc-20260331' of https://github.com/philmd/qemu:
  MAINTAINERS: fix OSUOSL typo
  hw/hppa: Disable Artist graphics card on 64-bit machines
  hw/pci-host/astro: Update copyright and documentation link
  ati-vga: Add upper limit to x-linear-aper-size property
  ati-vga: Silence warning about operator precedence
  target/i386: Treat qtest like TCG for supported-features
  target/i386/cpu.c: Correct minor grammar error in warning
  backends/igvm: switch to PRIx64
  target/mips: save CP0 timer in vmstate
  MAINTAINERS: Separate QDev section from QOM one
  ppc/pnv: generate dtb after machine initialization is complete

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2026-03-31 15:21:44 +01:00
10 changed files with 85 additions and 43 deletions

View File

@@ -3546,24 +3546,29 @@ M: Paolo Bonzini <pbonzini@redhat.com>
R: Daniel P. Berrange <berrange@redhat.com>
S: Supported
F: docs/devel/qom.rst
F: include/qom/
F: qapi/qom.json
F: scripts/coccinelle/qom-parent-type.cocci
F: scripts/qom-cast-macro-clean-cocci-gen.py
F: qom/
F: tests/unit/check-qom-interface.c
F: tests/unit/check-qom-proplist.c
F: tests/qtest/qom-test.c
QDev
M: Paolo Bonzini <pbonzini@redhat.com>
R: Daniel P. Berrange <berrange@redhat.com>
S: Supported
F: docs/qdev-device-use.txt
F: hw/core/qdev*
F: hw/core/bus.c
F: hw/core/sysbus.c
F: include/hw/qdev*
F: include/monitor/qdev.h
F: include/qom/
F: qapi/qom.json
F: qapi/qdev.json
F: scripts/coccinelle/qom-parent-type.cocci
F: scripts/qom-cast-macro-clean-cocci-gen.py
F: system/qdev-monitor.c
F: stubs/qdev.c
F: qom/
F: tests/unit/check-qom-interface.c
F: tests/unit/check-qom-proplist.c
F: tests/unit/test-qdev-global-props.c
F: tests/qtest/qom-test.c
QOM boilerplate conversion script
S: Orphan
@@ -4525,7 +4530,7 @@ R: Philippe Mathieu-Daudé <philmd@linaro.org>
S: Maintained
F: tests/tcg/Makefile.target
GitLab custom runners (HW sponsored by Linaro, OSOUL and IBM)
GitLab custom runners (HW sponsored by Linaro, OSUOSL and IBM)
M: Alex Bennée <alex.bennee@linaro.org>
M: Philippe Mathieu-Daudé <philmd@linaro.org>
S: Maintained

View File

@@ -187,7 +187,7 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t addr, uint64_t size,
error_setg(
errp,
"Processing of IGVM file failed: Could not prepare memory "
"at address 0x%lX due to existing non-RAM region",
"at address 0x%" PRIx64 " due to existing non-RAM region",
addr);
return NULL;
}
@@ -198,7 +198,7 @@ static void *qigvm_prepare_memory(QIgvm *ctx, uint64_t addr, uint64_t size,
error_setg(
errp,
"Processing of IGVM file failed: Could not prepare memory "
"at address 0x%lX: region size exceeded",
"at address 0x%" PRIx64 ": region size exceeded",
addr);
return NULL;
}

View File

@@ -1130,6 +1130,10 @@ static void ati_vga_realize(PCIDevice *dev, Error **errp)
s->linear_aper_sz = ATI_R100_LINEAR_APER_SIZE;
}
}
if (s->linear_aper_sz > 256 * MiB) {
error_setg(errp, "x-linear-aper-size is too large (maximum 256 MiB)");
return;
}
if (s->linear_aper_sz < 16 * MiB) {
error_setg(errp, "x-linear-aper-size is too small (minimum 16 MiB)");
return;

View File

@@ -91,7 +91,7 @@ static void setup_2d_blt_ctx(const ATIVGAState *s, ATI2DCtx *ctx)
ctx->host_data_active = s->host_data.active;
ctx->left_to_right = s->regs.dp_cntl & DST_X_LEFT_TO_RIGHT;
ctx->top_to_bottom = s->regs.dp_cntl & DST_Y_TOP_TO_BOTTOM;
ctx->need_swap = HOST_BIG_ENDIAN != s->vga.big_endian_fb ? true : false;
ctx->need_swap = (HOST_BIG_ENDIAN != s->vga.big_endian_fb);
ctx->frgd_clr = s->regs.dp_brush_frgd_clr;
ctx->palette = s->vga.palette;
ctx->dst_offset = s->regs.dst_offset;

View File

@@ -384,7 +384,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
SysBusDevice *s;
/* Graphics setup. */
if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
if (lasi_dev && machine->enable_graphics &&
vga_interface_type != VGA_NONE) {
dev = qdev_new("artist");
s = SYS_BUS_DEVICE(dev);
bool disabled = object_property_get_bool(OBJECT(dev), "disable", NULL);

View File

@@ -3,12 +3,12 @@
* with Elroy PCI bus (LBA) adapter emulation
* Found in C3000 and similar machines
*
* (C) 2023 by Helge Deller <deller@gmx.de>
* (C) 2023-2026 by Helge Deller <deller@gmx.de>
*
* This work is licensed under the GNU GPL license version 2 or later.
*
* Chip documentation is available at:
* https://parisc.wiki.kernel.org/index.php/Technical_Documentation
* https://parisc.docs.kernel.org/en/latest/technical_documentation.html
*
* TODO:
* - All user-added devices are currently attached to the first

View File

@@ -748,31 +748,10 @@ static void pnv_powerdown_notify(Notifier *n, void *opaque)
static void pnv_reset(MachineState *machine, ResetType type)
{
PnvMachineState *pnv = PNV_MACHINE(machine);
IPMIBmc *bmc;
void *fdt;
qemu_devices_reset(type);
/*
* The machine should provide by default an internal BMC simulator.
* If not, try to use the BMC device that was provided on the command
* line.
*/
bmc = pnv_bmc_find(&error_fatal);
if (!pnv->bmc) {
if (!bmc) {
if (!qtest_enabled()) {
warn_report("machine has no BMC device. Use '-device "
"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' "
"to define one");
}
} else {
pnv_bmc_set_pnor(bmc, pnv->pnor);
pnv->bmc = bmc;
}
}
fdt = machine->fdt;
cpu_physical_memory_write(PNV_FDT_ADDR, fdt, fdt_totalsize(fdt));
}
@@ -984,6 +963,37 @@ static uint64_t pnv_chip_get_ram_size(PnvMachineState *pnv, int chip_id)
return chip_id == 0 ? 1 * GiB : QEMU_ALIGN_DOWN(ram_per_chip, 1 * MiB);
}
static void pnv_machine_init_done(Notifier *notifier, void *data)
{
PnvMachineState *pnv = container_of(notifier, PnvMachineState, machine_init_done);
MachineState *machine = MACHINE(pnv);
IPMIBmc *bmc;
/*
* The machine should provide by default an internal BMC simulator.
* If not, try to use the BMC device that was provided on the command
* line.
*/
bmc = pnv_bmc_find(&error_fatal);
if (!pnv->bmc) {
if (!bmc) {
if (!qtest_enabled()) {
warn_report("machine has no BMC device. Use '-device "
"ipmi-bmc-sim,id=bmc0 -device isa-ipmi-bt,bmc=bmc0,irq=10' "
"to define one");
}
} else {
pnv_bmc_set_pnor(bmc, pnv->pnor);
pnv->bmc = bmc;
}
}
if (!machine->fdt) {
machine->fdt = pnv_dt_create(machine);
_FDT((fdt_pack(machine->fdt)));
}
}
static void pnv_init(MachineState *machine)
{
const char *bios_name = machine->firmware ?: FW_FILE_NAME;
@@ -1244,10 +1254,8 @@ static void pnv_init(MachineState *machine)
pmc->i2c_init(pnv);
}
if (!machine->fdt) {
machine->fdt = pnv_dt_create(machine);
_FDT((fdt_pack(machine->fdt)));
}
pnv->machine_init_done.notify = pnv_machine_init_done;
qemu_add_machine_init_done_notifier(&pnv->machine_init_done);
}
/*

View File

@@ -111,6 +111,8 @@ struct PnvMachineState {
bool big_core;
bool lpar_per_core;
Notifier machine_init_done;
};
PnvChip *pnv_get_chip(PnvMachineState *pnv, uint32_t chip_id);

View File

@@ -8087,7 +8087,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w)
r = hvf_get_supported_cpuid(wi->cpuid.eax,
wi->cpuid.ecx,
wi->cpuid.reg);
} else if (tcg_enabled()) {
} else if (tcg_enabled() || qtest_enabled()) {
r = wi->tcg_features;
} else {
return ~0;
@@ -9628,9 +9628,9 @@ void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
if ((env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_MPX) &&
(env->features[FEAT_7_1_EDX] & CPUID_7_1_EDX_APXF)) {
mark_unavailable_features(cpu, FEAT_7_0_EBX, CPUID_7_0_EBX_MPX,
"this feature is conflict with APX");
"this feature conflicts with APX");
mark_unavailable_features(cpu, FEAT_7_1_EDX, CPUID_7_1_EDX_APXF,
"this feature is conflict with MPX");
"this feature conflicts with MPX");
}
x86_cpu_enable_xsave_components(cpu);

View File

@@ -3,6 +3,7 @@
#include "internal.h"
#include "migration/cpu.h"
#include "fpu_helper.h"
#include "qemu/timer.h"
static int cpu_post_load(void *opaque, int version_id)
{
@@ -219,6 +220,23 @@ static const VMStateDescription vmstate_tlb = {
/* MIPS CPU state */
static bool mips_timer_needed(void *opaque)
{
MIPSCPU *cpu = opaque;
return cpu->env.timer != NULL;
}
static const VMStateDescription mips_vmstate_timer = {
.name = "cpu/timer",
.version_id = 1,
.minimum_version_id = 1,
.needed = mips_timer_needed,
.fields = (const VMStateField[]) {
VMSTATE_TIMER_PTR(env.timer, MIPSCPU),
VMSTATE_END_OF_LIST()
}
};
const VMStateDescription vmstate_mips_cpu = {
.name = "cpu",
.version_id = 21,
@@ -333,4 +351,8 @@ const VMStateDescription vmstate_mips_cpu = {
VMSTATE_END_OF_LIST()
},
.subsections = (const VMStateDescription * const []) {
&mips_vmstate_timer,
NULL
}
};