From: Paolo Bonzini <pbonzini@redhat.com>
To: "Estrada, Zachary J" <zestrad2@illinois.edu>, kvm@vger.kernel.org
Subject: Re: Trying to switch EPTP for execute-protecting guest pages
Date: Tue, 24 Nov 2015 17:00:03 +0100 [thread overview]
Message-ID: <56548983.2050605@redhat.com> (raw)
In-Reply-To: <565487BE.3040808@illinois.edu>
On 24/11/2015 16:52, Estrada, Zachary J wrote:
>> I'm not sure if this is your problem, but perhaps you want to record in
>> the role whether the page comes from your version or the original? The
>> role is like the hash key, if the role is the same you get the same PTE.
>
> This is extremely helpful, I had not noticed this. I'm using my new
> root_hpa as the base_role.word - does that make sense? I just tried it
> and I seem to get EPT_VIOLATIONS that I was expecting, but missing.
I think you should add a new bit to the role meaning "should I clear
some X bits?" :) that is computed based on the VCPU state. For an
example see commit 699023e2 ("KVM: x86: add SMM to the MMU role, support
SMRAM address space"), which does
+ context->base_role.smm = is_smm(vcpu);
in init_kvm_tdp_mmu. BTW, based on what you told me offlist, what you
are doing should also just work with shadow page tables.
Paolo
> Thanks a ton, it appears that the role was exactly the thing I was
> looking for!
prev parent reply other threads:[~2015-11-24 16:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 17:11 Trying to switch EPTP for execute-protecting guest pages Estrada, Zachary J
2015-11-24 11:44 ` Paolo Bonzini
2015-11-24 14:51 ` Estrada, Zachary J
2015-11-24 15:13 ` Paolo Bonzini
2015-11-24 15:52 ` Estrada, Zachary J
2015-11-24 16:00 ` Paolo Bonzini [this message]
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=56548983.2050605@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=zestrad2@illinois.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.