diff options
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index e920c2269af0..5c058fa1c8ad 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -38,7 +38,6 @@ MODULE_LICENSE("GPL"); | |||
38 | 38 | ||
39 | #define DR7_GD_MASK (1 << 13) | 39 | #define DR7_GD_MASK (1 << 13) |
40 | #define DR6_BD_MASK (1 << 13) | 40 | #define DR6_BD_MASK (1 << 13) |
41 | #define CR4_DE_MASK (1UL << 3) | ||
42 | 41 | ||
43 | #define SEG_TYPE_LDT 2 | 42 | #define SEG_TYPE_LDT 2 |
44 | #define SEG_TYPE_BUSY_TSS16 3 | 43 | #define SEG_TYPE_BUSY_TSS16 3 |
@@ -564,7 +563,7 @@ static void init_vmcb(struct vmcb *vmcb) | |||
564 | * cache by default. the orderly way is to enable cache in bios. | 563 | * cache by default. the orderly way is to enable cache in bios. |
565 | */ | 564 | */ |
566 | save->cr0 = 0x00000010 | X86_CR0_PG | X86_CR0_WP; | 565 | save->cr0 = 0x00000010 | X86_CR0_PG | X86_CR0_WP; |
567 | save->cr4 = CR4_PAE_MASK; | 566 | save->cr4 = X86_CR4_PAE; |
568 | /* rdx = ?? */ | 567 | /* rdx = ?? */ |
569 | } | 568 | } |
570 | 569 | ||
@@ -781,7 +780,7 @@ static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) | |||
781 | static void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) | 780 | static void svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) |
782 | { | 781 | { |
783 | vcpu->cr4 = cr4; | 782 | vcpu->cr4 = cr4; |
784 | vcpu->svm->vmcb->save.cr4 = cr4 | CR4_PAE_MASK; | 783 | vcpu->svm->vmcb->save.cr4 = cr4 | X86_CR4_PAE; |
785 | } | 784 | } |
786 | 785 | ||
787 | static void svm_set_segment(struct kvm_vcpu *vcpu, | 786 | static void svm_set_segment(struct kvm_vcpu *vcpu, |
@@ -877,7 +876,7 @@ static void svm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long value, | |||
877 | vcpu->svm->db_regs[dr] = value; | 876 | vcpu->svm->db_regs[dr] = value; |
878 | return; | 877 | return; |
879 | case 4 ... 5: | 878 | case 4 ... 5: |
880 | if (vcpu->cr4 & CR4_DE_MASK) { | 879 | if (vcpu->cr4 & X86_CR4_DE) { |
881 | *exception = UD_VECTOR; | 880 | *exception = UD_VECTOR; |
882 | return; | 881 | return; |
883 | } | 882 | } |