diff options
author | Bryan Cantrill <bryan@joyent.com> | 2011-08-06 21:29:05 -0700 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2011-08-06 21:29:05 -0700 |
commit | 50477ee36add08e85b06badc1f8a6f399dec4e92 (patch) | |
tree | 59b417d9850173338c469802d57805b1c59771bc | |
parent | 72747f868c6d66646ac59da2cfce4d29190d278e (diff) | |
download | illumos-kvm-50477ee36add08e85b06badc1f8a6f399dec4e92.tar.gz |
HVM-573 KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page
-rw-r--r-- | kvm_mmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1659,6 +1659,9 @@ set_spte(struct kvm_vcpu *vcpu, uint64_t *sptep, unsigned pte_access, spte |= PT_WRITABLE_MASK; + if (!tdp_enabled && !(pte_access & ACC_WRITE_MASK)) + spte &= ~PT_USER_MASK; + /* * Optimization: for pte sync, if spte was writable the hash * lookup is unnecessary (and expensive). Write protection |