Skip to content

Commit b9757a4

Browse files
Chenyi Qiangbonzini
authored andcommitted
KVM: nVMX: Simplify the initialization of nested_vmx_msrs
The nested VMX controls MSRs can be initialized by the global capability values stored in vmcs_config. Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com> Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com> Message-Id: <20200828085622.8365-6-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent efc8313 commit b9757a4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎arch/x86/kvm/vmx/vmx.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7016,8 +7016,7 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
70167016
}
70177017

70187018
if (nested)
7019-
nested_vmx_setup_ctls_msrs(&vmx->nested.msrs,
7020-
vmx_capability.ept);
7019+
memcpy(&vmx->nested.msrs, &vmcs_config.nested, sizeof(vmx->nested.msrs));
70217020
else
70227021
memset(&vmx->nested.msrs, 0, sizeof(vmx->nested.msrs));
70237022

0 commit comments

Comments
 (0)