From: Vivek Goyal <vgoyal@redhat.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
virtio-fs@redhat.com, miklos@szeredi.hu, stefanha@redhat.com,
dgilbert@redhat.com, pbonzini@redhat.com, wanpengli@tencent.com,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] kvm: Add capability to be able to report async pf error to guest
Date: Thu, 18 Jun 2020 08:47:00 -0400 [thread overview]
Message-ID: <20200618124700.GA3814@redhat.com> (raw)
In-Reply-To: <20200617230548.GC27751@linux.intel.com>
On Wed, Jun 17, 2020 at 04:05:48PM -0700, Sean Christopherson wrote:
> 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.
Ok, may be. But what is that thing which you want to filter out. Just
creating a framework for filtering selective regions without any specific
use case is hard.
Right now we have one switch to enable/disable error reporting and
this can be turned off both at qemu level as well as guest level.
If the desire is that this needs to me more finer grained, I need
to have some examples which show that in these cases we don't want
to report page fault errors.
Anyway, it seems that atleast first patch is less contentious and
can be relatively easily be done. That is exit to user space if
page fault error happens instead of getting into an infinite loop.
I will post that separately.
Thanks
Vivek
next prev parent reply other threads:[~2020-06-18 12:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 21:48 [RFC PATCH 0/3] kvm,x86: Improve kvm page fault error handling Vivek Goyal
2020-06-16 21:48 ` [PATCH 1/3] kvm,x86: Force sync fault if previous attempts failed Vivek Goyal
2020-06-17 13:02 ` Vitaly Kuznetsov
2020-06-17 19:58 ` Vivek Goyal
2020-06-16 21:48 ` [PATCH 2/3] kvm: Add capability to be able to report async pf error to guest Vivek Goyal
2020-06-17 13:12 ` Vitaly Kuznetsov
2020-06-17 18:32 ` Sean Christopherson
2020-06-17 21:51 ` Vivek Goyal
2020-06-17 23:00 ` Sean Christopherson
2020-06-17 23:05 ` Sean Christopherson
2020-06-18 12:47 ` Vivek Goyal [this message]
2020-06-17 20:33 ` Vivek Goyal
2020-06-16 21:48 ` [PATCH 3/3] kvm, async_pf: Use FOLL_WRITE only for write faults Vivek Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200618124700.GA3814@redhat.com \
--to=vgoyal@redhat.com \
--cc=dgilbert@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=stefanha@redhat.com \
--cc=virtio-fs@redhat.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).