Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | From | Chenyi Qiang <> | Subject | [PATCH 5/5] KVM: nVMX: Simplify the initialization of nested_vmx_msrs | Date | Fri, 28 Aug 2020 16:56:22 +0800 |
| |
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> --- arch/x86/kvm/vmx/vmx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index f9664ccc003b..0c36cd664222 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -7019,8 +7019,7 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu) } if (nested) - nested_vmx_setup_ctls_msrs(&vmx->nested.msrs, - vmx_capability.ept); + memcpy(&vmx->nested.msrs, &vmcs_config.nested, sizeof(vmx->nested.msrs)); else memset(&vmx->nested.msrs, 0, sizeof(vmx->nested.msrs)); -- 2.17.1
| ![\](/images/icornerr.gif) |