|
@@ -122,7 +122,7 @@ module_param_named(preemption_timer, enable_preemption_timer, bool, S_IRUGO);
|
|
(KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST | X86_CR0_PG | X86_CR0_PE)
|
|
(KVM_VM_CR0_ALWAYS_ON_UNRESTRICTED_GUEST | X86_CR0_PG | X86_CR0_PE)
|
|
#define KVM_CR4_GUEST_OWNED_BITS \
|
|
#define KVM_CR4_GUEST_OWNED_BITS \
|
|
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
|
|
(X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \
|
|
- | X86_CR4_OSXMMEXCPT | X86_CR4_TSD)
|
|
|
|
|
|
+ | X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_TSD)
|
|
|
|
|
|
#define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE)
|
|
#define KVM_PMODE_VM_CR4_ALWAYS_ON (X86_CR4_PAE | X86_CR4_VMXE)
|
|
#define KVM_RMODE_VM_CR4_ALWAYS_ON (X86_CR4_VME | X86_CR4_PAE | X86_CR4_VMXE)
|
|
#define KVM_RMODE_VM_CR4_ALWAYS_ON (X86_CR4_VME | X86_CR4_PAE | X86_CR4_VMXE)
|
|
@@ -3374,7 +3374,7 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
|
(!msr_info->host_initiated &&
|
|
(!msr_info->host_initiated &&
|
|
!guest_cpuid_has(vcpu, X86_FEATURE_MPX)))
|
|
!guest_cpuid_has(vcpu, X86_FEATURE_MPX)))
|
|
return 1;
|
|
return 1;
|
|
- if (is_noncanonical_address(data & PAGE_MASK) ||
|
|
|
|
|
|
+ if (is_noncanonical_address(data & PAGE_MASK, vcpu) ||
|
|
(data & MSR_IA32_BNDCFGS_RSVD))
|
|
(data & MSR_IA32_BNDCFGS_RSVD))
|
|
return 1;
|
|
return 1;
|
|
vmcs_write64(GUEST_BNDCFGS, data);
|
|
vmcs_write64(GUEST_BNDCFGS, data);
|
|
@@ -7143,7 +7143,7 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
|
|
* non-canonical form. This is the only check on the memory
|
|
* non-canonical form. This is the only check on the memory
|
|
* destination for long mode!
|
|
* destination for long mode!
|
|
*/
|
|
*/
|
|
- exn = is_noncanonical_address(*ret);
|
|
|
|
|
|
+ exn = is_noncanonical_address(*ret, vcpu);
|
|
} else if (is_protmode(vcpu)) {
|
|
} else if (is_protmode(vcpu)) {
|
|
/* Protected mode: apply checks for segment validity in the
|
|
/* Protected mode: apply checks for segment validity in the
|
|
* following order:
|
|
* following order:
|
|
@@ -7948,7 +7948,7 @@ static int handle_invvpid(struct kvm_vcpu *vcpu)
|
|
|
|
|
|
switch (type) {
|
|
switch (type) {
|
|
case VMX_VPID_EXTENT_INDIVIDUAL_ADDR:
|
|
case VMX_VPID_EXTENT_INDIVIDUAL_ADDR:
|
|
- if (is_noncanonical_address(operand.gla)) {
|
|
|
|
|
|
+ if (is_noncanonical_address(operand.gla, vcpu)) {
|
|
nested_vmx_failValid(vcpu,
|
|
nested_vmx_failValid(vcpu,
|
|
VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
|
|
VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
|
|
return kvm_skip_emulated_instruction(vcpu);
|
|
return kvm_skip_emulated_instruction(vcpu);
|