Blob Blame History Raw
From 13f5bfee8de72bc90324d84cba85850c66c001ed Mon Sep 17 00:00:00 2001
From: Markus Armbruster <armbru@redhat.com>
Date: Sat, 2 Nov 2013 10:01:28 +0100
Subject: [PATCH 28/29] rhel: SMBIOS type 1 branding

RH-Author: Markus Armbruster <armbru@redhat.com>
Message-id: <1383386488-29789-12-git-send-email-armbru@redhat.com>
Patchwork-id: 55242
O-Subject: [PATCH 7.0 qemu-kvm 11/11] rhel: SMBIOS type 1 branding
Bugzilla: 994490
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

From: Markus Armbruster <armbru@redhat.com>

The previous two commits got us the upstreamable parts of RHEL-6
commit 68c63bd "per-machine-type smbios Type 1 smbios values".  This
is the RHEL-only part.

Note: RHEL-6 also has commit 8e0d71e "Set SMBIOS vendor to QEMU for
RHEL5 machine types.", which RHEL-7 doesn't need, because it doesn't
have RHEL-5 machine types.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/i386/pc_piix.c | 3 +--
 hw/i386/pc_q35.c  | 3 +--
 hw/i386/smbios.c  | 3 +++
 3 files changed, 5 insertions(+), 4 deletions(-)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/pc_piix.c |    3 +--
 hw/i386/pc_q35.c  |    3 +--
 hw/i386/smbios.c  |    3 +++
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 396f4e4..825a5b1 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -117,8 +117,7 @@ static void pc_init1(QEMUMachineInitArgs *args,
 
     if (smbios_type1_defaults) {
         /* These values are guest ABI, do not change */
-        smbios_set_type1_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
-                                  args->machine->name);
+        smbios_set_type1_defaults("Red Hat", "KVM", args->machine->desc);
     }
 
     /* allocate ram and load rom/bios */
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 473f01b..64995ac 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -103,8 +103,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
 
     if (smbios_type1_defaults) {
         /* These values are guest ABI, do not change */
-        smbios_set_type1_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
-                                  args->machine->name);
+        smbios_set_type1_defaults("Red Hat", "KVM", args->machine->desc);
     }
 
     /* allocate ram and load rom/bios */
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index e8f41ad..60aa62e 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -268,6 +268,9 @@ void smbios_set_type1_defaults(const char *manufacturer,
     if (!type1.version) {
         type1.version = version;
     }
+    if (!type1.family) {
+        type1.family = "Red Hat Enterprise Linux";
+    }
 }
 
 uint8_t *smbios_get_table(size_t *length)
-- 
1.7.1