From: Avi Kivity <avi@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH v2 7/8] KVM: MMU: Validate all gptes during fetch, not just those used for new pages
Date: Mon, 12 Jul 2010 16:06:09 +0300 [thread overview]
Message-ID: <4C3B1341.1090303@redhat.com> (raw)
In-Reply-To: <1278934254-5598-8-git-send-email-avi@redhat.com>
On 07/12/2010 02:30 PM, Avi Kivity wrote:
> Currently, when we fetch an spte, we only verify that gptes match those that
> the walker saw if we build new shadow pages for them.
>
> However, this misses the following race:
>
> vcpu1 vcpu2
>
> walk
> change gpte
> walk
> instantiate sp
>
> fetch existing sp
>
> Fix by validating every gpte, regardless of whether it is used for building
> a new sp or not.
>
>
> + /*
> + * Verify that the top-level gpte is still there. Since the page
> + * is a root page, it is either write protected (and cannot be
> + * changed from now on) or it is invalid (in which case, we don't
> + * really care if it changes underneath us after this point).
> + */
> + if (!FNAME(validate_indirect_spte)(vcpu, sptep, sp,
> + gw, top_level))
> + goto out_error;
> +
>
This bit is a little broken. Will post v3 soon.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-07-12 13:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 11:30 [PATCH v2 0/8] Simplify and fix fetch() Avi Kivity
2010-07-12 11:30 ` [PATCH v2 1/8] KVM: MMU: Add link_shadow_page() helper Avi Kivity
2010-07-12 11:30 ` [PATCH v2 2/8] KVM: MMU: Use __set_spte to link shadow pages Avi Kivity
2010-07-12 11:30 ` [PATCH v2 3/8] KVM: MMU: Add drop_large_spte() helper Avi Kivity
2010-07-12 11:30 ` [PATCH v2 4/8] KVM: MMU: Add validate_direct_spte() helper Avi Kivity
2010-07-12 11:30 ` [PATCH v2 5/8] KVM: MMU: Add validate_indirect_spte() helper Avi Kivity
2010-07-12 11:30 ` [PATCH v2 6/8] KVM: MMU: Simplify spte fetch() function Avi Kivity
2010-07-12 11:30 ` [PATCH v2 7/8] KVM: MMU: Validate all gptes during fetch, not just those used for new pages Avi Kivity
2010-07-12 13:06 ` Avi Kivity [this message]
2010-07-12 11:30 ` [PATCH v2 8/8] KVM: MMU: Eliminate redundant temporaries in FNAME(fetch) Avi Kivity
2010-07-12 11:42 ` [PATCH v2 0/8] Simplify and fix 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=4C3B1341.1090303@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=xiaoguangrong@cn.fujitsu.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