From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, aarcange@redhat.com
Subject: Re: [patch 1/3] KVM: VMX: remove setting of shadow_base_ptes for EPT
Date: Wed, 20 Oct 2010 12:24:03 +0200 [thread overview]
Message-ID: <4CBEC343.8020200@redhat.com> (raw)
In-Reply-To: <20101019162726.443514881@redhat.com>
On 10/19/2010 06:26 PM, Marcelo Tosatti wrote:
> The EPT present/writable bits use the same position as normal
> pagetable bits.
>
> Since direct_map passes ACC_ALL to mmu_set_spte, thus always setting
> the writable bit on sptes, use the generic PT_PRESENT shadow_base_pte.
>
> Also pass present/writable error code information from EPT violation
> to generic pagefault handler.
>
> Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> Index: kvm/arch/x86/kvm/vmx.c
> ===================================================================
> --- kvm.orig/arch/x86/kvm/vmx.c
> +++ kvm/arch/x86/kvm/vmx.c
> @@ -3483,7 +3483,7 @@ static int handle_ept_violation(struct k
>
> gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
> trace_kvm_page_fault(gpa, exit_qualification);
> - return kvm_mmu_page_fault(vcpu, gpa& PAGE_MASK, 0);
> + return kvm_mmu_page_fault(vcpu, gpa, exit_qualification& 0x3);
> }
Why in the same patch? Seems unrelated.
Ah, it's actually not unrelated, it won't work without it.
>
> static u64 ept_rsvd_mask(u64 spte, int level)
> @@ -4408,8 +4408,6 @@ static int __init vmx_init(void)
>
> if (enable_ept) {
> bypass_guest_pf = 0;
> - kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK |
> - VMX_EPT_WRITABLE_MASK);
> kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull,
> VMX_EPT_EXECUTABLE_MASK);
> kvm_enable_tdp();
>
Only caller gone, please remove callee.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-10-20 10:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 16:26 [patch 0/3] [RFC] support read-only mappings Marcelo Tosatti
2010-10-19 16:26 ` [patch 1/3] KVM: VMX: remove setting of shadow_base_ptes for EPT Marcelo Tosatti
2010-10-20 10:24 ` Avi Kivity [this message]
2010-10-19 16:26 ` [patch 2/3] KVM: MMU: flush TLBs on writable -> read-only spte overwrite Marcelo Tosatti
2010-10-19 16:26 ` [patch 3/3] KVM: propagate fault r/w information to gup(), allow read-only mappings Marcelo Tosatti
2010-10-20 10:36 ` Avi Kivity
2010-10-22 16:18 ` [patch 0/4] support read-only mappings (v2) Marcelo Tosatti
2010-10-22 16:18 ` [patch 1/4] KVM: VMX: remove setting of shadow_base_ptes for EPT Marcelo Tosatti
2010-10-22 16:18 ` [patch 2/4] KVM: MMU: remove kvm_mmu_set_base_ptes Marcelo Tosatti
2010-10-22 16:18 ` [patch 3/4] KVM: MMU: flush TLBs on writable -> read-only spte overwrite Marcelo Tosatti
2010-10-22 16:18 ` [patch 4/4] KVM: propagate fault r/w information to gup(), allow read-only memory Marcelo Tosatti
2010-10-27 9:20 ` [patch 0/4] support read-only mappings (v2) Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2010-10-05 11:54 [patch 0/3] allow read-only memory mappings Marcelo Tosatti
2010-10-05 11:54 ` [patch 1/3] KVM: VMX: remove setting of shadow_base_ptes for EPT 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=4CBEC343.8020200@redhat.com \
--to=avi@redhat.com \
--cc=aarcange@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 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.