Skip to content

Commit 50cc02e

Browse files
Frederic WeisbeckerIngo Molnar
authored andcommitted
x86/context-tracking: Remove exception_enter/exit() from KVM_PV_REASON_PAGE_NOT_PRESENT async page fault
This is a leftover. Page faults, just like most other exceptions, are protected inside user_exit() / user_enter() calls in x86 entry code when we fault from userspace. So this pair of calls is now superfluous. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Jim Mattson <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Radim Krčmář <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vitaly Kuznetsov <[email protected]> Cc: Wanpeng Li <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent ee6352b commit 50cc02e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/x86/kernel/kvm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,13 @@ NOKPROBE_SYMBOL(kvm_read_and_reset_pf_reason);
245245
dotraplinkage void
246246
do_async_page_fault(struct pt_regs *regs, unsigned long error_code, unsigned long address)
247247
{
248-
enum ctx_state prev_state;
249-
250248
switch (kvm_read_and_reset_pf_reason()) {
251249
default:
252250
do_page_fault(regs, error_code, address);
253251
break;
254252
case KVM_PV_REASON_PAGE_NOT_PRESENT:
255253
/* page is swapped out by the host. */
256-
prev_state = exception_enter();
257254
kvm_async_pf_task_wait((u32)address, !user_mode(regs));
258-
exception_exit(prev_state);
259255
break;
260256
case KVM_PV_REASON_PAGE_READY:
261257
rcu_irq_enter();

0 commit comments

Comments
 (0)