aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 6d8e350681..d10de26934 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -649,8 +649,7 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
break;
case MMU_KSMAP_IDX:
- if (is_write1 != 2 && (env->cr[4] & CR4_SMAP_MASK) &&
- (ptep & PG_USER_MASK)) {
+ if (is_write1 != 2 && (ptep & PG_USER_MASK)) {
goto do_fault_protect;
}
/* fall through */
@@ -711,8 +710,7 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
break;
case MMU_KSMAP_IDX:
- if (is_write1 != 2 && (env->cr[4] & CR4_SMAP_MASK) &&
- (ptep & PG_USER_MASK)) {
+ if (is_write1 != 2 && (ptep & PG_USER_MASK)) {
goto do_fault_protect;
}
/* fall through */
@@ -766,8 +764,7 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
break;
case MMU_KSMAP_IDX:
- if (is_write1 != 2 && (env->cr[4] & CR4_SMAP_MASK) &&
- (pde & PG_USER_MASK)) {
+ if (is_write1 != 2 && (pde & PG_USER_MASK)) {
goto do_fault_protect;
}
/* fall through */
@@ -823,8 +820,7 @@ int x86_cpu_handle_mmu_fault(CPUState *cs, vaddr addr,
break;
case MMU_KSMAP_IDX:
- if (is_write1 != 2 && (env->cr[4] & CR4_SMAP_MASK) &&
- (ptep & PG_USER_MASK)) {
+ if (is_write1 != 2 && (ptep & PG_USER_MASK)) {
goto do_fault_protect;
}
/* fall through */