Skip to contentSkip to conversation

x86: don't expose SYSENTER on unknown CPUs

PATCH In review Jan Beulich 2 participants 2 messages Aug 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: don't expose SYSENTER on unknown CPUs

So far we only ever set up the respective MSRs on Intel CPUs, yet we hide the feature only on a 32-bit hypervisor. That prevents booting of PV guests on top of a 64-bit hypervisor making use of the instruction on unknown CPUs (VIA in this case).

xen/arch/x86/cpu/common.c +1 -0
@@ -55,6 +55,7 @@ static void default_init(struct cpuinfo_
 	/* Not much we can do here... */
 	/* Check if at least it has cpuid */
 	BUG_ON(c->cpuid_level == -1);
+	__clear_bit(X86_FEATURE_SEP, c->x86_capability);
 }
 
 static struct cpu_dev default_cpu = {

x86: don't expose SYSENTER on unknown CPUs

So far we only ever set up the respective MSRs on Intel CPUs, yet we hide the feature only on a 32-bit hypervisor. That prevents booting of PV guests on top of a 64-bit hypervisor making use of the instruction on unknown CPUs (VIA in this case).

xen/arch/x86/cpu/common.c +1 -0
@@ -55,6 +55,7 @@ static void default_init(struct cpuinfo_
 	/* Not much we can do here... */
 	/* Check if at least it has cpuid */
 	BUG_ON(c->cpuid_level == -1);
+	__clear_bit(X86_FEATURE_SEP, c->x86_capability);
 }
 
 static struct cpu_dev default_cpu = {

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Jan Beulich

So far we only ever set up the respective MSRs on Intel CPUs, yet we hide the feature only on a 32-bit hypervisor. That prevents booting of PV guests on top of a 64-bit hypervisor making use of the instruction on unknown CPUs (VIA in this case).

Quoted 17 lines
xen/arch/x86/cpu/common.c +1 -0
@@ -55,6 +55,7 @@ static void default_init(struct cpuinfo_
 /* Not much we can do here... */
 /* Check if at least it has cpuid */
 BUG_ON(c->cpuid_level == -1);
+ __clear_bit(X86_FEATURE_SEP, c->x86_capability);
 }
 
 static struct cpu_dev default_cpu = {

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel