Misc HW patches

- Re-enable xenpvh machine in qemu-system-arm/aarch64 binaries
 - Correct Xilinx Zynq DMA Devcfg registers range size
 - Correct ACCEL_KERNEL_GSI_IRQFD_POSSIBLE typo
 - Allow for multiple CHR_EVENT_CLOSED events in QTest framework
 - Fix ACMD41 state machine for SD cards in SPI mode
 - Avoid confusing address calculation around eMMC RPMB HMAC
 - Fix a pair of build failures on Solaris (guest-agent and RDMA migration)
 - Correct QOM parent of LASI south bridge
 - Clarify MIPS / PPC 32-bit hosts removal in documentation
 - Prevent further uses of DEVICE_NATIVE_ENDIAN definition
 - Fix Error uses in eBPF
 - Update David Hildenbrand's email address
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkcwjAACgkQ4+MsLN6t
 wN7Wxg//UMbpEgp92clPcGUX1RFHViEYu5DDM96nwjLpOR8nNAJvLZ5+qxDfyZRQ
 qfVGaE0cm5a/rXRMgFAzeJw5ptcSwLJXsUvnRuNLEpKlIAfqInqqk+JTi/r7hJSq
 W8m07IrdtADwoas0OYKur0XwF+k1hqVOENQWPxiLiyViEH2tR8MFA+nrqQhZzgwo
 Emu3ICc01wX+hhY2R51mf+GdVcmr8RACc07lmG7MnMtvQW8vzCkA/VJ5jWWQv6Xj
 ADKBTciYEK/PKD5vbbwMadZfxaWRiH1l+unfpw0qXC46YOAMvpe3+0mRqk7VeSRc
 anqdXQk9dbqw7qwJ+L+RVdUjNf1bLc9LxOePeMOgsNzd8wxlsBia9PDNxvVTRFmh
 /JxLYO9bM4vRojaGOCFoppoF++JSdZzI6WM56hY465L3VCx36V1p2YESX8x/5F1B
 +w/JPV0dUGeq+MFUNKg/pBy9dgRYIGJfcbcp2jwMxyEB5d0np53zXbMaZmqX/cEO
 AjE/haqtpu/yAqSK7oklx1gJEI9gRE0cJp2B/7l/3RwW3fcMsN3HJB3GH8f+3vg2
 VQMYDrAWBF5wA/5HQtsGNrfImlYGHa535KnLujTcNLVwS+2gZ6N6FwfwhM2fwXQh
 +X7nQZbBsAVa0jDqck8zkIarVuISocC10DWfuP5k4hlKxeyg71M=
 =K5DF
 -----END PGP SIGNATURE-----

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

Misc HW patches

