diff options
author | Jim Mattson <jmattson@google.com> | 2020-06-04 01:56:23 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-08 22:21:46 +0200 |
commit | c967118ddb21191178c0e0080fdc41f5d85ca1d1 (patch) | |
tree | 6837d8bc9eca8681cd7c10343d6b7f0d89b16bcd /arch/x86/kvm/vmx | |
parent | kvm: x86: Move last_cpu into kvm_vcpu_arch as last_vmentry_cpu (diff) | |
download | linux-c967118ddb21191178c0e0080fdc41f5d85ca1d1.tar.xz linux-c967118ddb21191178c0e0080fdc41f5d85ca1d1.zip |
kvm: x86: Set last_vmentry_cpu in vcpu_enter_guest
Since this field is now in kvm_vcpu_arch, clean things up a little by
setting it in vendor-agnostic code: vcpu_enter_guest. Note that it
must be set after the call to kvm_x86_ops.run(), since it can't be
updated before pre_sev_run().
Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Message-Id: <20200603235623.245638-7-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index d9ee31b0679b..1de5dac952b6 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -6740,7 +6740,6 @@ reenter_guest: if (vcpu->arch.cr2 != read_cr2()) write_cr2(vcpu->arch.cr2); - vcpu->arch.last_vmentry_cpu = vcpu->cpu; vmx->fail = __vmx_vcpu_run(vmx, (unsigned long *)&vcpu->arch.regs, vmx->loaded_vmcs->launched); |