KVM: VMX: Write VPID to vmcs when creating vcpu
authorXiaoyao Li <xiaoyao.li@intel.com>
Sun, 20 Oct 2019 09:10:58 +0000 (17:10 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 22 Oct 2019 11:40:57 +0000 (13:40 +0200)
commit35fbe0d4ef9abb05a8c591481d0196edcb056bcc
tree8e2f06c131301599131fd9bcc67fb8f139418497
parent4be946728f65c10c9bb1a1580ec47a316f5ee6ac
KVM: VMX: Write VPID to vmcs when creating vcpu

Move the code that writes vmx->vpid to vmcs from vmx_vcpu_reset() to
vmx_vcpu_setup(), because vmx->vpid is allocated when creating vcpu and
never changed. So we don't need to update the vmcs.vpid when resetting
vcpu.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c