- Re-enable xenpvh machine in qemu-system-arm/aarch64 binaries
- Correct Xilinx Zynq DMA Devcfg registers range size
- Correct ACCEL_KERNEL_GSI_IRQFD_POSSIBLE typo
- Allow for multiple CHR_EVENT_CLOSED events in QTest framework
- Fix ACMD41 state machine for SD cards in SPI mode
- Avoid confusing address calculation around eMMC RPMB HMAC
- Fix a pair of build failures on Solaris (guest-agent and RDMA migration)
- Correct QOM parent of LASI south bridge
- Clarify MIPS / PPC 32-bit hosts removal in documentation
- Prevent further uses of DEVICE_NATIVE_ENDIAN definition
- Fix Error uses in eBPF
- Update David Hildenbrand's email address

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmkcwjAACgkQ4+MsLN6t
# wN7Wxg//UMbpEgp92clPcGUX1RFHViEYu5DDM96nwjLpOR8nNAJvLZ5+qxDfyZRQ
# qfVGaE0cm5a/rXRMgFAzeJw5ptcSwLJXsUvnRuNLEpKlIAfqInqqk+JTi/r7hJSq
# W8m07IrdtADwoas0OYKur0XwF+k1hqVOENQWPxiLiyViEH2tR8MFA+nrqQhZzgwo
# Emu3ICc01wX+hhY2R51mf+GdVcmr8RACc07lmG7MnMtvQW8vzCkA/VJ5jWWQv6Xj
# ADKBTciYEK/PKD5vbbwMadZfxaWRiH1l+unfpw0qXC46YOAMvpe3+0mRqk7VeSRc
# anqdXQk9dbqw7qwJ+L+RVdUjNf1bLc9LxOePeMOgsNzd8wxlsBia9PDNxvVTRFmh
# /JxLYO9bM4vRojaGOCFoppoF++JSdZzI6WM56hY465L3VCx36V1p2YESX8x/5F1B
# +w/JPV0dUGeq+MFUNKg/pBy9dgRYIGJfcbcp2jwMxyEB5d0np53zXbMaZmqX/cEO
# AjE/haqtpu/yAqSK7oklx1gJEI9gRE0cJp2B/7l/3RwW3fcMsN3HJB3GH8f+3vg2
# VQMYDrAWBF5wA/5HQtsGNrfImlYGHa535KnLujTcNLVwS+2gZ6N6FwfwhM2fwXQh
# +X7nQZbBsAVa0jDqck8zkIarVuISocC10DWfuP5k4hlKxeyg71M=
# =K5DF
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 18 Nov 2025 08:00:00 PM CET
# 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-20251118' of https://github.com/philmd/qemu:
  ebpf: Make ebpf_rss_load() return value consistent with @errp
  ebpf: Clean up useless error check in ebpf_rss_set_all()
  ebpf: Fix stubs to set an error when they return failure
  scripts/checkpatch: Check DEVICE_NATIVE_ENDIAN
  docs: Mention 32-bit PPC host as removed
  docs: Correct release of MIPS deprecations / removals
  migration/rdma: Check ntohll() availability with meson
  buildsys: Remove dead 'mips' entry in supported_cpus[] array
  hw/southbridge/lasi: Correct LasiState parent
  qga/commands: Include proper Solaris header for getloadavg()
  hw/sd/sdcard: Avoid confusing address calculation in rpmb_calc_hmac
  hw/arm: Re-enable xenpvh machine in qemu-system-arm/aarch64 binaries
  hw/dma/zynq-devcfg: Fix register memory
  hw/sd: Fix ACMD41 state machine in SPI mode
  hw/sd: Fix incorrect idle state reporting in R1 response for SPI mode
  system/qtest.c: Allow for multiple CHR_EVENT_CLOSED events
  hw/intc/ioapic: Fix ACCEL_KERNEL_GSI_IRQFD_POSSIBLE typo
  MAINTAINERS: Update David Hildenbrand's email address

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-11-19 07:38:43 +01:00
commit 5e0242e9a8
17 changed files with 64 additions and 45 deletions

View file

@ -82,6 +82,7 @@ Brian Cain <brian.cain@oss.qualcomm.com> <bcain@quicinc.com>
Brian Cain <brian.cain@oss.qualcomm.com> <quic_bcain@quicinc.com>
Christian Borntraeger <borntraeger@linux.ibm.com> <borntraeger@de.ibm.com>
Damien Hedde <damien.hedde@dahe.fr> <damien.hedde@greensocs.com>
David Hildenbrand <david@kernel.org> <david@redhat.com>
Filip Bozuta <filip.bozuta@syrmia.com> <filip.bozuta@rt-rk.com.com>
Frederic Konrad <konrad.frederic@yahoo.fr> <fred.konrad@greensocs.com>
Frederic Konrad <konrad.frederic@yahoo.fr> <konrad@adacore.com>

View file

@ -364,7 +364,7 @@ F: target/rx/
S390 TCG CPUs
M: Richard Henderson <richard.henderson@linaro.org>
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
R: Ilya Leoshkevich <iii@linux.ibm.com>
S: Maintained
F: target/s390x/
@ -1862,7 +1862,7 @@ F: target/s390x/ioinst.c
L: qemu-s390x@nongnu.org
S390 CPU models
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
S: Maintained
F: target/s390x/cpu_features*.[ch]
F: target/s390x/cpu_models.[ch]
@ -2384,7 +2384,7 @@ F: tests/functional/x86_64/test_virtio_version.py
virtio-balloon
M: Michael S. Tsirkin <mst@redhat.com>
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
S: Maintained
F: docs/interop/virtio-balloon-stats.rst
F: hw/virtio/virtio-balloon*.c
@ -2532,7 +2532,7 @@ F: hw/virtio/virtio-crypto-pci.c
F: include/hw/virtio/virtio-crypto.h
virtio based memory device
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
S: Supported
F: hw/s390x/virtio-ccw-md.c
F: hw/s390x/virtio-ccw-md.h
@ -2541,7 +2541,7 @@ F: hw/virtio/virtio-md-*.c
F: include/hw/virtio/virtio-md-pci.h
virtio-mem
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
S: Supported
W: https://virtio-mem.gitlab.io/
F: hw/virtio/virtio-mem.c
@ -2919,7 +2919,7 @@ L: qemu-s390x@nongnu.org
S390 floating interrupt controller
M: Halil Pasic <pasic@linux.ibm.com>
M: Christian Borntraeger <borntraeger@linux.ibm.com>
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
R: Jason Herne <jjherne@linux.ibm.com>
S: Supported
F: hw/intc/s390_flic*.c
@ -3248,7 +3248,7 @@ T: git https://gitlab.com/stsquad/qemu gdbstub/next
Memory API
M: Paolo Bonzini <pbonzini@redhat.com>
M: Peter Xu <peterx@redhat.com>
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
R: Philippe Mathieu-Daudé <philmd@linaro.org>
S: Supported
F: include/system/ioport.h
@ -3268,7 +3268,7 @@ F: system/ram-block-attributes.c
F: scripts/coccinelle/memory-region-housekeeping.cocci
Memory devices
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
M: Igor Mammedov <imammedo@redhat.com>
R: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
S: Supported
@ -3371,7 +3371,7 @@ R: Ilya Maximets <i.maximets@ovn.org>
F: net/af-xdp.c
Host Memory Backends
M: David Hildenbrand <david@redhat.com>
M: David Hildenbrand <david@kernel.org>
M: Igor Mammedov <imammedo@redhat.com>
S: Maintained
F: backends/hostmem*.c

View file

@ -192,7 +192,7 @@ The ``info capture`` command is deprecated and will be removed in a future relea
Host Architectures
------------------
MIPS (since 11.0)
MIPS (since 10.2)
'''''''''''''''''
MIPS is not supported by Debian 13 ("Trixie") and newer, making it hard to

View file

@ -896,12 +896,17 @@ work around the atomicity issues in system mode by running all vCPUs
in a single thread context; in user mode atomicity was simply broken.
From 10.0, QEMU has disabled configuration of 64-bit guests on 32-bit hosts.
32-bit MIPS (since 11.0)
32-bit MIPS (since 10.2)
''''''''''''''''''''''''
Debian 12 "Bookworm" removed support for 32-bit MIPS, making it hard to
maintain our cross-compilation CI tests of the architecture.
32-bit PPC (since 10.2)
'''''''''''''''''''''''
The QEMU project no longer supports 32-bit host builds.
Guest Emulator ISAs
-------------------

View file

@ -25,6 +25,7 @@ bool ebpf_rss_is_loaded(struct EBPFRSSContext *ctx)
bool ebpf_rss_load(struct EBPFRSSContext *ctx, Error **errp)
{
error_setg(errp, "eBPF support is not compiled in");
return false;
}
@ -32,6 +33,7 @@ bool ebpf_rss_load_fds(struct EBPFRSSContext *ctx, int program_fd,
int config_fd, int toeplitz_fd, int table_fd,
Error **errp)
{
error_setg(errp, "eBPF support is not compiled in");
return false;
}
@ -39,7 +41,7 @@ bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
uint16_t *indirections_table, uint8_t *toeplitz_key,
Error **errp)
{
return false;
abort();
}
void ebpf_rss_unload(struct EBPFRSSContext *ctx)

View file

@ -106,9 +106,7 @@ bool ebpf_rss_load(struct EBPFRSSContext *ctx, Error **errp)
{
struct rss_bpf *rss_bpf_ctx;
if (ebpf_rss_is_loaded(ctx)) {
return false;
}
g_assert(!ebpf_rss_is_loaded(ctx));
rss_bpf_ctx = rss_bpf__open();
if (rss_bpf_ctx == NULL) {
@ -247,10 +245,8 @@ bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
uint16_t *indirections_table, uint8_t *toeplitz_key,
Error **errp)
{
if (!ebpf_rss_is_loaded(ctx)) {
error_setg(errp, "eBPF program is not loaded");
return false;
}
g_assert(ebpf_rss_is_loaded(ctx));
if (config == NULL) {
error_setg(errp, "eBPF config table is NULL");
return false;

View file

@ -10,6 +10,7 @@
#include "hw/boards.h"
#include "system/system.h"
#include "hw/xen/xen-pvh-common.h"
#include "hw/arm/machines-qom.h"
#define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh")
@ -95,6 +96,7 @@ static const TypeInfo xen_arm_machine_type = {
.class_init = xen_arm_machine_class_init,
.instance_size = sizeof(XenPVHMachineState),
.instance_init = xen_arm_instance_init,
.interfaces = arm_aarch64_machine_interfaces,
};
static void xen_arm_machine_register_types(void)

View file

@ -372,7 +372,7 @@ static void xlnx_zynq_devcfg_init(Object *obj)
s->regs_info, s->regs,
&xlnx_zynq_devcfg_reg_ops,
XLNX_ZYNQ_DEVCFG_ERR_DEBUG,
XLNX_ZYNQ_DEVCFG_R_MAX);
XLNX_ZYNQ_DEVCFG_R_MAX * 4);
memory_region_add_subregion(&s->iomem,
A_CTRL,
&reg_array->mem);

View file

@ -216,7 +216,7 @@ static void ioapic_update_kvm_routes(IOAPICCommonState *s)
#endif
}
#ifdef ACCEL_KERNEL_GSI_IRQFD_POSSIBLE
#ifdef ACCEL_GSI_IRQFD_POSSIBLE
static void ioapic_iec_notifier(void *private, bool global,
uint32_t index, uint32_t mask)
{
@ -434,7 +434,7 @@ static const MemoryRegionOps ioapic_io_ops = {
static void ioapic_machine_done_notify(Notifier *notifier, void *data)
{
#ifdef ACCEL_KERNEL_GSI_IRQFD_POSSIBLE
#ifdef ACCEL_GSI_IRQFD_POSSIBLE
IOAPICCommonState *s = container_of(notifier, IOAPICCommonState,
machine_done);

View file

@ -1363,9 +1363,7 @@ static bool virtio_net_load_ebpf(VirtIONet *n, Error **errp)
return virtio_net_load_ebpf_fds(n, errp);
}
ebpf_rss_load(&n->ebpf_rss, &err);
/* Beware, ebpf_rss_load() can return false with @err unset */
if (err) {
if (!ebpf_rss_load(&n->ebpf_rss, &err)) {
warn_report_err(err);
}
return true;

View file

@ -789,8 +789,7 @@ static size_t sd_response_size(SDState *sd, sd_rsp_type_t rtype)
static void sd_response_r1_make(SDState *sd, uint8_t *response)
{
if (sd_is_spi(sd)) {
response[0] = sd->state == sd_idle_state
&& !FIELD_EX32(sd->ocr, OCR, CARD_POWER_UP);
response[0] = sd->state == sd_idle_state;
response[0] |= FIELD_EX32(sd->card_status, CSR, ERASE_RESET) << 1;
response[0] |= FIELD_EX32(sd->card_status, CSR, ILLEGAL_COMMAND) << 2;
response[0] |= FIELD_EX32(sd->card_status, CSR, COM_CRC_ERROR) << 3;
@ -1161,8 +1160,13 @@ static bool rpmb_calc_hmac(SDState *sd, const RPMBDataFrame *frame,
assert(RPMB_HASH_LEN <= sizeof(sd->data));
memcpy((uint8_t *)buf + RPMB_DATA_LEN, &frame->data[RPMB_DATA_LEN],
/*
* We will hash everything from data field to the end of RPMBDataFrame.
*/
memcpy((uint8_t *)buf + RPMB_DATA_LEN,
(uint8_t *)frame + offsetof(RPMBDataFrame, nonce),
RPMB_HASH_LEN - RPMB_DATA_LEN);
offset = lduw_be_p(&frame->address) * RPMB_DATA_LEN + sd_part_offset(sd);
do {
if (blk_pread(sd->blk, offset, RPMB_DATA_LEN, buf, 0) < 0) {
@ -2290,20 +2294,21 @@ static sd_rsp_type_t sd_cmd_SEND_OP_COND(SDState *sd, SDRequest req)
}
}
if (FIELD_EX32(sd->ocr & req.arg, OCR, VDD_VOLTAGE_WINDOW)) {
/*
* We accept any voltage. 10000 V is nothing.
*
* Once we're powered up, we advance straight to ready state
* unless it's an enquiry ACMD41 (bits 23:0 == 0).
*/
sd->state = sd_ready_state;
}
if (sd_is_spi(sd)) {
sd->state = sd_ready_state;
return sd_r1;
} else {
if (FIELD_EX32(sd->ocr & req.arg, OCR, VDD_VOLTAGE_WINDOW)) {
/*
* We accept any voltage. 10000 V is nothing.
*
* Once we're powered up, we advance straight to ready state
* unless it's an enquiry ACMD41 (bits 23:0 == 0).
*/
sd->state = sd_ready_state;
}
return sd_r3;
}
return sd_r3;
}
/* ACMD42 */

View file

@ -13,8 +13,8 @@
#define LASI_H
#include "system/address-spaces.h"
#include "hw/pci/pci_host.h"
#include "hw/boards.h"
#include "hw/sysbus.h"
#define TYPE_LASI_CHIP "lasi-chip"
OBJECT_DECLARE_SIMPLE_TYPE(LasiState, LASI_CHIP)
@ -63,7 +63,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(LasiState, LASI_CHIP)
#define LASI_IRQ_PS2MOU_HPA 26
struct LasiState {
PCIHostState parent_obj;
SysBusDevice parent_obj;
uint32_t irr;
uint32_t imr;

View file

@ -52,7 +52,7 @@ qapi_trace_events = []
bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux', 'emscripten']
supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64',
'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64', 'wasm32']
'arm', 'aarch64', 'loongarch64', 'mips64', 'sparc64', 'wasm32']
cpu = host_machine.cpu_family()
@ -2663,6 +2663,7 @@ config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs'))
config_host_data.set('CONFIG_SYNC_FILE_RANGE', cc.has_function('sync_file_range'))
config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
config_host_data.set('CONFIG_GETLOADAVG', cc.has_function('getloadavg'))
config_host_data.set('CONFIG_ARPA_INET_64', cc.has_function('htonll'))
config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_range'))
config_host_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
config_host_data.set('HAVE_GLIB_WITH_SLICE_ALLOCATOR', glib_has_gslice)

View file

@ -238,7 +238,7 @@ static const char *control_desc(unsigned int rdma_control)
return strs[rdma_control];
}
#if !defined(htonll)
#if !defined(CONFIG_ARPA_INET_64)
static uint64_t htonll(uint64_t v)
{
union { uint32_t lv[2]; uint64_t llv; } u;
@ -246,9 +246,7 @@ static uint64_t htonll(uint64_t v)
u.lv[1] = htonl(v & 0xFFFFFFFFULL);
return u.llv;
}
#endif
#if !defined(ntohll)
static uint64_t ntohll(uint64_t v)
{
union { uint32_t lv[2]; uint64_t llv; } u;

View file

@ -43,6 +43,9 @@
#include <net/ethernet.h>
#endif
#ifdef CONFIG_SOLARIS
#ifdef CONFIG_GETLOADAVG
#include <sys/loadavg.h>
#endif
#include <sys/sockio.h>
#endif
#endif

View file

@ -3200,6 +3200,10 @@ sub process {
if ($realfile =~ /.*\/hw\/.*/ && $line =~ /\baio_bh_new\s*\(/) {
ERROR("use aio_bh_new_guarded() instead of aio_bh_new() to avoid reentrancy problems\n" . $herecurr);
}
# check for DEVICE_NATIVE_ENDIAN, use explicit endianness instead
if ($line =~ /\bDEVICE_NATIVE_ENDIAN\b/) {
ERROR("DEVICE_NATIVE_ENDIAN is not allowed, use DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN instead\n" . $herecurr);
}
# check for module_init(), use category-specific init macros explicitly please
if ($line =~ /^module_init\s*\(/) {
ERROR("please use block_init(), type_init() etc. instead of module_init()\n" . $herecurr);

View file

@ -808,6 +808,10 @@ static void qtest_event(void *opaque, QEMUChrEvent event)
}
break;
case CHR_EVENT_CLOSED:
if (!qtest_opened) {
/* Ignore CLOSED events if we have already closed the log */
break;
}
qtest_opened = false;
if (qtest_log_fp) {
fprintf(qtest_log_fp, "[I +" FMT_timeval "] CLOSED\n", g_timer_elapsed(timer, NULL));