summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-07-08 21:51:54 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-07-09 07:08:38 -0400
commit87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc (patch)
tree379a0801cbf4a7494cbbe2e469ca71b110315193 /arch/x86/kvm/x86.c
parent841c2be09fe4f495fe5224952a419bd8c7e5b455 (diff)
downloadlinux-stable-87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc.tar.gz
linux-stable-87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc.tar.bz2
linux-stable-87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc.zip
x86/kvm: Move context tracking where it belongs
Context tracking for KVM happens way too early in the vcpu_run() code. Anything after guest_enter_irqoff() and before guest_exit_irqoff() cannot use RCU and should also be not instrumented. The current way of doing this covers way too much code. Move it closer to the actual vmenter/exit code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200708195321.724574345@linutronix.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 7f32169e8449..d7d82b3c0e4c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8522,7 +8522,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
}
trace_kvm_entry(vcpu->vcpu_id);
- guest_enter_irqoff();
fpregs_assert_state_consistent();
if (test_thread_flag(TIF_NEED_FPU_LOAD))
@@ -8585,7 +8584,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
local_irq_disable();
kvm_after_interrupt(vcpu);
- guest_exit_irqoff();
if (lapic_in_kernel(vcpu)) {
s64 delta = vcpu->arch.apic->lapic_timer.advance_expire_delta;
if (delta != S64_MIN) {