public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v4 1/5] KVM: MMU: fix release noslot pfn
Date: Sun, 14 Oct 2012 13:36:16 -0300	[thread overview]
Message-ID: <20121014163615.GA29071@amt.cnet> (raw)
In-Reply-To: <5077E7AA.9070705@gmail.com>

On Fri, Oct 12, 2012 at 05:49:30PM +0800, Xiao Guangrong wrote:
> On 10/11/2012 10:31 PM, Marcelo Tosatti wrote:
> > On Thu, Oct 11, 2012 at 09:06:12PM +0800, Xiao Guangrong wrote:
> >> On 10/10/2012 11:11 PM, Marcelo Tosatti wrote:
> >>
> >>>
> >>> Why does is_error_pfn() return true for mmio spte? Its not an "error",
> >>> after all. 
> >>>
> >>> Please kill is_invalid_pfn and use
> >>>
> >>> -> is_error_pfn for checking for errors (mmio spte is not an error pfn,
> >>> its a special pfn)
> >>>
> >>> -> add explicit is_noslot_pfn checks where necessary in the code
> >>> (say to avoid interpreting a noslot_pfn's pfn "address" bits).
> >>>
> >>> (should have noticed this earlier, sorry).
> >>
> >> Never mind, your comments are always appreciated! ;)
> >>
> >> Marcelo, is it good to you?
> >> (will post it after your check and full test)
> > 
> > Yes, this works (please check the validity of each case in addition to
> > testing, haven't done it).
> > 
> > Also add a oneline comment on top of each
> > is_error_pfn,is_noslot_pfn,is_error_noslot_pfn
> > 
> > /* is_noslot_pfn: userspace translation valid but no memory slot */
> > /* is_error_pfn: ... */
> > 
> > etc.
> > 
> 
> Marcelo, i think this fix should be backport and your idea can be a
> separate patchset. Yes?

The current invalid/is_error/noslot_pfn separation is confusing, leading 
to one immediate bug and IMO more future bugs.

The proposed patch you sent is quite small, why is it troublesome to
backport? (and i am just asking one line of comment, summing to 3 total
of lines of comments).

Can't see the advantage of a special easily backportable fix?


  reply	other threads:[~2012-10-14 16:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 12:00 [PATCH v4 0/5] KVM: MMU: fix release no-slot pfn and clean up mmu code Xiao Guangrong
2012-10-07 12:01 ` [PATCH v4 1/5] KVM: MMU: fix release noslot pfn Xiao Guangrong
2012-10-10 15:11   ` Marcelo Tosatti
2012-10-11 13:06     ` Xiao Guangrong
2012-10-11 14:31       ` Marcelo Tosatti
2012-10-12  9:49         ` Xiao Guangrong
2012-10-14 16:36           ` Marcelo Tosatti [this message]
2012-10-07 12:02 ` [PATCH v4 2/5] KVM: MMU: remove mmu_is_invalid Xiao Guangrong
2012-10-07 12:02 ` [PATCH v4 3/5] KVM: MMU: cleanup FNAME(page_fault) Xiao Guangrong
2012-10-07 12:03 ` [PATCH v4 4/5] KVM: MMU: move prefetch_invalid_gpte out of pagaing_tmp.h Xiao Guangrong
2012-10-07 12:05 ` [PATCH v4 5/5] KVM: MMU: introduce FNAME(prefetch_gpte) Xiao Guangrong
2012-10-10 15:21   ` Marcelo Tosatti
2012-10-11 13:12     ` Xiao Guangrong

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=20121014163615.GA29071@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiaoguangrong.eric@gmail.com \
    --cc=xiaoguangrong@linux.vnet.ibm.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