958e1b
From 983dc94f2937e8f19732f205711348b0a170e604 Mon Sep 17 00:00:00 2001
958e1b
From: Markus Armbruster <armbru@redhat.com>
958e1b
Date: Fri, 31 Oct 2014 14:11:31 +0100
958e1b
Subject: [PATCH 3/9] rhel: Drop machine type pc-q35-rhel7.0.0
958e1b
958e1b
Message-id: <1414764691-31603-2-git-send-email-armbru@redhat.com>
958e1b
Patchwork-id: 62013
958e1b
O-Subject: [PATCH RHEL-7.1 qemu-kvm 1/1] rhel: Drop machine type pc-q35-rhel7.0.0
958e1b
Bugzilla: 1111107
958e1b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
958e1b
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
958e1b
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
958e1b
958e1b
Q35 is tech preview in RHEL 7.0.  From 7.1 on, we want to support it,
958e1b
but only in qemu-kvm-rhev.  We don't intend to support it in qemu-kvm.
958e1b
So as to not mislead customers, drop the machine type from qemu-kvm,
958e1b
by removing pc_q35.c from the build.  Remove RHEL-specific code from
958e1b
pc_q35.c just to avoid confusion.
958e1b
958e1b
Signed-off-by: Markus Armbruster <armbru@redhat.com>
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
---
958e1b
 hw/i386/Makefile.objs |  2 +-
958e1b
 hw/i386/pc_q35.c      | 58 ---------------------------------------------------
958e1b
 2 files changed, 1 insertion(+), 59 deletions(-)
958e1b
958e1b
diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
958e1b
index 09ac433..f2bcdcb 100644
958e1b
--- a/hw/i386/Makefile.objs
958e1b
+++ b/hw/i386/Makefile.objs
958e1b
@@ -1,6 +1,6 @@
958e1b
 obj-$(CONFIG_KVM) += kvm/
958e1b
 obj-y += multiboot.o smbios.o
958e1b
-obj-y += pc.o pc_piix.o pc_q35.o
958e1b
+obj-y += pc.o pc_piix.o
958e1b
 obj-y += pc_sysfw.o
958e1b
 obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o
958e1b
 
958e1b
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
958e1b
index 4534539..850a25a 100644
958e1b
--- a/hw/i386/pc_q35.c
958e1b
+++ b/hw/i386/pc_q35.c
958e1b
@@ -218,8 +218,6 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
958e1b
     }
958e1b
 }
958e1b
 
958e1b
-#if 0 /* Disabled for Red Hat Enterprise Linux */
958e1b
-
958e1b
 static void pc_q35_init_1_5(QEMUMachineInitArgs *args)
958e1b
 {
958e1b
     has_pci_info = false;
958e1b
@@ -266,59 +264,3 @@ static void pc_q35_machine_init(void)
958e1b
 }
958e1b
 
958e1b
 machine_init(pc_q35_machine_init);
958e1b
-
958e1b
-#endif  /* Disabled for Red Hat Enterprise Linux */
958e1b
-
958e1b
-/* Red Hat Enterprise Linux machine types */
958e1b
-
958e1b
-static void pc_q35_compat_rhel700(QEMUMachineInitArgs *args)
958e1b
-{
958e1b
-    x86_cpu_compat_set_features("Conroe", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Penryn", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Nehalem", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    /* SandyBridge and Haswell already have x2apic enabled */
958e1b
-    x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Opteron_G3", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Opteron_G4", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-    x86_cpu_compat_set_features("Opteron_G5", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
958e1b
-
958e1b
-    /* KVM can't expose RDTSCP on AMD CPUs, so there's no point in enabling it
958e1b
-     * on AMD CPU models.
958e1b
-     */
958e1b
-    x86_cpu_compat_set_features("phenom", FEAT_8000_0001_EDX, 0,
958e1b
-                                CPUID_EXT2_RDTSCP);
958e1b
-    x86_cpu_compat_set_features("Opteron_G2", FEAT_8000_0001_EDX, 0,
958e1b
-                                CPUID_EXT2_RDTSCP);
958e1b
-    x86_cpu_compat_set_features("Opteron_G3", FEAT_8000_0001_EDX, 0,
958e1b
-                                CPUID_EXT2_RDTSCP);
958e1b
-    x86_cpu_compat_set_features("Opteron_G4", FEAT_8000_0001_EDX, 0,
958e1b
-                                CPUID_EXT2_RDTSCP);
958e1b
-    x86_cpu_compat_set_features("Opteron_G5", FEAT_8000_0001_EDX, 0,
958e1b
-                                CPUID_EXT2_RDTSCP);
958e1b
-}
958e1b
-
958e1b
-static void pc_q35_init_rhel700(QEMUMachineInitArgs *args)
958e1b
-{
958e1b
-    pc_q35_compat_rhel700(args);
958e1b
-    pc_q35_init(args);
958e1b
-}
958e1b
-
958e1b
-static QEMUMachine pc_q35_machine_rhel700 = {
958e1b
-    .name = "pc-q35-rhel7.0.0",
958e1b
-    .alias = "q35",
958e1b
-    .desc = "RHEL-7.0.0 PC (Q35 + ICH9, 2009)",
958e1b
-    .init = pc_q35_init_rhel700,
958e1b
-    .hot_add_cpu = pc_hot_add_cpu,
958e1b
-    .max_cpus = RHEL_MAX_CPUS,
958e1b
-    .default_machine_opts = "firmware=bios-256k.bin",
958e1b
-    DEFAULT_MACHINE_OPTIONS,
958e1b
-};
958e1b
-
958e1b
-static void rhel_pc_q35_machine_init(void)
958e1b
-{
958e1b
-    qemu_register_machine(&pc_q35_machine_rhel700);
958e1b
-}
958e1b
-
958e1b
-machine_init(rhel_pc_q35_machine_init);
958e1b
-- 
958e1b
1.8.3.1
958e1b