Re: [PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-05-05 Thread Vivek Goyal
On Wed, Apr 29, 2020 at 12:53:33PM +0200, Paolo Bonzini wrote: > On 29/04/20 11:36, Vitaly Kuznetsov wrote: > > + > > + if (__this_cpu_read(apf_reason.enabled)) { > > + reason = __this_cpu_read(apf_reason.reason); > > + if (reason == KVM_PV_REASON_PAGE_READY) { > > +

Re: [PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-05-04 Thread Gavin Shan
Hi Vitaly, On 4/29/20 7:36 PM, Vitaly Kuznetsov wrote: KVM now supports using interrupt for type 2 APF event delivery (page ready notifications). Switch KVM guests to using it when the feature is present. Signed-off-by: Vitaly Kuznetsov --- arch/x86/entry/entry_32.S | 5 arch

Re: [PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-04-29 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 29/04/20 14:44, Vitaly Kuznetsov wrote: + token = __this_cpu_read(apf_reason.token); + /* + * Make sure we read 'token' before we reset + * 'reason' or it can get lost. +

Re: [PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-04-29 Thread Paolo Bonzini
On 29/04/20 14:44, Vitaly Kuznetsov wrote: >>> + token = __this_cpu_read(apf_reason.token); >>> + /* >>> +* Make sure we read 'token' before we reset >>> +* 'reason' or it can get lost. >>> +*/ >>> +

Re: [PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-04-29 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 29/04/20 11:36, Vitaly Kuznetsov wrote: >> + >> +if (__this_cpu_read(apf_reason.enabled)) { >> +reason = __this_cpu_read(apf_reason.reason); >> +if (reason == KVM_PV_REASON_PAGE_READY) { >> +token = __this_cpu_read(apf_rea

Re: [PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-04-29 Thread Paolo Bonzini
On 29/04/20 11:36, Vitaly Kuznetsov wrote: > + > + if (__this_cpu_read(apf_reason.enabled)) { > + reason = __this_cpu_read(apf_reason.reason); > + if (reason == KVM_PV_REASON_PAGE_READY) { > + token = __this_cpu_read(apf_reason.token); > +

[PATCH RFC 6/6] KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery

2020-04-29 Thread Vitaly Kuznetsov
KVM now supports using interrupt for type 2 APF event delivery (page ready notifications). Switch KVM guests to using it when the feature is present. Signed-off-by: Vitaly Kuznetsov --- arch/x86/entry/entry_32.S | 5 arch/x86/entry/entry_64.S | 5 arch/x86/include/a