aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/kvm/kvm_main.c4
-rw-r--r--include/asm-x86/processor-flags.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 193197fb399e..f0fc8d9e71e6 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -92,7 +92,7 @@ static struct dentry *debugfs_dir;
92 | X86_CR4_PGE | X86_CR4_PCE | X86_CR4_OSFXSR \ 92 | X86_CR4_PGE | X86_CR4_PCE | X86_CR4_OSFXSR \
93 | X86_CR4_OSXMMEXCPT | X86_CR4_VMXE)) 93 | X86_CR4_OSXMMEXCPT | X86_CR4_VMXE))
94 94
95#define CR8_RESEVED_BITS (~0x0fULL) 95#define CR8_RESERVED_BITS (~(unsigned long)X86_CR8_TPR)
96#define EFER_RESERVED_BITS 0xfffffffffffff2fe 96#define EFER_RESERVED_BITS 0xfffffffffffff2fe
97 97
98#ifdef CONFIG_X86_64 98#ifdef CONFIG_X86_64
@@ -625,7 +625,7 @@ EXPORT_SYMBOL_GPL(set_cr3);
625 625
626void set_cr8(struct kvm_vcpu *vcpu, unsigned long cr8) 626void set_cr8(struct kvm_vcpu *vcpu, unsigned long cr8)
627{ 627{
628 if ( cr8 & CR8_RESEVED_BITS) { 628 if (cr8 & CR8_RESERVED_BITS) {
629 printk(KERN_DEBUG "set_cr8: #GP, reserved bits 0x%lx\n", cr8); 629 printk(KERN_DEBUG "set_cr8: #GP, reserved bits 0x%lx\n", cr8);
630 inject_gp(vcpu); 630 inject_gp(vcpu);
631 return; 631 return;
diff --git a/include/asm-x86/processor-flags.h b/include/asm-x86/processor-flags.h
index 5404e90edd57..199cab107d85 100644
--- a/include/asm-x86/processor-flags.h
+++ b/include/asm-x86/processor-flags.h
@@ -63,7 +63,7 @@
63/* 63/*
64 * x86-64 Task Priority Register, CR8 64 * x86-64 Task Priority Register, CR8
65 */ 65 */
66#define X86_CR8_TPR 0x00000007 /* task priority register */ 66#define X86_CR8_TPR 0x0000000F /* task priority register */
67 67
68/* 68/*
69 * AMD and Transmeta use MSRs for configuration; see <asm/msr-index.h> 69 * AMD and Transmeta use MSRs for configuration; see <asm/msr-index.h>