diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-17 09:37:17 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 04:18:19 -0400 |
commit | 7075bc816cfad142da92207ed5a6f3da55b143ef (patch) | |
tree | d7b7581a9968d89fac5587d2378390b5939d28ec /drivers | |
parent | 8fc0d085f521a2a76418f8f569cf1cd27f0e43d4 (diff) |
KVM: Use standard CR8 flags, and fix TPR definition
Intel manual (and KVM definition) say the TPR is 4 bits wide. Also fix
CR8_RESEVED_BITS typo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/kvm_main.c | 4 |
1 files changed, 2 insertions, 2 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 | ||
626 | void set_cr8(struct kvm_vcpu *vcpu, unsigned long cr8) | 626 | void 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; |