Re: [PATCH v2 06/10] KVM: x86: acknowledgment mechanism for async pf page ready notifications

2020-05-28 Thread Paolo Bonzini
On 28/05/20 13:39, Vitaly Kuznetsov wrote: >> How is the pageready_pending flag migrated? Should we revert the >> direction of the MSR (i.e. read the flag, and write 0 to clear it)? > The flag is not migrated so it will be 'false'. This can just cause an > extra kick in

Re: [PATCH v2 06/10] KVM: x86: acknowledgment mechanism for async pf page ready notifications

2020-05-28 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 25/05/20 16:41, Vitaly Kuznetsov wrote: >> +case MSR_KVM_ASYNC_PF_ACK: >> +if (data & 0x1) { >> +vcpu->arch.apf.pageready_pending = false; >> +kvm_check_async_pf_completion(vcpu); >> +} >> +

Re: [PATCH v2 06/10] KVM: x86: acknowledgment mechanism for async pf page ready notifications

2020-05-28 Thread Paolo Bonzini
On 25/05/20 16:41, Vitaly Kuznetsov wrote: > + case MSR_KVM_ASYNC_PF_ACK: > + if (data & 0x1) { > + vcpu->arch.apf.pageready_pending = false; > + kvm_check_async_pf_completion(vcpu); > + } > + break; > case

[PATCH v2 06/10] KVM: x86: acknowledgment mechanism for async pf page ready notifications

2020-05-25 Thread Vitaly Kuznetsov
If two page ready notifications happen back to back the second one is not delivered and the only mechanism we currently have is kvm_check_async_pf_completion() check in vcpu_run() loop. The check will only be performed with the next vmexit when it happens and in some cases it may take a while.