Re: [PATCH 2/3] kvm: Add capability to be able to report async pf error to guest

From: Sean Christopherson
Date: Wed Jun 17 2020 - 19:05:51 EST


On Wed, Jun 17, 2020 at 04:00:52PM -0700, Sean Christopherson wrote:
> On Wed, Jun 17, 2020 at 05:51:52PM -0400, Vivek Goyal wrote:
> What I'm saying is that KVM cannot do the filtering. KVM, by design, does
> not know what lies behind any given hva, or what the associated gpa maps to
> in the guest. As is, userspace can't even opt out of this behavior, e.g.
> it can't even "filter" on a per-VM granularity, since kvm_pv_enable_async_pf()
> unconditionally allows the guest to enable the behavior[*].

Let me rephrase that slightly. KVM can do the filtering, but it cannot make
the decision on what to filter. E.g. if the use case is compatible with doing
this at a memslot level, then a memslot flag could be added to control the
behavior.