KVM: MMU: Remove cr0.wp tricks
authorAvi Kivity <avi@qumranet.com>
Thu, 31 May 2007 14:17:06 +0000 (17:17 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:44 +0000 (12:05 +0300)
No longer needed as we do everything in one place.

Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/paging_tmpl.h

index fabc2c9093cd825d9228f4c43f42b8f901527616..59b4cb29e0f77d30920ac3ac666dc386e80678fd 100644 (file)
@@ -240,17 +240,6 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
 
        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)
            || (write_fault && !is_write_protection(vcpu) && !user_fault)) {
                struct kvm_mmu_page *shadow;