Commit 4f205fd4 authored by Rusty Russell's avatar Rusty Russell Committed by Andi Kleen

[PATCH] paravirt: Allow selected bug checks to be

Allow selected bug checks to be skipped by paravirt kernels.  The two most
important are the F00F workaround (which is either done by the hypervisor,
or not required), and the 'hlt' instruction check, which can break under
some hypervisors.
Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent c9ccf30d
...@@ -107,7 +107,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) ...@@ -107,7 +107,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
* Note that the workaround only should be initialized once... * Note that the workaround only should be initialized once...
*/ */
c->f00f_bug = 0; c->f00f_bug = 0;
if ( c->x86 == 5 ) { if (!paravirt_enabled() && c->x86 == 5) {
static int f00f_workaround_enabled = 0; static int f00f_workaround_enabled = 0;
c->f00f_bug = 1; c->f00f_bug = 1;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/i387.h> #include <asm/i387.h>
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/paravirt.h>
static int __init no_halt(char *s) static int __init no_halt(char *s)
{ {
...@@ -91,6 +92,9 @@ static void __init check_fpu(void) ...@@ -91,6 +92,9 @@ static void __init check_fpu(void)
static void __init check_hlt(void) static void __init check_hlt(void)
{ {
if (paravirt_enabled())
return;
printk(KERN_INFO "Checking 'hlt' instruction... "); printk(KERN_INFO "Checking 'hlt' instruction... ");
if (!boot_cpu_data.hlt_works_ok) { if (!boot_cpu_data.hlt_works_ok) {
printk("disabled\n"); printk("disabled\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment