mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'hw-misc-20250902' of https://github.com/philmd/qemu into staging
Misc HW patches - Compile various system files once - Remove SDCard spec v1.10 - Remove mipssim machine and mipsnet device model - Prevent crash in e1000e when legacy interrupt fires after enabling MSI-X - Introduce qemu_init_irq_child() - Remove various memory leaks reported by ASan - Few Coverity fixes - Use 74Kf CPU to run MIPS16e binaries and M14Kc for microMIPS ones # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmi3FDYACgkQ4+MsLN6t # wN7fwA//WqegI1RTs65uHGV2M0vcYtGYTrucLyJtE9lJubb3wVjzdZpNcVVwKFRi # lXNjnOfmA7lIsC2CMRaiFO/hIk40yN2BLoEupSrLXjiygtiwlhG8OX0mU/6o06/k # Q41rEAu0wLVdJDpyUZWnVi1WvjMzaal3RvENRMr5CsrFw/Yk6Z7HKBDMEMuJjOWL # qBTAf8o8pnfliiyeS+OE4r5iIFUHzCtGlQtJH1GZ+zFgR2LNe6UUbofmUnzIFU0j # KuepdXemmd29nEz7wk8a7sjbJmoN9vLdJtsM+zcwNOsxmFC9+1ap/8BAGzRmhrWp # l5zJmL2YbvdHExKLC3qlnhGsKutK+9K4VAB6jLZu0MHfUQBYCGgFgYFcLdlGlRzg # OGgCvx5M7vZekTEHQu3zT29iUOAKAkD7dYlGIPqSUGuPGDZgPOqIMMc1HJAblXB1 # xNATGo2T2D3M01/ugwPAMF2IhLmKa9oAQDKnsW+bG6WJ4rjhqQpbmvxn51JB8q/x # a7xuUJa8BqX24NMo5d6JqPZPQhor0P0J0ws6oKutLf381FQ9JAnVEVmbQqPSijHY # BW3by77G2e97hfK0MwqUi43yuRHmNsh3flCdgCt7Zx6lsqmnMJuuhuOL4jQx6JRR # hPWDFiR+mns12AL3J56A0Y92enoLTawMzrA5M/06my9HLjXuu5M= # =WRLz # -----END PGP SIGNATURE----- # gpg: Signature made Tue 02 Sep 2025 05:58:46 PM CEST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'hw-misc-20250902' of https://github.com/philmd/qemu: (38 commits) hw/i386/pc_piix.c: remove unnecessary if() from pc_init1() hw/arm/boot: Correctly free the MemoryDeviceInfoList docs/about/removed-features: Clarify 'device_add' is removed hw/mips/malta: Include 'system/system.h' hw/mips/loongson3_virt: Include 'system/system.h' hw/isa/superio: Include 'system/system.h' hw/arm/virt: Include 'system/system.h' crypto/hmac: Allow to build hmac over multiple qcrypto_gnutls_hmac_bytes[v] calls hw/sd/sdcard: Refactor sd_bootpart_offset hw/sd/sdcard: Add validation for boot-partition-size hw/net: Remove mipsnet device model hw/mips: Remove mipssim machine hw/display/xlnx_dp: Don't leak dpcd and edid objects hw/misc/xlnx-versal-cframe-reg: Free FIFO, g_tree on deinit hw/char/max78000_uart: Destroy FIFO on deinit hw/gpio/pca9554: Avoid leak in pca9554_set_pin() hw/ide/ich.c: Use qemu_init_irq_child() to avoid memory leak hw/char/serial-pci-multi: Use qemu_init_irq_child() to avoid leak hw/irq: New qemu_init_irq_child() function hw/ppc: Fix build error with CONFIG_POWERNV disabled ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
+1
-6
@@ -1411,12 +1411,6 @@ F: include/hw/southbridge/piix.h
|
||||
F: tests/functional/mips*/test_malta.py
|
||||
F: tests/functional/mips*/test_tuxrun.py
|
||||
|
||||
Mipssim
|
||||
R: Aleksandar Rikalo <arikalo@gmail.com>
|
||||
S: Orphan
|
||||
F: hw/mips/mipssim.c
|
||||
F: hw/net/mipsnet.c
|
||||
|
||||
Fuloong 2E
|
||||
M: Huacai Chen <chenhuacai@kernel.org>
|
||||
M: Philippe Mathieu-Daudé <philmd@linaro.org>
|
||||
@@ -2268,6 +2262,7 @@ F: util/vfio-helpers.c
|
||||
F: include/hw/vfio/
|
||||
F: docs/devel/migration/vfio.rst
|
||||
F: qapi/vfio.json
|
||||
F: migration/vfio-stub.c
|
||||
F: tests/functional/aarch64/test_device_passthrough.py
|
||||
|
||||
vfio-igd
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
|
||||
# Boards are selected by default, uncomment to keep out of the build.
|
||||
# CONFIG_MALTA=n
|
||||
# CONFIG_MIPSSIM=n
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "cpu.h"
|
||||
#include "accel/accel-cpu-ops.h"
|
||||
#include "system/cpus.h"
|
||||
#include "exec/cpu-common.h"
|
||||
@@ -27,10 +26,6 @@
|
||||
#include "hw/core/cpu.h"
|
||||
#include "trace/trace-root.h"
|
||||
|
||||
/* Validate correct placement of CPUArchState. */
|
||||
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0);
|
||||
QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState));
|
||||
|
||||
/* enable or disable single step mode. EXCP_DEBUG is returned by the
|
||||
CPU loop after each instruction */
|
||||
void cpu_single_step(CPUState *cpu, int enabled)
|
||||
|
||||
@@ -121,7 +121,9 @@ qcrypto_gcrypt_hmac_bytesv(QCryptoHmac *hmac,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (*resultlen == 0) {
|
||||
if (resultlen == NULL) {
|
||||
return 0;
|
||||
} else if (*resultlen == 0) {
|
||||
*resultlen = ret;
|
||||
*result = g_new0(uint8_t, *resultlen);
|
||||
} else if (*resultlen != ret) {
|
||||
|
||||
+3
-1
@@ -104,7 +104,9 @@ qcrypto_glib_hmac_bytesv(QCryptoHmac *hmac,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (*resultlen == 0) {
|
||||
if (resultlen == NULL) {
|
||||
return 0;
|
||||
} else if (*resultlen == 0) {
|
||||
*resultlen = ret;
|
||||
*result = g_new0(uint8_t, *resultlen);
|
||||
} else if (*resultlen != ret) {
|
||||
|
||||
@@ -119,7 +119,9 @@ qcrypto_gnutls_hmac_bytesv(QCryptoHmac *hmac,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (*resultlen == 0) {
|
||||
if (resultlen == NULL) {
|
||||
return 0;
|
||||
} else if (*resultlen == 0) {
|
||||
*resultlen = ret;
|
||||
*result = g_new0(uint8_t, *resultlen);
|
||||
} else if (*resultlen != ret) {
|
||||
|
||||
@@ -164,7 +164,9 @@ qcrypto_nettle_hmac_bytesv(QCryptoHmac *hmac,
|
||||
}
|
||||
}
|
||||
|
||||
if (*resultlen == 0) {
|
||||
if (resultlen == NULL) {
|
||||
return 0;
|
||||
} else if (*resultlen == 0) {
|
||||
*resultlen = qcrypto_hmac_alg_map[hmac->alg].len;
|
||||
*result = g_new0(uint8_t, *resultlen);
|
||||
} else if (*resultlen != qcrypto_hmac_alg_map[hmac->alg].len) {
|
||||
|
||||
@@ -313,18 +313,6 @@ and serves as the initial engineering sample rather than a production version.
|
||||
A newer revision, A1, is now supported, and the ``ast2700a1-evb`` should
|
||||
replace the older A0 version.
|
||||
|
||||
Mips ``mipssim`` machine (since 10.0)
|
||||
'''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Linux dropped support for this virtual machine type in kernel v3.7, and
|
||||
there does not seem to be anybody around who is still using this board
|
||||
in QEMU: Most former MIPS-related people are working on other architectures
|
||||
in their everyday job nowadays, and we are also not aware of anybody still
|
||||
using old binaries with this board (i.e. there is also no binary available
|
||||
online to check that this board did not completely bitrot yet). It is
|
||||
recommended to use another MIPS machine for future MIPS code development
|
||||
instead.
|
||||
|
||||
RISC-V default machine option (since 10.0)
|
||||
''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
@@ -434,12 +422,6 @@ recommending to switch to their stable counterparts:
|
||||
- "Zve64f" should be replaced with "zve64f"
|
||||
- "Zve64d" should be replaced with "zve64d"
|
||||
|
||||
``-device sd-card,spec_version=1`` (since 9.1)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
SD physical layer specification v2.00 supersedes the v1.10 one.
|
||||
v2.00 is the default since QEMU 3.0.0.
|
||||
|
||||
Block device options
|
||||
''''''''''''''''''''
|
||||
|
||||
|
||||
@@ -730,8 +730,8 @@ Use ``multifd-channels`` instead.
|
||||
|
||||
Use ``multifd-compression`` instead.
|
||||
|
||||
Incorrectly typed ``device_add`` arguments (since 9.2)
|
||||
''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
Incorrectly typed ``device_add`` arguments (removed in 9.2)
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Due to shortcomings in the internal implementation of ``device_add``,
|
||||
QEMU used to incorrectly accept certain invalid arguments. Any object
|
||||
@@ -1107,6 +1107,11 @@ were added for little endian CPUs. Big endian support was never tested
|
||||
and likely never worked. Starting with QEMU v10.1, the machines are now
|
||||
only available as little-endian machines.
|
||||
|
||||
Mips ``mipssim`` machine (removed in 10.2)
|
||||
''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
Linux dropped support for this virtual machine type in kernel v3.7, and
|
||||
there was also no binary available online to use with that board.
|
||||
|
||||
linux-user mode CPUs
|
||||
--------------------
|
||||
@@ -1186,6 +1191,11 @@ by using ``-machine graphics=off``.
|
||||
|
||||
The 'pvrdma' device and the whole RDMA subsystem have been removed.
|
||||
|
||||
``-device sd-card,spec_version=1`` (since 10.2)
|
||||
'''''''''''''''''''''''''''''''''''''''''''''''
|
||||
|
||||
SD physical layer specification v2.00 supersedes the v1.10 one.
|
||||
|
||||
Related binaries
|
||||
----------------
|
||||
|
||||
|
||||
@@ -446,8 +446,8 @@ Low level memory management
|
||||
===========================
|
||||
|
||||
Use of the ``malloc/free/realloc/calloc/valloc/memalign/posix_memalign``
|
||||
APIs is not allowed in the QEMU codebase. Instead of these routines,
|
||||
use the GLib memory allocation routines
|
||||
or ``alloca/g_alloca/g_newa/g_newa0`` APIs is not allowed in the QEMU codebase.
|
||||
Instead of these routines, use the GLib memory allocation routines
|
||||
``g_malloc/g_malloc0/g_new/g_new0/g_realloc/g_free``
|
||||
or QEMU's ``qemu_memalign/qemu_blockalign/qemu_vfree`` APIs.
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ machine types are emulated:
|
||||
|
||||
- An ACER Pica \"pica61\". This machine needs the 64-bit emulator.
|
||||
|
||||
- MIPS emulator pseudo board \"mipssim\"
|
||||
|
||||
- A MIPS Magnum R4000 machine \"magnum\". This machine needs the
|
||||
64-bit emulator.
|
||||
|
||||
@@ -80,15 +78,6 @@ The Loongson-3 virtual platform emulation supports:
|
||||
|
||||
- Both KVM and TCG supported
|
||||
|
||||
The mipssim pseudo board emulation provides an environment similar to
|
||||
what the proprietary MIPS emulator uses for running Linux. It supports:
|
||||
|
||||
- A range of MIPS CPUs, default is the 24Kf
|
||||
|
||||
- PC style serial port
|
||||
|
||||
- MIPSnet network emulation
|
||||
|
||||
.. include:: cpu-models-mips.rst.inc
|
||||
|
||||
.. _nanoMIPS-System-emulator:
|
||||
|
||||
+1
-1
@@ -549,7 +549,7 @@ int arm_load_dtb(hwaddr addr, const struct arm_boot_info *binfo,
|
||||
unsigned int i;
|
||||
hwaddr mem_base, mem_len;
|
||||
char **node_path;
|
||||
g_autofree MemoryDeviceInfoList *md_list = NULL;
|
||||
g_autoptr(MemoryDeviceInfoList) md_list = NULL;
|
||||
Error *err = NULL;
|
||||
|
||||
if (binfo->dtb_filename) {
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "system/kvm.h"
|
||||
#include "system/hvf.h"
|
||||
#include "system/qtest.h"
|
||||
#include "system/system.h"
|
||||
#include "hw/loader.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/bitops.h"
|
||||
|
||||
@@ -247,6 +247,12 @@ static void max78000_uart_init(Object *obj)
|
||||
sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio);
|
||||
}
|
||||
|
||||
static void max78000_uart_finalize(Object *obj)
|
||||
{
|
||||
Max78000UartState *s = MAX78000_UART(obj);
|
||||
fifo8_destroy(&s->rx_fifo);
|
||||
}
|
||||
|
||||
static void max78000_uart_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
Max78000UartState *s = MAX78000_UART(dev);
|
||||
@@ -274,6 +280,7 @@ static const TypeInfo max78000_uart_info = {
|
||||
.parent = TYPE_SYS_BUS_DEVICE,
|
||||
.instance_size = sizeof(Max78000UartState),
|
||||
.instance_init = max78000_uart_init,
|
||||
.instance_finalize = max78000_uart_finalize,
|
||||
.class_init = max78000_uart_class_init,
|
||||
};
|
||||
|
||||
|
||||
@@ -180,7 +180,8 @@ static void multi_serial_init(Object *o)
|
||||
size_t i, nports = multi_serial_get_port_count(PCI_DEVICE_GET_CLASS(dev));
|
||||
|
||||
for (i = 0; i < nports; i++) {
|
||||
qemu_init_irq(&pms->irqs[i], multi_serial_irq_mux, pms, i);
|
||||
qemu_init_irq_child(o, "irq[*]", &pms->irqs[i],
|
||||
multi_serial_irq_mux, pms, i);
|
||||
object_initialize_child(o, "serial[*]", &pms->state[i], TYPE_SERIAL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,14 @@ void qemu_init_irq(IRQState *irq, qemu_irq_handler handler, void *opaque,
|
||||
init_irq_fields(irq, handler, opaque, n);
|
||||
}
|
||||
|
||||
void qemu_init_irq_child(Object *parent, const char *propname,
|
||||
IRQState *irq, qemu_irq_handler handler,
|
||||
void *opaque, int n)
|
||||
{
|
||||
object_initialize_child(parent, propname, irq, TYPE_IRQ);
|
||||
init_irq_fields(irq, handler, opaque, n);
|
||||
}
|
||||
|
||||
void qemu_init_irqs(IRQState irq[], size_t count,
|
||||
qemu_irq_handler handler, void *opaque)
|
||||
{
|
||||
|
||||
@@ -1267,14 +1267,18 @@ static void xlnx_dp_init(Object *obj)
|
||||
s->aux_bus = aux_bus_init(DEVICE(obj), "aux");
|
||||
|
||||
/*
|
||||
* Initialize DPCD and EDID..
|
||||
* Initialize DPCD and EDID. Once we have added the objects as
|
||||
* child properties of this device, we can drop the reference we
|
||||
* hold to them, leaving the child-property as the only reference.
|
||||
*/
|
||||
s->dpcd = DPCD(qdev_new("dpcd"));
|
||||
object_property_add_child(OBJECT(s), "dpcd", OBJECT(s->dpcd));
|
||||
object_unref(s->dpcd);
|
||||
|
||||
s->edid = I2CDDC(qdev_new("i2c-ddc"));
|
||||
i2c_slave_set_address(I2C_SLAVE(s->edid), 0x50);
|
||||
object_property_add_child(OBJECT(s), "edid", OBJECT(s->edid));
|
||||
object_unref(s->edid);
|
||||
|
||||
fifo8_create(&s->rx_fifo, 16);
|
||||
fifo8_create(&s->tx_fifo, 16);
|
||||
@@ -1311,8 +1315,8 @@ static void xlnx_dp_realize(DeviceState *dev, Error **errp)
|
||||
qdev_realize(DEVICE(s->dpcd), BUS(s->aux_bus), &error_fatal);
|
||||
aux_map_slave(AUX_SLAVE(s->dpcd), 0x0000);
|
||||
|
||||
qdev_realize_and_unref(DEVICE(s->edid), BUS(aux_get_i2c_bus(s->aux_bus)),
|
||||
&error_fatal);
|
||||
qdev_realize(DEVICE(s->edid), BUS(aux_get_i2c_bus(s->aux_bus)),
|
||||
&error_fatal);
|
||||
|
||||
s->console = graphic_console_init(dev, 0, &xlnx_dp_gfx_ops, s);
|
||||
surface = qemu_console_surface(s->console);
|
||||
|
||||
+1
-1
@@ -174,7 +174,7 @@ static void pca9554_set_pin(Object *obj, Visitor *v, const char *name,
|
||||
PCA9554State *s = PCA9554(obj);
|
||||
int pin, rc, val;
|
||||
uint8_t state, mask;
|
||||
char *state_str;
|
||||
g_autofree char *state_str = NULL;
|
||||
|
||||
if (!visit_type_str(v, name, &state_str, errp)) {
|
||||
return;
|
||||
|
||||
+2
-4
@@ -106,7 +106,7 @@ static void pc_init1(MachineState *machine, const char *pci_type)
|
||||
X86MachineState *x86ms = X86_MACHINE(machine);
|
||||
MemoryRegion *system_memory = get_system_memory();
|
||||
MemoryRegion *system_io = get_system_io();
|
||||
Object *phb = NULL;
|
||||
Object *phb;
|
||||
ISABus *isa_bus;
|
||||
Object *piix4_pm = NULL;
|
||||
qemu_irq smi_irq;
|
||||
@@ -284,9 +284,7 @@ static void pc_init1(MachineState *machine, const char *pci_type)
|
||||
pc_i8259_create(isa_bus, gsi_state->i8259_irq);
|
||||
}
|
||||
|
||||
if (phb) {
|
||||
ioapic_init_gsi(gsi_state, phb);
|
||||
}
|
||||
ioapic_init_gsi(gsi_state, phb);
|
||||
|
||||
if (tcg_enabled()) {
|
||||
x86_register_ferr_irq(x86ms->gsi[13]);
|
||||
|
||||
+2
-1
@@ -114,7 +114,8 @@ static void pci_ich9_ahci_init(Object *obj)
|
||||
{
|
||||
AHCIPCIState *d = ICH9_AHCI(obj);
|
||||
|
||||
qemu_init_irq(&d->irq, pci_ich9_ahci_update_irq, d, 0);
|
||||
qemu_init_irq_child(obj, "update-irq", &d->irq,
|
||||
pci_ich9_ahci_update_irq, d, 0);
|
||||
ahci_init(&d->ahci, DEVICE(obj));
|
||||
d->ahci.irq = &d->irq;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user