From 56aff4d012f4142db5012452ad1ed310479ec9dd Mon Sep 17 00:00:00 2001 From: build Date: Mon, 16 Jun 2025 15:07:27 +0800 Subject: [PATCH] Sync upstream changes --- 0355-smbios-add-processor-family-option.patch | 108 ++++++++++ ...tion-to-set-default-processor-family.patch | 49 +++++ ...bios-support-for-risc-v-virt-machine.patch | 107 ++++++++++ ...tions-enable-smbios-option-on-risc-v.patch | 34 ++++ ...definition-to-conditionalize-debug-s.patch | 185 ++++++++++++++++++ qemu.spec | 10 +- 6 files changed, 492 insertions(+), 1 deletion(-) create mode 100644 0355-smbios-add-processor-family-option.patch create mode 100644 0356-smbios-function-to-set-default-processor-family.patch create mode 100644 0357-target-riscv-smbios-support-for-risc-v-virt-machine.patch create mode 100644 0358-qemu-options-enable-smbios-option-on-risc-v.patch create mode 100644 0359-kvm-use-configs-definition-to-conditionalize-debug-s.patch diff --git a/0355-smbios-add-processor-family-option.patch b/0355-smbios-add-processor-family-option.patch new file mode 100644 index 0000000..9a1e378 --- /dev/null +++ b/0355-smbios-add-processor-family-option.patch @@ -0,0 +1,108 @@ +From cf786e61311730e171cc29d9b39c9826619ecdbf Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Tue, 23 Jan 2024 19:42:26 +0100 +Subject: [PATCH] smbios: add processor-family option + +For RISC-V the SMBIOS standard requires specific values of the processor +family value depending on the bitness of the CPU. + +Add a processor-family option for SMBIOS table 4. + +The value of processor-family may exceed 255 and therefore must be provided +in the Processor Family 2 field. Set the Processor Family field to 0xFE +which signals that the Processor Family 2 is used. + +Signed-off-by: Heinrich Schuchardt +Reviewed-by: Alistair Francis +Reviewed-by: Andrew Jones +Message-ID: <20240123184229.10415-2-heinrich.schuchardt@canonical.com> +Signed-off-by: Alistair Francis +--- + hw/smbios/smbios.c | 13 +++++++++++-- + qemu-options.hx | 4 ++-- + 2 files changed, 13 insertions(+), 4 deletions(-) + +diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c +index 8a44d3f271..232f3bdde2 100644 +--- a/hw/smbios/smbios.c ++++ b/hw/smbios/smbios.c +@@ -102,6 +102,7 @@ static struct { + #define DEFAULT_CPU_SPEED 2000 + + static struct { ++ uint16_t processor_family; + const char *sock_pfx, *manufacturer, *version, *serial, *asset, *part; + uint64_t max_speed; + uint64_t current_speed; +@@ -110,6 +111,7 @@ static struct { + .max_speed = DEFAULT_CPU_SPEED, + .current_speed = DEFAULT_CPU_SPEED, + .processor_id = 0, ++ .processor_family = 0x01, /* Other */ + }; + + struct type8_instance { +@@ -337,6 +339,10 @@ static const QemuOptDesc qemu_smbios_type4_opts[] = { + .name = "part", + .type = QEMU_OPT_STRING, + .help = "part number", ++ }, { ++ .name = "processor-family", ++ .type = QEMU_OPT_NUMBER, ++ .help = "processor family", + }, { + .name = "processor-id", + .type = QEMU_OPT_NUMBER, +@@ -738,7 +744,7 @@ static void smbios_build_type_4_table(MachineState *ms, unsigned instance) + snprintf(sock_str, sizeof(sock_str), "%s%2x", type4.sock_pfx, instance); + SMBIOS_TABLE_SET_STR(4, socket_designation_str, sock_str); + t->processor_type = 0x03; /* CPU */ +- t->processor_family = 0x01; /* Other */ ++ t->processor_family = 0xfe; /* use Processor Family 2 field */ + SMBIOS_TABLE_SET_STR(4, processor_manufacturer_str, type4.manufacturer); + if (type4.processor_id == 0) { + t->processor_id[0] = cpu_to_le32(smbios_cpuid_version); +@@ -770,7 +776,7 @@ static void smbios_build_type_4_table(MachineState *ms, unsigned instance) + t->thread_count = (threads_per_socket > 255) ? 0xFF : threads_per_socket; + + t->processor_characteristics = cpu_to_le16(0x02); /* Unknown */ +- t->processor_family2 = cpu_to_le16(0x01); /* Other */ ++ t->processor_family2 = cpu_to_le16(type4.processor_family); + + if (tbl_len == SMBIOS_TYPE_4_LEN_V30) { + t->core_count2 = t->core_enabled2 = cpu_to_le16(cores_per_socket); +@@ -1414,6 +1420,9 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) + return; + } + save_opt(&type4.sock_pfx, opts, "sock_pfx"); ++ type4.processor_family = qemu_opt_get_number(opts, ++ "processor-family", ++ 0x01 /* Other */); + save_opt(&type4.manufacturer, opts, "manufacturer"); + save_opt(&type4.version, opts, "version"); + save_opt(&type4.serial, opts, "serial"); +diff --git a/qemu-options.hx b/qemu-options.hx +index bffb9f31a8..6203be7294 100644 +--- a/qemu-options.hx ++++ b/qemu-options.hx +@@ -2679,7 +2679,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios, + " specify SMBIOS type 3 fields\n" + "-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]\n" + " [,asset=str][,part=str][,max-speed=%d][,current-speed=%d]\n" +- " [,processor-id=%d]\n" ++ " [,processor-family=%d,processor-id=%d]\n" + " specify SMBIOS type 4 fields\n" + "-smbios type=8[,external_reference=str][,internal_reference=str][,connector_type=%d][,port_type=%d]\n" + " specify SMBIOS type 8 fields\n" +@@ -2707,7 +2707,7 @@ SRST + ``-smbios type=3[,manufacturer=str][,version=str][,serial=str][,asset=str][,sku=str]`` + Specify SMBIOS type 3 fields + +-``-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str][,asset=str][,part=str][,processor-id=%d]`` ++``-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str][,asset=str][,part=str][,processor-family=%d][,processor-id=%d]`` + Specify SMBIOS type 4 fields + + ``-smbios type=11[,value=str][,path=filename]`` +-- +2.43.0 + diff --git a/0356-smbios-function-to-set-default-processor-family.patch b/0356-smbios-function-to-set-default-processor-family.patch new file mode 100644 index 0000000..e6924b5 --- /dev/null +++ b/0356-smbios-function-to-set-default-processor-family.patch @@ -0,0 +1,49 @@ +From 4dfa8e169a2dd17b1eb838f2de2599456fd8712b Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Tue, 23 Jan 2024 19:42:27 +0100 +Subject: [PATCH] smbios: function to set default processor family + +Provide a function to set the default processor family. + +Signed-off-by: Heinrich Schuchardt +Reviewed-by: Andrew Jones +Message-ID: <20240123184229.10415-3-heinrich.schuchardt@canonical.com> +Signed-off-by: Alistair Francis +--- + hw/smbios/smbios.c | 7 +++++++ + include/hw/firmware/smbios.h | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c +index 232f3bdde2..a3c4e52ce9 100644 +--- a/hw/smbios/smbios.c ++++ b/hw/smbios/smbios.c +@@ -1001,6 +1001,13 @@ void smbios_set_cpuid(uint32_t version, uint32_t features) + field = value; \ + } + ++void smbios_set_default_processor_family(uint16_t processor_family) ++{ ++ if (type4.processor_family <= 0x01) { ++ type4.processor_family = processor_family; ++ } ++} ++ + void smbios_set_defaults(const char *manufacturer, const char *product, + const char *version, bool legacy_mode, + bool uuid_encoded, SmbiosEntryPointType ep_type) +diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h +index 7f3259a630..6e514982d4 100644 +--- a/include/hw/firmware/smbios.h ++++ b/include/hw/firmware/smbios.h +@@ -295,6 +295,7 @@ void smbios_set_cpuid(uint32_t version, uint32_t features); + void smbios_set_defaults(const char *manufacturer, const char *product, + const char *version, bool legacy_mode, + bool uuid_encoded, SmbiosEntryPointType ep_type); ++void smbios_set_default_processor_family(uint16_t processor_family); + uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length); + void smbios_get_tables(MachineState *ms, + const struct smbios_phys_mem_area *mem_array, +-- +2.43.0 + diff --git a/0357-target-riscv-smbios-support-for-risc-v-virt-machine.patch b/0357-target-riscv-smbios-support-for-risc-v-virt-machine.patch new file mode 100644 index 0000000..d8cb197 --- /dev/null +++ b/0357-target-riscv-smbios-support-for-risc-v-virt-machine.patch @@ -0,0 +1,107 @@ +From c5917c0cf4ea07fd23134ab40d67d423d5173e17 Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Tue, 23 Jan 2024 19:42:28 +0100 +Subject: [PATCH] target/riscv: SMBIOS support for RISC-V virt machine + +Generate SMBIOS tables for the RISC-V mach-virt. +Add CONFIG_SMBIOS=y to the RISC-V default config. +Set the default processor family in the type 4 table. + +The implementation is based on the corresponding ARM and Loongson code. + +With the patch the following firmware tables are provided: + + etc/smbios/smbios-anchor + etc/smbios/smbios-tables + +Signed-off-by: Heinrich Schuchardt +Reviewed-by: Andrew Jones +Message-ID: <20240123184229.10415-4-heinrich.schuchardt@canonical.com> +Signed-off-by: Alistair Francis +--- + hw/riscv/Kconfig | 1 + + hw/riscv/virt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 43 insertions(+) + +diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig +index b6a5eb4452..1e11ac9432 100644 +--- a/hw/riscv/Kconfig ++++ b/hw/riscv/Kconfig +@@ -41,6 +41,7 @@ config RISCV_VIRT + select RISCV_IMSIC + select SIFIVE_PLIC + select SIFIVE_TEST ++ select SMBIOS + select VIRTIO_MMIO + select FW_CFG_DMA + select PLATFORM_BUS +diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c +index d2eac24156..9b29ed1108 100644 +--- a/hw/riscv/virt.c ++++ b/hw/riscv/virt.c +@@ -36,6 +36,7 @@ + #include "hw/riscv/boot.h" + #include "hw/riscv/numa.h" + #include "kvm/kvm_riscv.h" ++#include "hw/firmware/smbios.h" + #include "hw/intc/riscv_aclint.h" + #include "hw/intc/riscv_aplic.h" + #include "hw/intc/riscv_imsic.h" +@@ -1249,6 +1250,45 @@ static void create_platform_bus(RISCVVirtState *s, DeviceState *irqchip) + sysbus_mmio_get_region(sysbus, 0)); + } + ++static void virt_build_smbios(RISCVVirtState *s) ++{ ++ MachineClass *mc = MACHINE_GET_CLASS(s); ++ MachineState *ms = MACHINE(s); ++ uint8_t *smbios_tables, *smbios_anchor; ++ size_t smbios_tables_len, smbios_anchor_len; ++ struct smbios_phys_mem_area mem_array; ++ const char *product = "QEMU Virtual Machine"; ++ ++ if (kvm_enabled()) { ++ product = "KVM Virtual Machine"; ++ } ++ ++ smbios_set_defaults("QEMU", product, mc->name, false, ++ true, SMBIOS_ENTRY_POINT_TYPE_64); ++ ++ if (riscv_is_32bit(&s->soc[0])) { ++ smbios_set_default_processor_family(0x200); ++ } else { ++ smbios_set_default_processor_family(0x201); ++ } ++ ++ /* build the array of physical mem area from base_memmap */ ++ mem_array.address = s->memmap[VIRT_DRAM].base; ++ mem_array.length = ms->ram_size; ++ ++ smbios_get_tables(ms, &mem_array, 1, ++ &smbios_tables, &smbios_tables_len, ++ &smbios_anchor, &smbios_anchor_len, ++ &error_fatal); ++ ++ if (smbios_anchor) { ++ fw_cfg_add_file(s->fw_cfg, "etc/smbios/smbios-tables", ++ smbios_tables, smbios_tables_len); ++ fw_cfg_add_file(s->fw_cfg, "etc/smbios/smbios-anchor", ++ smbios_anchor, smbios_anchor_len); ++ } ++} ++ + static void virt_machine_done(Notifier *notifier, void *data) + { + RISCVVirtState *s = container_of(notifier, RISCVVirtState, +@@ -1337,6 +1377,8 @@ static void virt_machine_done(Notifier *notifier, void *data) + riscv_setup_direct_kernel(kernel_entry, fdt_load_addr); + } + ++ virt_build_smbios(s); ++ + if (virt_is_acpi_enabled(s)) { + virt_acpi_setup(s); + } +-- +2.43.0 + diff --git a/0358-qemu-options-enable-smbios-option-on-risc-v.patch b/0358-qemu-options-enable-smbios-option-on-risc-v.patch new file mode 100644 index 0000000..7496c62 --- /dev/null +++ b/0358-qemu-options-enable-smbios-option-on-risc-v.patch @@ -0,0 +1,34 @@ +From c8a70d1875b572cf746ed0d09e155df28d2ece45 Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Tue, 23 Jan 2024 19:42:29 +0100 +Subject: [PATCH] qemu-options: enable -smbios option on RISC-V + +With SMBIOS support added for RISC-V we also should enable the command line +option. + +Signed-off-by: Heinrich Schuchardt +Reviewed-by: Daniel Henrique Barboza +Acked-by: Alistair Francis +Reviewed-by: Andrew Jones +Message-ID: <20240123184229.10415-5-heinrich.schuchardt@canonical.com> +Signed-off-by: Alistair Francis +--- + qemu-options.hx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/qemu-options.hx b/qemu-options.hx +index 6203be7294..e6a7fe35ef 100644 +--- a/qemu-options.hx ++++ b/qemu-options.hx +@@ -2690,7 +2690,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios, + " specify SMBIOS type 17 fields\n" + "-smbios type=41[,designation=str][,kind=str][,instance=%d][,pcidev=str]\n" + " specify SMBIOS type 41 fields\n", +- QEMU_ARCH_I386 | QEMU_ARCH_ARM | QEMU_ARCH_LOONGARCH | QEMU_ARCH_SW64) ++ QEMU_ARCH_I386 | QEMU_ARCH_ARM | QEMU_ARCH_LOONGARCH | QEMU_ARCH_SW64 | QEMU_ARCH_RISCV) + SRST + ``-smbios file=binary`` + Load SMBIOS entry from binary file. +-- +2.43.0 + diff --git a/0359-kvm-use-configs-definition-to-conditionalize-debug-s.patch b/0359-kvm-use-configs-definition-to-conditionalize-debug-s.patch new file mode 100644 index 0000000..9759cbb --- /dev/null +++ b/0359-kvm-use-configs-definition-to-conditionalize-debug-s.patch @@ -0,0 +1,185 @@ +From cab0a521311a9ca334fc2b97d560c68cb6759c78 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Fri, 22 Mar 2024 19:29:07 +0100 +Subject: [PATCH] kvm: use configs/ definition to conditionalize debug support + +If an architecture adds support for KVM_CAP_SET_GUEST_DEBUG but QEMU does not +have the necessary code, QEMU will fail to build after updating kernel headers. +Avoid this by using a #define in config-target.h instead of KVM_CAP_SET_GUEST_DEBUG. + +Signed-off-by: Paolo Bonzini +--- + accel/kvm/kvm-accel-ops.c | 4 ++-- + accel/kvm/kvm-all.c | 10 +++++----- + configs/targets/aarch64-softmmu.mak | 1 + + configs/targets/i386-softmmu.mak | 1 + + configs/targets/ppc-softmmu.mak | 1 + + configs/targets/ppc64-softmmu.mak | 1 + + configs/targets/s390x-softmmu.mak | 1 + + configs/targets/x86_64-softmmu.mak | 1 + + include/sysemu/kvm.h | 2 +- + include/sysemu/kvm_int.h | 2 +- + 10 files changed, 15 insertions(+), 9 deletions(-) + +diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c +index 54f19028b8..4c155f028a 100644 +--- a/accel/kvm/kvm-accel-ops.c ++++ b/accel/kvm/kvm-accel-ops.c +@@ -86,7 +86,7 @@ static bool kvm_cpus_are_resettable(void) + return !kvm_enabled() || kvm_cpu_check_are_resettable(); + } + +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + static int kvm_update_guest_debug_ops(CPUState *cpu) + { + return kvm_update_guest_debug(cpu, 0); +@@ -105,7 +105,7 @@ static void kvm_accel_ops_class_init(ObjectClass *oc, void *data) + ops->synchronize_state = kvm_cpu_synchronize_state; + ops->synchronize_pre_loadvm = kvm_cpu_synchronize_pre_loadvm; + +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + ops->update_guest_debug = kvm_update_guest_debug_ops; + ops->supports_guest_debug = kvm_supports_guest_debug; + ops->insert_breakpoint = kvm_insert_breakpoint; +diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c +index aaee470b8a..73fb041347 100644 +--- a/accel/kvm/kvm-all.c ++++ b/accel/kvm/kvm-all.c +@@ -2409,7 +2409,7 @@ static int kvm_init(MachineState *ms) + s->sigmask_len = 8; + accel_blocker_init(); + +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + QTAILQ_INIT(&s->kvm_sw_breakpoints); + #endif + QLIST_INIT(&s->kvm_parked_vcpus); +@@ -2597,7 +2597,7 @@ static int kvm_init(MachineState *ms) + kvm_vm_attributes_allowed = + (kvm_check_extension(s, KVM_CAP_VM_ATTRIBUTES) > 0); + +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + kvm_has_guest_debug = + (kvm_check_extension(s, KVM_CAP_SET_GUEST_DEBUG) > 0); + #endif +@@ -2606,7 +2606,7 @@ static int kvm_init(MachineState *ms) + if (kvm_has_guest_debug) { + kvm_sstep_flags = SSTEP_ENABLE; + +-#if defined KVM_CAP_SET_GUEST_DEBUG2 ++#if defined TARGET_KVM_HAVE_GUEST_DEBUG + int guest_debug_flags = + kvm_check_extension(s, KVM_CAP_SET_GUEST_DEBUG2); + +@@ -3225,7 +3225,7 @@ bool kvm_arm_supports_user_irq(void) + return kvm_check_extension(kvm_state, KVM_CAP_ARM_USER_IRQ); + } + +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *cpu, vaddr pc) + { + struct kvm_sw_breakpoint *bp; +@@ -3385,7 +3385,7 @@ void kvm_remove_all_breakpoints(CPUState *cpu) + } + } + +-#endif /* !KVM_CAP_SET_GUEST_DEBUG */ ++#endif /* !TARGET_KVM_HAVE_GUEST_DEBUG */ + + static int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset) + { +diff --git a/configs/targets/aarch64-softmmu.mak b/configs/targets/aarch64-softmmu.mak +index b4338e9568..83c22391a6 100644 +--- a/configs/targets/aarch64-softmmu.mak ++++ b/configs/targets/aarch64-softmmu.mak +@@ -1,5 +1,6 @@ + TARGET_ARCH=aarch64 + TARGET_BASE_ARCH=arm + TARGET_SUPPORTS_MTTCG=y ++TARGET_KVM_HAVE_GUEST_DEBUG=y + TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml gdb-xml/aarch64-pauth.xml + TARGET_NEED_FDT=y +diff --git a/configs/targets/i386-softmmu.mak b/configs/targets/i386-softmmu.mak +index 6b3c99fc86..d61b507613 100644 +--- a/configs/targets/i386-softmmu.mak ++++ b/configs/targets/i386-softmmu.mak +@@ -1,4 +1,5 @@ + TARGET_ARCH=i386 + TARGET_SUPPORTS_MTTCG=y + TARGET_NEED_FDT=y ++TARGET_KVM_HAVE_GUEST_DEBUG=y + TARGET_XML_FILES= gdb-xml/i386-32bit.xml +diff --git a/configs/targets/ppc-softmmu.mak b/configs/targets/ppc-softmmu.mak +index 774440108f..f3ea9c98f7 100644 +--- a/configs/targets/ppc-softmmu.mak ++++ b/configs/targets/ppc-softmmu.mak +@@ -1,4 +1,5 @@ + TARGET_ARCH=ppc + TARGET_BIG_ENDIAN=y ++TARGET_KVM_HAVE_GUEST_DEBUG=y + TARGET_XML_FILES= gdb-xml/power-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml + TARGET_NEED_FDT=y +diff --git a/configs/targets/ppc64-softmmu.mak b/configs/targets/ppc64-softmmu.mak +index ddf0c39617..1db8d8381d 100644 +--- a/configs/targets/ppc64-softmmu.mak ++++ b/configs/targets/ppc64-softmmu.mak +@@ -2,5 +2,6 @@ TARGET_ARCH=ppc64 + TARGET_BASE_ARCH=ppc + TARGET_BIG_ENDIAN=y + TARGET_SUPPORTS_MTTCG=y ++TARGET_KVM_HAVE_GUEST_DEBUG=y + TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml + TARGET_NEED_FDT=y +diff --git a/configs/targets/s390x-softmmu.mak b/configs/targets/s390x-softmmu.mak +index 70d2f9f0ba..b22218aacc 100644 +--- a/configs/targets/s390x-softmmu.mak ++++ b/configs/targets/s390x-softmmu.mak +@@ -1,4 +1,5 @@ + TARGET_ARCH=s390x + TARGET_BIG_ENDIAN=y + TARGET_SUPPORTS_MTTCG=y ++TARGET_KVM_HAVE_GUEST_DEBUG=y + TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml +diff --git a/configs/targets/x86_64-softmmu.mak b/configs/targets/x86_64-softmmu.mak +index 197817c943..c5f882e5ba 100644 +--- a/configs/targets/x86_64-softmmu.mak ++++ b/configs/targets/x86_64-softmmu.mak +@@ -2,4 +2,5 @@ TARGET_ARCH=x86_64 + TARGET_BASE_ARCH=i386 + TARGET_SUPPORTS_MTTCG=y + TARGET_NEED_FDT=y ++TARGET_KVM_HAVE_GUEST_DEBUG=y + TARGET_XML_FILES= gdb-xml/i386-64bit.xml +diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h +index fa1e42f085..facebf1e9f 100644 +--- a/include/sysemu/kvm.h ++++ b/include/sysemu/kvm.h +@@ -247,7 +247,7 @@ void kvm_flush_coalesced_mmio_buffer(void); + * calling down to kvm_arch_update_guest_debug after the generic + * fields have been set. + */ +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap); + #else + static inline int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap) +diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h +index fd846394be..35aefb8d9a 100644 +--- a/include/sysemu/kvm_int.h ++++ b/include/sysemu/kvm_int.h +@@ -78,7 +78,7 @@ struct KVMState + struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; + bool coalesced_flush_in_progress; + int vcpu_events; +-#ifdef KVM_CAP_SET_GUEST_DEBUG ++#ifdef TARGET_KVM_HAVE_GUEST_DEBUG + QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints; + #endif + int max_nested_state_len; +-- +2.43.0 + diff --git a/qemu.spec b/qemu.spec index 034d6c7..1097a27 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,4 +1,4 @@ -%define anolis_release 30 +%define anolis_release 31 %bcond_with check %global all_system_emu_support 0 @@ -640,6 +640,11 @@ Patch0351: 0351-smbios-function-to-set-default-processor-family.patch Patch0352: 0352-target-riscv-smbios-support-for-risc-v-virt-machine.patch Patch0353: 0353-qemu-options-enable-smbios-option-on-risc-v.patch Patch0354: 0354-kvm-use-configs-definition-to-conditionalize-debug-s.patch +Patch0355: 0355-smbios-add-processor-family-option.patch +Patch0356: 0356-smbios-function-to-set-default-processor-family.patch +Patch0357: 0357-target-riscv-smbios-support-for-risc-v-virt-machine.patch +Patch0358: 0358-qemu-options-enable-smbios-option-on-risc-v.patch +Patch0359: 0359-kvm-use-configs-definition-to-conditionalize-debug-s.patch ExclusiveArch: x86_64 aarch64 loongarch64 riscv64 @@ -2204,6 +2209,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Mon Jun 16 2025 wh02252983 - 2:8.2.0-31 +- Auto-generated patch updates + * Sat Jun 14 2025 Chang Gao - 2:8.2.0-30 - add patch to fix riscv build failure -- Gitee