public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v3 7/8] KVM: MMU: Validate all gptes during fetch, not just those used for new pages
Date: Tue, 13 Jul 2010 12:27:28 +0800	[thread overview]
Message-ID: <4C3BEB30.3000001@cn.fujitsu.com> (raw)
In-Reply-To: <4C3BE8FA.8050607@redhat.com>



Avi Kivity wrote:

>>>           /*
>>>            * Verify that the gpte in the page we've just write
>>>            * protected is still there.
>>>            */
>>>           if (!FNAME(validate_indirect_spte)(vcpu, sptep, sp,
>>> -                           gw, level - 1)) {
>>> -            kvm_release_pfn_clean(pfn);
>>> -            return NULL;
>>> -        }
>>> +                           gw, level - 1))
>>> +            goto out_error;
>>>
>>>      
>> It missed the last mapping check? i only see validate_indirect_spte in
>> 'level>  gw->level' loop.
>>    
> 
> But we check 'level - 1' here, so the final level is included.  It is
> the top level that is not checked in the loop (we check it separately,
> above).
> 

Yeah, you are right!

  reply	other threads:[~2010-07-13  4:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12 16:15 [PATCH v3 0/8] Simplify and fix fetch() Avi Kivity
2010-07-12 16:15 ` [PATCH v3 1/8] KVM: MMU: Add link_shadow_page() helper Avi Kivity
2010-07-12 16:15 ` [PATCH v3 2/8] KVM: MMU: Use __set_spte to link shadow pages Avi Kivity
2010-07-12 16:15 ` [PATCH v3 3/8] KVM: MMU: Add drop_large_spte() helper Avi Kivity
2010-07-12 16:15 ` [PATCH v3 4/8] KVM: MMU: Add validate_direct_spte() helper Avi Kivity
2010-07-12 16:15 ` [PATCH v3 5/8] KVM: MMU: Add validate_indirect_spte() helper Avi Kivity
2010-07-12 16:15 ` [PATCH v3 6/8] KVM: MMU: Simplify spte fetch() function Avi Kivity
2010-07-12 16:15 ` [PATCH v3 7/8] KVM: MMU: Validate all gptes during fetch, not just those used for new pages Avi Kivity
2010-07-12 19:16   ` Marcelo Tosatti
2010-07-13  4:20     ` Avi Kivity
2010-07-13  1:51   ` Xiao Guangrong
2010-07-13  4:18     ` Avi Kivity
2010-07-13  4:27       ` Xiao Guangrong [this message]
2010-07-12 16:15 ` [PATCH v3 8/8] KVM: MMU: Eliminate redundant temporaries in FNAME(fetch) Avi Kivity

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=4C3BEB30.3000001@cn.fujitsu.com \
    --to=xiaoguangrong@cn.fujitsu.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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