[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-merge] [PATCH] loosen write_cr0/4 restrictions



This reverts BUG() to WARN_ON() plus actual write which will be trapped
and emulated.  I actually think the emulation is fine, since the
read/write pairs in XMMS_SAVE/RESTORE can't see TS, and there's proper
clts() call.  This allows my machine to boot rather than BUG() during
raid5 checksum tests:

  kernel BUG at include2/asm/xor.h:633!
  invalid opcode: 0000 [#1]
  SMP
  Modules linked in:
  CPU:    0
  EIP:    0061:[<c030be81>]    Not tainted VLI
  EFLAGS: 00010246   (2.6.15)
  EIP is at xor_sse_2+0x1ff/0x20d

Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>

--- a/include/asm-i386/mach-xen/mach_system.h   Mon Jan  9 19:28:35 2006
+++ b/include/asm-i386/mach-xen/mach_system.h   Wed Jan 11 14:24:55 2006
@@ -12,7 +12,9 @@
                :"=r" (__dummy)); \
        __dummy; \
 })
-#define write_cr0(x) BUG()
+#define write_cr0(x) \
+       WARN_ON(1); \
+       __asm__ __volatile__("movl %0,%%cr0": :"r" (x));
 
 #define read_cr2() ({ \
        unsigned int __dummy; \
@@ -38,8 +40,9 @@
                :"=r" (__dummy)); \
        __dummy; \
 })
-#define write_cr4(x) BUG()
-
+#define write_cr4(x) \
+       WARN_ON(1); \
+       __asm__ __volatile__("movl %0,%%cr4": :"r" (x));
 /*
  * Clear and set 'TS' bit respectively
  */

_______________________________________________
Xen-merge mailing list
Xen-merge@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-merge


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.