WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-merge

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

To: xen-merge@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-merge] [PATCH] loosen write_cr0/4 restrictions
From: Chris Wright <chrisw@xxxxxxxxxxxx>
Date: Wed, 11 Jan 2006 15:54:34 -0800
Delivery-date: Thu, 12 Jan 2006 01:40:17 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-merge-request@lists.xensource.com?subject=help>
List-id: xen-merge <xen-merge.lists.xensource.com>
List-post: <mailto:xen-merge@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-merge>, <mailto:xen-merge-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-merge>, <mailto:xen-merge-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-merge-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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

<Prev in Thread] Current Thread [Next in Thread>