[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2020 11:54:14 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Gavin Shan <gshan@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>, x86@...nel.org,
kvm@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH RFC 4/6] KVM: x86: acknowledgment mechanism for async pf
page ready notifications
On 05/05/20 10:51, Gavin Shan wrote:
>> How does the guest know if host has any pending events or not?
>
> One way would be through struct kvm_vcpu_pv_apf_data, which is visible
> to host and guest. In the host, the workers that have completed their
> work (GUP) are queued into vcpu->async_pf.done. So we need a bit in
> struct kvm_vcpu_pv_apf_data, written by host while read by guest to
> see if there pending work. I even don't think the writer/reader need
> to be synchronized.
No, this cannot work. The problem is that you need a way to tell the
host "you can give me another ready page", and a memory location is not
enough for that.
Paolo
Powered by blists - more mailing lists