All of lore.kernel.org
 help / color / mirror / Atom feed
* Trying to switch EPTP for execute-protecting guest pages
@ 2015-11-23 17:11 Estrada, Zachary J
  2015-11-24 11:44 ` Paolo Bonzini
  0 siblings, 1 reply; 6+ messages in thread
From: Estrada, Zachary J @ 2015-11-23 17:11 UTC (permalink / raw)
  To: kvm

Hi all,

I'm playing around with EPTs and kvm to track execution in the guest.  I've 
created a separate set of EPTs (and copied the last level entries from the real 
tables, minus execute permissions) but I'm not getting exits where I expect. I 
also have code in handle_ept_violation to preserve those permissions for any 
non-execute ept violations.

Here is what I am calling within a VM Exit handler:
---
kvm_mmu_unload(vcpu);
vcpu->arch.mmu.root_hpa = eptp;
kvm_x86_ops->set_tdp_cr3(vcpu, eptp);
kvm_mmu_load(vcpu);
kvm_flush_remote_tlbs(vcpu->kvm);
---

I think some of this is overkill, but am I missing something? I think I may need 
to flush the rmaps too, but I'm not exactly sure how.

I am using Haswell if that matters.

Thank you very much for your help!
--Zak

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-24 16:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.