Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-14 Thread Vivek Goyal
On Thu, May 14, 2020 at 10:08:37AM +0200, Vitaly Kuznetsov wrote: > Vivek Goyal writes: > > > On Wed, May 13, 2020 at 04:23:55PM +0200, Vitaly Kuznetsov wrote: > > > > [..] > >> >> Also, > >> >> kdump kernel may not even support APF so it will get very confused when > >> >> APF events get deliver

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-14 Thread Vitaly Kuznetsov
Vivek Goyal writes: > On Wed, May 13, 2020 at 04:23:55PM +0200, Vitaly Kuznetsov wrote: > > [..] >> >> Also, >> >> kdump kernel may not even support APF so it will get very confused when >> >> APF events get delivered. >> > >> > New kernel can just ignore these events if it does not support async

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-13 Thread Vivek Goyal
On Wed, May 13, 2020 at 04:23:55PM +0200, Vitaly Kuznetsov wrote: [..] > >> Also, > >> kdump kernel may not even support APF so it will get very confused when > >> APF events get delivered. > > > > New kernel can just ignore these events if it does not support async > > pf? > > > > This is somewh

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-13 Thread Vitaly Kuznetsov
Vivek Goyal writes: > On Wed, May 13, 2020 at 11:03:48AM +0200, Vitaly Kuznetsov wrote: >> Vivek Goyal writes: >> >> > On Tue, May 12, 2020 at 05:50:53PM +0200, Vitaly Kuznetsov wrote: >> >> Vivek Goyal writes: >> >> >> >> > >> >> > So if we are using a common structure "kvm_vcpu_pv_apf_data"

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-13 Thread Vivek Goyal
On Wed, May 13, 2020 at 09:53:50AM -0400, Vivek Goyal wrote: [..] > > > And this notion of same structure being shared across multiple events > > > at the same time is just going to create more confusion, IMHO. If we > > > can decouple it by serializing it, that definitely feels simpler to > > > u

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-13 Thread Vivek Goyal
On Wed, May 13, 2020 at 11:03:48AM +0200, Vitaly Kuznetsov wrote: > Vivek Goyal writes: > > > On Tue, May 12, 2020 at 05:50:53PM +0200, Vitaly Kuznetsov wrote: > >> Vivek Goyal writes: > >> > >> > > >> > So if we are using a common structure "kvm_vcpu_pv_apf_data" to deliver > >> > type1 and ty

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-13 Thread Vitaly Kuznetsov
Vivek Goyal writes: > On Tue, May 12, 2020 at 05:50:53PM +0200, Vitaly Kuznetsov wrote: >> Vivek Goyal writes: >> >> > >> > So if we are using a common structure "kvm_vcpu_pv_apf_data" to deliver >> > type1 and type2 events, to me it makes sense to retain existing >> > KVM_PV_REASON_PAGE_READY

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-12 Thread Vivek Goyal
On Tue, May 12, 2020 at 05:50:53PM +0200, Vitaly Kuznetsov wrote: > Vivek Goyal writes: > > > On Mon, May 11, 2020 at 06:47:48PM +0200, Vitaly Kuznetsov wrote: > >> Concerns were expressed around APF delivery via synthetic #PF exception as > >> in some cases such delivery may collide with real pa

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-12 Thread Vitaly Kuznetsov
Vivek Goyal writes: > On Mon, May 11, 2020 at 06:47:48PM +0200, Vitaly Kuznetsov wrote: >> Concerns were expressed around APF delivery via synthetic #PF exception as >> in some cases such delivery may collide with real page fault. For type 2 >> (page ready) notifications we can easily switch to u

Re: [PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-12 Thread Vivek Goyal
On Mon, May 11, 2020 at 06:47:48PM +0200, Vitaly Kuznetsov wrote: > Concerns were expressed around APF delivery via synthetic #PF exception as > in some cases such delivery may collide with real page fault. For type 2 > (page ready) notifications we can easily switch to using an interrupt > instead

[PATCH 4/8] KVM: x86: interrupt based APF page-ready event delivery

2020-05-11 Thread Vitaly Kuznetsov
Concerns were expressed around APF delivery via synthetic #PF exception as in some cases such delivery may collide with real page fault. For type 2 (page ready) notifications we can easily switch to using an interrupt instead. Introduce new MSR_KVM_ASYNC_PF_INT mechanism and deprecate the legacy on