diff options
-rw-r--r-- | drivers/kvm/vmx.c | 8 | ||||
-rw-r--r-- | drivers/kvm/vmx.h | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 708055a50521..30c627d3b21d 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1111,7 +1111,7 @@ static void enter_lmode(struct kvm_vcpu *vcpu) | |||
1111 | find_msr_entry(to_vmx(vcpu), MSR_EFER)->data |= EFER_LMA | EFER_LME; | 1111 | find_msr_entry(to_vmx(vcpu), MSR_EFER)->data |= EFER_LMA | EFER_LME; |
1112 | vmcs_write32(VM_ENTRY_CONTROLS, | 1112 | vmcs_write32(VM_ENTRY_CONTROLS, |
1113 | vmcs_read32(VM_ENTRY_CONTROLS) | 1113 | vmcs_read32(VM_ENTRY_CONTROLS) |
1114 | | VM_ENTRY_CONTROLS_IA32E_MASK); | 1114 | | VM_ENTRY_IA32E_MODE); |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | static void exit_lmode(struct kvm_vcpu *vcpu) | 1117 | static void exit_lmode(struct kvm_vcpu *vcpu) |
@@ -1120,7 +1120,7 @@ static void exit_lmode(struct kvm_vcpu *vcpu) | |||
1120 | 1120 | ||
1121 | vmcs_write32(VM_ENTRY_CONTROLS, | 1121 | vmcs_write32(VM_ENTRY_CONTROLS, |
1122 | vmcs_read32(VM_ENTRY_CONTROLS) | 1122 | vmcs_read32(VM_ENTRY_CONTROLS) |
1123 | & ~VM_ENTRY_CONTROLS_IA32E_MASK); | 1123 | & ~VM_ENTRY_IA32E_MODE); |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | #endif | 1126 | #endif |
@@ -1185,13 +1185,13 @@ static void vmx_set_efer(struct kvm_vcpu *vcpu, u64 efer) | |||
1185 | if (efer & EFER_LMA) { | 1185 | if (efer & EFER_LMA) { |
1186 | vmcs_write32(VM_ENTRY_CONTROLS, | 1186 | vmcs_write32(VM_ENTRY_CONTROLS, |
1187 | vmcs_read32(VM_ENTRY_CONTROLS) | | 1187 | vmcs_read32(VM_ENTRY_CONTROLS) | |
1188 | VM_ENTRY_CONTROLS_IA32E_MASK); | 1188 | VM_ENTRY_IA32E_MODE); |
1189 | msr->data = efer; | 1189 | msr->data = efer; |
1190 | 1190 | ||
1191 | } else { | 1191 | } else { |
1192 | vmcs_write32(VM_ENTRY_CONTROLS, | 1192 | vmcs_write32(VM_ENTRY_CONTROLS, |
1193 | vmcs_read32(VM_ENTRY_CONTROLS) & | 1193 | vmcs_read32(VM_ENTRY_CONTROLS) & |
1194 | ~VM_ENTRY_CONTROLS_IA32E_MASK); | 1194 | ~VM_ENTRY_IA32E_MODE); |
1195 | 1195 | ||
1196 | msr->data = efer & ~EFER_LME; | 1196 | msr->data = efer & ~EFER_LME; |
1197 | } | 1197 | } |
diff --git a/drivers/kvm/vmx.h b/drivers/kvm/vmx.h index 7e4dc1208dd4..35d0b58c0a0b 100644 --- a/drivers/kvm/vmx.h +++ b/drivers/kvm/vmx.h | |||
@@ -268,9 +268,6 @@ enum vmcs_field { | |||
268 | /* segment AR */ | 268 | /* segment AR */ |
269 | #define SEGMENT_AR_L_MASK (1 << 13) | 269 | #define SEGMENT_AR_L_MASK (1 << 13) |
270 | 270 | ||
271 | /* entry controls */ | ||
272 | #define VM_ENTRY_CONTROLS_IA32E_MASK (1 << 9) | ||
273 | |||
274 | #define AR_TYPE_ACCESSES_MASK 1 | 271 | #define AR_TYPE_ACCESSES_MASK 1 |
275 | #define AR_TYPE_READABLE_MASK (1 << 1) | 272 | #define AR_TYPE_READABLE_MASK (1 << 1) |
276 | #define AR_TYPE_WRITEABLE_MASK (1 << 2) | 273 | #define AR_TYPE_WRITEABLE_MASK (1 << 2) |