x86: Side-step lguest problem by only building cmpxchg8b_emu for pre-Pentium
authorRusty Russell <[email protected]>
Mon, 26 Oct 2009 03:56:04 +0000 (14:26 +1030)
committerIngo Molnar <[email protected]>
Mon, 26 Oct 2009 11:33:02 +0000 (12:33 +0100)
Commit 79e1dd05d1a22 "x86: Provide an alternative() based
cmpxchg64()" broke lguest, even on systems which have cmpxchg8b
support.  The emulation code gets used until alternatives get
run, but it contains native instructions, not their paravirt
alternatives.

The simplest fix is to turn this code off except for 386 and 486
builds.

Reported-by: Johannes Stezenbach <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Cc: [email protected]
Cc: Arjan van de Ven <[email protected]>
Cc: Jeremy Fitzhardinge <[email protected]>
Cc: Linus Torvalds <[email protected]>
LKML-Reference: <200910261426[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/Kconfig.cpu

index f2824fb8c79cad23ad747977e1e32ab4d6b555a1..2649840d888ffeac6fe8ec6b77f73a599ed73ee1 100644 (file)
@@ -400,7 +400,7 @@ config X86_TSC
 
 config X86_CMPXCHG64
        def_bool y
-       depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
+       depends on !M386 && !M486
 
 # this should be set for all -march=.. options where the compiler
 # generates cmov.