]> git.proxmox.com Git - qemu.git/commitdiff
fixed WP semantics
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 7 Feb 2004 20:42:14 +0000 (20:42 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 7 Feb 2004 20:42:14 +0000 (20:42 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@606 c046a42c-6fe2-441c-8c8c-71466251a162

target-i386/helper2.c

index 47a93cddfaec2af00c2b361c3a81022b2ced3392..f5c31d0df036c58c0e460a249bdb9153c98822bb 100644 (file)
@@ -320,7 +320,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
             if (is_write && !(pde & PG_RW_MASK))
                 goto do_fault_protect;
         } else {
-            if ((env->cr[0] & CR0_WP_MASK) && (pde & PG_USER_MASK) &&
+            if ((env->cr[0] & CR0_WP_MASK) && 
                 is_write && !(pde & PG_RW_MASK)) 
                 goto do_fault_protect;
         }
@@ -358,7 +358,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
             if (is_write && !(ptep & PG_RW_MASK))
                 goto do_fault_protect;
         } else {
-            if ((env->cr[0] & CR0_WP_MASK) && (ptep & PG_USER_MASK) &&
+            if ((env->cr[0] & CR0_WP_MASK) &&
                 is_write && !(ptep & PG_RW_MASK)) 
                 goto do_fault_protect;
         }
@@ -382,7 +382,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
             if (ptep & PG_RW_MASK)
                 prot |= PROT_WRITE;
         } else {
-            if (!(env->cr[0] & CR0_WP_MASK) || !(ptep & PG_USER_MASK) ||
+            if (!(env->cr[0] & CR0_WP_MASK) ||
                 (ptep & PG_RW_MASK))
                 prot |= PROT_WRITE;
         }