# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/06/07 00:52:27-04:00 jnakajim@build64.(none) # Use the same as native for cr0 access. # # Signed-off-by: Jun Nakajima # # linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h # 2005/06/07 00:51:36-04:00 jnakajim@build64.(none) +4 -2 # Use the same as native for cr0 access. # # Signed-off-by: Jun Nakajima # diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h 2005-06-07 00:52:38 -04:00 +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h 2005-06-07 00:52:38 -04:00 @@ -147,12 +147,14 @@ #define clts() (HYPERVISOR_fpu_taskswitch(0)) static inline unsigned long read_cr0(void) { - return 0; + unsigned long cr0; + asm volatile("movq %%cr0,%0" : "=r" (cr0)); + return cr0; } static inline void write_cr0(unsigned long val) { - /* Ignore, Linux tries to clear TS and EM */ + asm volatile("movq %0,%%cr0" :: "r" (val)); } static inline unsigned long read_cr3(void)