You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.6 KiB
77 lines
2.6 KiB
3 weeks ago
|
From 5110e137294163ae43a61376485a7f610bf496f3 Mon Sep 17 00:00:00 2001
|
||
|
From: Shaoqin Huang <shahuang@redhat.com>
|
||
|
Date: Wed, 22 May 2024 03:23:28 -0400
|
||
|
Subject: [PATCH 8/9] RH-Author: Shaoqin Huang <shahuang@redhat.com >
|
||
|
RH-MergeRequest: 271: hw/arm/virt: Fix Manufacturer and Product Name in
|
||
|
emulated SMBIOS mode RH-Jira: RHEL-38374 RH-Acked-by: Cornelia Huck
|
||
|
<cohuck@redhat.com> RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
||
|
RH-Acked-by: Eric Auger <eric.auger@redhat.com> RH-Commit: [8/8]
|
||
|
d1daacc6ed427094cf92a9ecc66af8171950c718 (shahuang/qemu-kvm)
|
||
|
|
||
|
---
|
||
|
hw/arm/virt.c | 15 +++++++++++++--
|
||
|
include/hw/arm/virt.h | 1 +
|
||
|
2 files changed, 14 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
|
||
|
index 907c26c635..078098ec3a 100644
|
||
|
--- a/hw/arm/virt.c
|
||
|
+++ b/hw/arm/virt.c
|
||
|
@@ -1711,14 +1711,21 @@ static void virt_build_smbios(VirtMachineState *vms)
|
||
|
uint8_t *smbios_tables, *smbios_anchor;
|
||
|
size_t smbios_tables_len, smbios_anchor_len;
|
||
|
struct smbios_phys_mem_area mem_array;
|
||
|
+ const char *manufacturer = "QEMU";
|
||
|
const char *product = "QEMU Virtual Machine";
|
||
|
+ const char *version = vmc->smbios_old_sys_ver ? "1.0" : mc->name;
|
||
|
|
||
|
if (kvm_enabled()) {
|
||
|
product = "KVM Virtual Machine";
|
||
|
}
|
||
|
|
||
|
- smbios_set_defaults("QEMU", product,
|
||
|
- vmc->smbios_old_sys_ver ? "1.0" : mc->name,
|
||
|
+ if (!vmc->manufacturer_product_compat) {
|
||
|
+ manufacturer = "Red Hat";
|
||
|
+ product = "KVM";
|
||
|
+ version = mc->desc;
|
||
|
+ }
|
||
|
+
|
||
|
+ smbios_set_defaults(manufacturer, product, version,
|
||
|
NULL, NULL);
|
||
|
|
||
|
/* build the array of physical mem area from base_memmap */
|
||
|
@@ -3593,6 +3600,8 @@ DEFINE_VIRT_MACHINE(9, 6, 0)
|
||
|
|
||
|
static void virt_rhel_machine_9_4_0_options(MachineClass *mc)
|
||
|
{
|
||
|
+ VirtMachineClass *vmc = VIRT_MACHINE_CLASS(OBJECT_CLASS(mc));
|
||
|
+
|
||
|
virt_rhel_machine_9_6_0_options(mc);
|
||
|
|
||
|
/* From virt_machine_9_0_options() */
|
||
|
@@ -3600,6 +3609,8 @@ static void virt_rhel_machine_9_4_0_options(MachineClass *mc)
|
||
|
|
||
|
compat_props_add(mc->compat_props, hw_compat_rhel_10_0, hw_compat_rhel_10_0_len);
|
||
|
compat_props_add(mc->compat_props, hw_compat_rhel_9_5, hw_compat_rhel_9_5_len);
|
||
|
+
|
||
|
+ vmc->manufacturer_product_compat = true;
|
||
|
}
|
||
|
DEFINE_VIRT_MACHINE(9, 4, 0)
|
||
|
|
||
|
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
|
||
|
index a4d937ed45..2fc30a7626 100644
|
||
|
--- a/include/hw/arm/virt.h
|
||
|
+++ b/include/hw/arm/virt.h
|
||
|
@@ -134,6 +134,7 @@ struct VirtMachineClass {
|
||
|
bool no_cpu_topology;
|
||
|
bool no_tcg_lpa2;
|
||
|
bool no_ns_el2_virt_timer_irq;
|
||
|
+ bool manufacturer_product_compat;
|
||
|
};
|
||
|
|
||
|
struct VirtMachineState {
|
||
|
--
|
||
|
2.39.3
|
||
|
|