linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Peter Xu <peterx@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	David Hildenbrand <david@redhat.com>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Linux MM Mailing List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>
Subject: Re: [PATCH v2 3/3] kvm/x86: Allow to respond to generic signals during slow page faults
Date: Mon, 15 Aug 2022 21:26:37 +0000	[thread overview]
Message-ID: <Yvq6DSu4wmPfXO5/@google.com> (raw)
In-Reply-To: <YvVtX+rosTLxFPe3@xz-m1.local>

On Thu, Aug 11, 2022, Peter Xu wrote:
> On Thu, Aug 11, 2022 at 08:12:38PM +0000, Sean Christopherson wrote:
> > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> > > index 17252f39bd7c..aeafe0e9cfbf 100644
> > > --- a/arch/x86/kvm/mmu/mmu.c
> > > +++ b/arch/x86/kvm/mmu/mmu.c
> > > @@ -3012,6 +3012,13 @@ static int kvm_handle_bad_page(struct kvm_vcpu *vcpu, gfn_t gfn, kvm_pfn_t pfn)
> > >  static int handle_abnormal_pfn(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
> > >  			       unsigned int access)
> > >  {
> > > +	/* NOTE: not all error pfn is fatal; handle sigpending pfn first */
> > > +	if (unlikely(is_sigpending_pfn(fault->pfn))) {
> > 
> > Move this into kvm_handle_bad_page(), then there's no need for a comment to call
> > out that this needs to come before the is_error_pfn() check.  This _is_ a "bad"
> > PFN, it just so happens that userspace might be able to resolve the "bad" PFN.
> 
> It's a pity it needs to be in "bad pfn" category since that's the only
> thing we can easily use, but true it is now.

Would renaming that to kvm_handle_error_pfn() help?  I agree that "bad" is poor
terminology now that it handles a variety of errors, hence the quotes.


  reply	other threads:[~2022-08-15 21:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21  0:03 [PATCH v2 0/3] kvm/mm: Allow GUP to respond to non fatal signals Peter Xu
2022-07-21  0:03 ` [PATCH v2 1/3] mm/gup: Add FOLL_INTERRUPTIBLE Peter Xu
2022-07-21  7:55   ` David Hildenbrand
2022-08-17  0:33   ` Peter Xu
2022-07-21  0:03 ` [PATCH v2 2/3] kvm: Add new pfn error KVM_PFN_ERR_SIGPENDING Peter Xu
2022-08-11 19:41   ` Sean Christopherson
2022-07-21  0:03 ` [PATCH v2 3/3] kvm/x86: Allow to respond to generic signals during slow page faults Peter Xu
2022-08-11 20:12   ` Sean Christopherson
2022-08-11 20:58     ` Peter Xu
2022-08-15 21:26       ` Sean Christopherson [this message]
2022-08-16 20:47         ` Peter Xu
2022-08-16 22:51           ` David Matlack
2022-08-17  0:31             ` Peter Xu
2022-08-10 19:38 ` [PATCH v2 0/3] kvm/mm: Allow GUP to respond to non fatal signals Peter Xu

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=Yvq6DSu4wmPfXO5/@google.com \
    --to=seanjc@google.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.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