From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: MMU: Replace role.glevels with role.cr4_pae
Date: Wed, 14 Apr 2010 19:32:12 +0300 [thread overview]
Message-ID: <4BC5EE0C.60705@redhat.com> (raw)
In-Reply-To: <1271262003-29973-1-git-send-email-avi@redhat.com>
On 04/14/2010 07:20 PM, Avi Kivity wrote:
> There is no real distinction between glevels=3 and glevels=4; both have
> exactly the same format and the code is treated exactly the same way. Drop
> role.glevels and replace is with role.cr4_pae (which is meaningful). This
> simplifies the code a bit.
>
> As a side effect, it allows sharing shadow page tables between pae and
> longmode guest page tables at the same guest page.
>
>
> static int kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp)
> {
> - if (sp->role.glevels != vcpu->arch.mmu.root_level) {
> + if (sp->role.cr4_pae != !!is_pae(vcpu)) {
> kvm_mmu_zap_page(vcpu->kvm, sp);
> return 1;
> }
>
This bit confuses me a little. Why is it needed? It will never hit
from mmu_sync_children(), and as for kvm_mmu_get_page(), it will simply
zap unrelated pages?
Is it related to the restriction that we can only unsync if we have just
one shadow page for a gfn? That's somewhat artificial (and hurts nonpae
guests, and guests with linear page tables).
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-04-14 17:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 16:20 [PATCH] KVM: MMU: Replace role.glevels with role.cr4_pae Avi Kivity
2010-04-14 16:32 ` Avi Kivity [this message]
2010-04-14 18:29 ` Marcelo Tosatti
2010-04-15 9:02 ` Avi Kivity
2010-04-15 16:58 ` Marcelo Tosatti
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=4BC5EE0C.60705@redhat.com \
--to=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