summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-11-11 02:07:31 +0000
committerPeter Zijlstra <peterz@infradead.org>2021-11-17 14:49:09 +0100
commit73cd107b9685c5308e864061772e4a78a629e4a0 (patch)
tree2bbab62a6e54c2e06356ea98f1828d37eb914e59 /lib/debugobjects.c
parent87b940a0675e25261f022ac3e53e0dfff9cdb995 (diff)
KVM: x86: Drop current_vcpu for kvm_running_vcpu + kvm_arch_vcpu variable
Use the generic kvm_running_vcpu plus a new 'handling_intr_from_guest' variable in kvm_arch_vcpu instead of the semi-redundant current_vcpu. kvm_before/after_interrupt() must be called while the vCPU is loaded, (which protects against preemption), thus kvm_running_vcpu is guaranteed to be non-NULL when handling_intr_from_guest is non-zero. Switching to kvm_get_running_vcpu() will allows moving KVM's perf callbacks to generic code, and the new flag will be used in a future patch to more precisely identify the "NMI from guest" case. Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Link: https://lore.kernel.org/r/20211111020738.2512932-11-seanjc@google.com
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions