Re: [PATCH v3] kvm,x86: Exit to user space in case of page fault error

2020-07-20 Thread Vivek Goyal
On Fri, Jul 17, 2020 at 12:14:00PM +0200, Vitaly Kuznetsov wrote: [..] > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > > index 6d6a0ae7800c..a0e6283e872d 100644 > > --- a/arch/x86/kvm/mmu/mmu.c > > +++ b/arch/x86/kvm/mmu/mmu.c > > @@ -4078,7 +4078,7 @@ static bool

Re: [PATCH v3] kvm,x86: Exit to user space in case of page fault error

2020-07-17 Thread Vitaly Kuznetsov
Vivek Goyal writes: > Page fault error handling behavior in kvm seems little inconsistent when > page fault reports error. If we are doing fault synchronously > then we capture error (-EFAULT) returned by __gfn_to_pfn_memslot() and > exit to user space and qemu reports error, "error: kvm run

Re: [PATCH v3] kvm,x86: Exit to user space in case of page fault error

2020-07-15 Thread Vivek Goyal
On Thu, Jul 09, 2020 at 08:54:42AM -0400, Vivek Goyal wrote: > Page fault error handling behavior in kvm seems little inconsistent when > page fault reports error. If we are doing fault synchronously > then we capture error (-EFAULT) returned by __gfn_to_pfn_memslot() and > exit to user space and

[PATCH v3] kvm,x86: Exit to user space in case of page fault error

2020-07-09 Thread Vivek Goyal
Page fault error handling behavior in kvm seems little inconsistent when page fault reports error. If we are doing fault synchronously then we capture error (-EFAULT) returned by __gfn_to_pfn_memslot() and exit to user space and qemu reports error, "error: kvm run failed Bad address". But if we