From 0f2d9f31fa4ccd5e133a16e26402518440a1a9f2 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 27 Jan 2014 16:07:42 +0100 Subject: [PATCH 169/212] pc: Disable RDTSCP unconditionally on rhel6.* machine-types RH-Author: Eduardo Habkost Message-id: <1390838863-11030-2-git-send-email-ehabkost@redhat.com> Patchwork-id: 56960 O-Subject: [RHEL7 qemu-kvm PATCH 1/2] pc: Disable RDTSCP unconditionally on rhel6.* machine-types Bugzilla: 918907 RH-Acked-by: Paolo Bonzini RH-Acked-by: Igor Mammedov RH-Acked-by: Miroslav Rezanina Bugzilla: 918907 Upstream status: not applicable Brew scratch build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6953316 The RHEL-6 kernel didn't support exposing RDTSCP at all, so we need to disable RDTSCP on all CPU models. The previous rhel6.5.0 compat code wasn't complete, because Opteron_G4 and Opteron_G5 were not being changed. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) Signed-off-by: Miroslav Rezanina --- hw/i386/pc_piix.c | 16 +++------------- 1 files changed, 3 insertions(+), 13 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 2818a15..a10fb4f 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -1080,10 +1080,9 @@ static void pc_compat_rhel650(MachineState *machine) CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR | CPUID_EXT2_TSC | CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU, 0); - x86_cpu_compat_set_features("SandyBridge", FEAT_8000_0001_EDX, - 0, CPUID_EXT2_RDTSCP); - x86_cpu_compat_set_features("Haswell", FEAT_8000_0001_EDX, - 0, CPUID_EXT2_RDTSCP); + + /* RHEL-6 kernel never supported exposing RDTSCP */ + x86_cpu_compat_set_features(NULL, FEAT_8000_0001_EDX, 0, CPUID_EXT2_RDTSCP); x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_X2APIC, 0); x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_X2APIC, 0); @@ -1091,15 +1090,6 @@ static void pc_compat_rhel650(MachineState *machine) x86_cpu_compat_set_features("Opteron_G4", FEAT_1_ECX, 0, CPUID_EXT_X2APIC); x86_cpu_compat_set_features("Opteron_G5", FEAT_1_ECX, 0, CPUID_EXT_X2APIC); - x86_cpu_compat_set_features("phenom", FEAT_8000_0001_EDX, - 0, CPUID_EXT2_RDTSCP); - x86_cpu_compat_set_features("Opteron_G1", FEAT_8000_0001_EDX, - 0, CPUID_EXT2_RDTSCP); - x86_cpu_compat_set_features("Opteron_G2", FEAT_8000_0001_EDX, - 0, CPUID_EXT2_RDTSCP); - x86_cpu_compat_set_features("Opteron_G3", FEAT_8000_0001_EDX, - 0, CPUID_EXT2_RDTSCP); - /* RHEL-6 had 3dnow & 3dnowext unconditionally disabled on all models */ x86_cpu_compat_set_features(NULL, FEAT_8000_0001_EDX, 0, CPUID_EXT2_3DNOW | CPUID_EXT2_3DNOWEXT); -- 1.7.1