kvm.c (56dd9470d7c8734f055da2a6bac553caf4a468eb) kvm.c (6c1e0256fad84a843d915414e4b5973b7443d48d)
1/*
2 * KVM paravirt_ops implementation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 240 unchanged lines hidden (view full) ---

249
250 return reason;
251}
252EXPORT_SYMBOL_GPL(kvm_read_and_reset_pf_reason);
253
254dotraplinkage void __kprobes
255do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
256{
1/*
2 * KVM paravirt_ops implementation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 240 unchanged lines hidden (view full) ---

249
250 return reason;
251}
252EXPORT_SYMBOL_GPL(kvm_read_and_reset_pf_reason);
253
254dotraplinkage void __kprobes
255do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
256{
257 enum ctx_state prev_state;
258
257 switch (kvm_read_and_reset_pf_reason()) {
258 default:
259 do_page_fault(regs, error_code);
260 break;
261 case KVM_PV_REASON_PAGE_NOT_PRESENT:
262 /* page is swapped out by the host. */
259 switch (kvm_read_and_reset_pf_reason()) {
260 default:
261 do_page_fault(regs, error_code);
262 break;
263 case KVM_PV_REASON_PAGE_NOT_PRESENT:
264 /* page is swapped out by the host. */
263 exception_enter(regs);
265 prev_state = exception_enter();
264 exit_idle();
265 kvm_async_pf_task_wait((u32)read_cr2());
266 exit_idle();
267 kvm_async_pf_task_wait((u32)read_cr2());
266 exception_exit(regs);
268 exception_exit(prev_state);
267 break;
268 case KVM_PV_REASON_PAGE_READY:
269 rcu_irq_enter();
270 exit_idle();
271 kvm_async_pf_task_wake((u32)read_cr2());
272 rcu_irq_exit();
273 break;
274 }

--- 249 unchanged lines hidden ---
269 break;
270 case KVM_PV_REASON_PAGE_READY:
271 rcu_irq_enter();
272 exit_idle();
273 kvm_async_pf_task_wake((u32)read_cr2());
274 rcu_irq_exit();
275 break;
276 }

--- 249 unchanged lines hidden ---