]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: Set last_vmentry_cpu in vcpu_enter_guest
authorJim Mattson <jmattson@google.com>
Wed, 3 Jun 2020 23:56:23 +0000 (16:56 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jul 2020 20:21:46 +0000 (16:21 -0400)
commit311f70f0b7c8a8844cd5c54bc857c0a5c7eb5025
tree6837d8bc9eca8681cd7c10343d6b7f0d89b16bcd
parenta74844c129d58821e9f1c1197abe3d3b341f6640
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>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c