Commit 4436d466 authored by Avi Kivity's avatar Avi Kivity

KVM: MMU: Remove cr0.wp tricks

No longer needed as we do everything in one place.
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent e663ee64
...@@ -240,17 +240,6 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu, ...@@ -240,17 +240,6 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
spte |= paddr; spte |= paddr;
if (!write_fault && (spte & PT_SHADOW_USER_MASK) &&
!(spte & PT_USER_MASK)) {
/*
* If supervisor write protect is disabled, we shadow kernel
* pages as user pages so we can trap the write access.
*/
spte |= PT_USER_MASK;
spte &= ~PT_WRITABLE_MASK;
access_bits &= ~PT_WRITABLE_MASK;
}
if ((access_bits & PT_WRITABLE_MASK) if ((access_bits & PT_WRITABLE_MASK)
|| (write_fault && !is_write_protection(vcpu) && !user_fault)) { || (write_fault && !is_write_protection(vcpu) && !user_fault)) {
struct kvm_mmu_page *shadow; struct kvm_mmu_page *shadow;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment