diff --git a/.mailmap b/.mailmap index 7f817d9f42..0690f7be34 100644 --- a/.mailmap +++ b/.mailmap @@ -82,6 +82,7 @@ Brian Cain Brian Cain Christian Borntraeger Damien Hedde +David Hildenbrand Filip Bozuta Frederic Konrad Frederic Konrad diff --git a/MAINTAINERS b/MAINTAINERS index 38325e0617..d1c5080e50 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -364,7 +364,7 @@ F: target/rx/ S390 TCG CPUs M: Richard Henderson -M: David Hildenbrand +M: David Hildenbrand R: Ilya Leoshkevich 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 +M: David Hildenbrand 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 -M: David Hildenbrand +M: David Hildenbrand 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 +M: David Hildenbrand 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 +M: David Hildenbrand 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 M: Christian Borntraeger -M: David Hildenbrand +M: David Hildenbrand R: Jason Herne 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 M: Peter Xu -M: David Hildenbrand +M: David Hildenbrand R: Philippe Mathieu-Daudé 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 +M: David Hildenbrand M: Igor Mammedov R: Xiao Guangrong S: Supported @@ -3371,7 +3371,7 @@ R: Ilya Maximets F: net/af-xdp.c Host Memory Backends -M: David Hildenbrand +M: David Hildenbrand M: Igor Mammedov S: Maintained F: backends/hostmem*.c diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 03e29915f0..30ab72b2a4 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -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 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 88ea0dc4ed..422b9c98d3 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -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 ------------------- diff --git a/ebpf/ebpf_rss-stub.c b/ebpf/ebpf_rss-stub.c index d0e7f99fb9..11729f3d8f 100644 --- a/ebpf/ebpf_rss-stub.c +++ b/ebpf/ebpf_rss-stub.c @@ -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) diff --git a/ebpf/ebpf_rss.c b/ebpf/ebpf_rss.c index e793786c17..926392b3c5 100644 --- a/ebpf/ebpf_rss.c +++ b/ebpf/ebpf_rss.c @@ -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; diff --git a/hw/arm/xen-pvh.c b/hw/arm/xen-pvh.c index 1a9eeb01c8..86a0296616 100644 --- a/hw/arm/xen-pvh.c +++ b/hw/arm/xen-pvh.c @@ -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) diff --git a/hw/dma/xlnx-zynq-devcfg.c b/hw/dma/xlnx-zynq-devcfg.c index 26845713ee..8141d46033 100644 --- a/hw/dma/xlnx-zynq-devcfg.c +++ b/hw/dma/xlnx-zynq-devcfg.c @@ -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, ®_array->mem); diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index e431d00311..38e4384648 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -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); diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3b85560f6f..f5d93eb400 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -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; diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 9c86c016cc..40a75a43ff 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -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 */ diff --git a/include/hw/misc/lasi.h b/include/hw/misc/lasi.h index 04312d0b58..0e95be1c32 100644 --- a/include/hw/misc/lasi.h +++ b/include/hw/misc/lasi.h @@ -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; diff --git a/meson.build b/meson.build index df4460035c..81f9f7b328 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/migration/rdma.c b/migration/rdma.c index 2d839fce6c..337b415889 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -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; diff --git a/qga/commands-posix.c b/qga/commands-posix.c index c7059857e4..66f3e6f673 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -43,6 +43,9 @@ #include #endif #ifdef CONFIG_SOLARIS +#ifdef CONFIG_GETLOADAVG +#include +#endif #include #endif #endif diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d0f4537f25..3a9557417f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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); diff --git a/system/qtest.c b/system/qtest.c index e4d1cd75da..cbeb7f3772 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -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));