> On 13 May 2019, at 18:15, Peter Zijlstra <pet...@infradead.org> wrote: > > On Mon, May 13, 2019 at 04:38:32PM +0200, Alexandre Chartre wrote: >> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c >> index 46df4c6..317e105 100644 >> --- a/arch/x86/mm/fault.c >> +++ b/arch/x86/mm/fault.c >> @@ -33,6 +33,10 @@ >> #define CREATE_TRACE_POINTS >> #include <asm/trace/exceptions.h> >> >> +bool (*kvm_page_fault_handler)(struct pt_regs *regs, unsigned long >> error_code, >> + unsigned long address); >> +EXPORT_SYMBOL(kvm_page_fault_handler); > > NAK NAK NAK NAK > > This is one of the biggest anti-patterns around. I agree. I think that mm should expose a mm_set_kvm_page_fault_handler() or something (give it a better name). Similar to how arch/x86/kernel/irq.c have kvm_set_posted_intr_wakeup_handler(). -Liran
- Re: [RFC KVM 18/27] kvm/isolation: function to copy... Andy Lutomirski
- Re: [RFC KVM 18/27] kvm/isolation: function to ... Peter Zijlstra
- Re: [RFC KVM 18/27] kvm/isolation: function... Alexandre Chartre
- Re: [RFC KVM 18/27] kvm/isolation: func... Andy Lutomirski
- Re: [RFC KVM 18/27] kvm/isolation:... Alexandre Chartre
- Re: [RFC KVM 18/27] kvm/isolat... Andy Lutomirski
- [RFC KVM 17/27] kvm/isolation: improve mapping copy when... Alexandre Chartre
- [RFC KVM 14/27] kvm/isolation: functions to copy page ta... Alexandre Chartre
- [RFC KVM 24/27] kvm/isolation: KVM page fault handler Alexandre Chartre
- Re: [RFC KVM 24/27] kvm/isolation: KVM page fault h... Peter Zijlstra
- Re: [RFC KVM 24/27] kvm/isolation: KVM page fau... Liran Alon
- Re: [RFC KVM 24/27] kvm/isolation: KVM page... Andy Lutomirski
- Re: [RFC KVM 24/27] kvm/isolation: KVM ... Peter Zijlstra
- Re: [RFC KVM 24/27] kvm/isolation:... Alexandre Chartre
- Re: [RFC KVM 24/27] kvm/isolat... Andy Lutomirski
- Re: [RFC KVM 24/27] kvm/isolation: KVM page fault h... Andy Lutomirski
- Re: [RFC KVM 24/27] kvm/isolation: KVM page fau... Alexandre Chartre
- [RFC KVM 23/27] kvm/isolation: initialize the KVM page t... Alexandre Chartre
- [RFC KVM 26/27] kvm/isolation: initialize the KVM page t... Alexandre Chartre
- [RFC KVM 05/27] KVM: x86: Add handler to exit kvm isolat... Alexandre Chartre
- Re: [RFC KVM 05/27] KVM: x86: Add handler to exit k... Andy Lutomirski