9ae3a8
From 13f5bfee8de72bc90324d84cba85850c66c001ed Mon Sep 17 00:00:00 2001
9ae3a8
From: Markus Armbruster <armbru@redhat.com>
9ae3a8
Date: Sat, 2 Nov 2013 10:01:28 +0100
9ae3a8
Subject: [PATCH 28/29] rhel: SMBIOS type 1 branding
9ae3a8
9ae3a8
RH-Author: Markus Armbruster <armbru@redhat.com>
9ae3a8
Message-id: <1383386488-29789-12-git-send-email-armbru@redhat.com>
9ae3a8
Patchwork-id: 55242
9ae3a8
O-Subject: [PATCH 7.0 qemu-kvm 11/11] rhel: SMBIOS type 1 branding
9ae3a8
Bugzilla: 994490
9ae3a8
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
9ae3a8
From: Markus Armbruster <armbru@redhat.com>
9ae3a8
9ae3a8
The previous two commits got us the upstreamable parts of RHEL-6
9ae3a8
commit 68c63bd "per-machine-type smbios Type 1 smbios values".  This
9ae3a8
is the RHEL-only part.
9ae3a8
9ae3a8
Note: RHEL-6 also has commit 8e0d71e "Set SMBIOS vendor to QEMU for
9ae3a8
RHEL5 machine types.", which RHEL-7 doesn't need, because it doesn't
9ae3a8
have RHEL-5 machine types.
9ae3a8
9ae3a8
Signed-off-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
---
9ae3a8
 hw/i386/pc_piix.c | 3 +--
9ae3a8
 hw/i386/pc_q35.c  | 3 +--
9ae3a8
 hw/i386/smbios.c  | 3 +++
9ae3a8
 3 files changed, 5 insertions(+), 4 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 hw/i386/pc_piix.c |    3 +--
9ae3a8
 hw/i386/pc_q35.c  |    3 +--
9ae3a8
 hw/i386/smbios.c  |    3 +++
9ae3a8
 3 files changed, 5 insertions(+), 4 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
9ae3a8
index 396f4e4..825a5b1 100644
9ae3a8
--- a/hw/i386/pc_piix.c
9ae3a8
+++ b/hw/i386/pc_piix.c
9ae3a8
@@ -117,8 +117,7 @@ static void pc_init1(QEMUMachineInitArgs *args,
9ae3a8
 
9ae3a8
     if (smbios_type1_defaults) {
9ae3a8
         /* These values are guest ABI, do not change */
9ae3a8
-        smbios_set_type1_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
9ae3a8
-                                  args->machine->name);
9ae3a8
+        smbios_set_type1_defaults("Red Hat", "KVM", args->machine->desc);
9ae3a8
     }
9ae3a8
 
9ae3a8
     /* allocate ram and load rom/bios */
9ae3a8
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
9ae3a8
index 473f01b..64995ac 100644
9ae3a8
--- a/hw/i386/pc_q35.c
9ae3a8
+++ b/hw/i386/pc_q35.c
9ae3a8
@@ -103,8 +103,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
9ae3a8
 
9ae3a8
     if (smbios_type1_defaults) {
9ae3a8
         /* These values are guest ABI, do not change */
9ae3a8
-        smbios_set_type1_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
9ae3a8
-                                  args->machine->name);
9ae3a8
+        smbios_set_type1_defaults("Red Hat", "KVM", args->machine->desc);
9ae3a8
     }
9ae3a8
 
9ae3a8
     /* allocate ram and load rom/bios */
9ae3a8
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
9ae3a8
index e8f41ad..60aa62e 100644
9ae3a8
--- a/hw/i386/smbios.c
9ae3a8
+++ b/hw/i386/smbios.c
9ae3a8
@@ -268,6 +268,9 @@ void smbios_set_type1_defaults(const char *manufacturer,
9ae3a8
     if (!type1.version) {
9ae3a8
         type1.version = version;
9ae3a8
     }
9ae3a8
+    if (!type1.family) {
9ae3a8
+        type1.family = "Red Hat Enterprise Linux";
9ae3a8
+    }
9ae3a8
 }
9ae3a8
 
9ae3a8
 uint8_t *smbios_get_table(size_t *length)
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8