diff options
author | Keir Fraser <keir@xen.org> | 2010-09-24 15:54:39 +0100 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2010-09-24 15:54:39 +0100 |
commit | 3527a9f3a8b76950ecb05c005dc6d4290b7bbf93 (patch) | |
tree | eb811c4c20f05e2ee4b65713c55475df9d24e5d3 /xen/include/asm-x86/msr.h | |
parent | 1505df1590339e4ff0b4b28c9df2205f6ee4b4e7 (diff) | |
download | xen-3527a9f3a8b76950ecb05c005dc6d4290b7bbf93.tar.gz xen-3527a9f3a8b76950ecb05c005dc6d4290b7bbf93.tar.bz2 xen-3527a9f3a8b76950ecb05c005dc6d4290b7bbf93.zip |
x86: adjust MSR_IA32_MISC_ENABLE handling
In the warning message issued on writes, the Xen-modified value should
be printed (and used to determine whether anything needs to be printed
at all), as the guest kernel will usually do a read-modify-write
cycle.
A question is whether Dom0 shouldn't be allowed control over some
bits, or whether some bits shouldn't be fully virtualized. I'm
particularly thinking of MSR_IA32_MISC_ENABLE_FAST_STRING, which
recent Linux kernels want to disable for CONFIG_KMEMCHECK.
While putting this together I also noticed that rdmsr_safe() failed to
initialize its output registers in the failure path, thus leading to
printing of uninitialized data in the guest WRMSR warning message.
Further, the default case value-changed check can be simplified.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/msr.h')
-rw-r--r-- | xen/include/asm-x86/msr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/include/asm-x86/msr.h b/xen/include/asm-x86/msr.h index d55c81509b..ab3360c683 100644 --- a/xen/include/asm-x86/msr.h +++ b/xen/include/asm-x86/msr.h @@ -41,7 +41,8 @@ static inline void wrmsrl(unsigned int msr, __u64 val) __asm__ __volatile__( \ "1: rdmsr\n2:\n" \ ".section .fixup,\"ax\"\n" \ - "3: movl %5,%2\n; jmp 2b\n" \ + "3: xorl %0,%0\n; xorl %1,%1\n" \ + " movl %5,%2\n; jmp 2b\n" \ ".previous\n" \ ".section __ex_table,\"a\"\n" \ " "__FIXUP_ALIGN"\n" \ |