diff --git a/src/system/kernel/arch/x86/arch_cpu.cpp b/src/system/kernel/arch/x86/arch_cpu.cpp index d9048eaa9f..d46586ec19 100644 --- a/src/system/kernel/arch/x86/arch_cpu.cpp +++ b/src/system/kernel/arch/x86/arch_cpu.cpp @@ -731,8 +731,11 @@ arch_cpu_global_TLB_invalidate(void) // of the global page bit x86_write_cr4(flags & ~IA32_CR4_GLOBAL_PAGES); x86_write_cr4(flags | IA32_CR4_GLOBAL_PAGES); - } else + } else { + cpu_status state = disable_interrupts(); arch_cpu_user_TLB_invalidate(); + restore_interrupts(state); + } } diff --git a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp index cabe6a66d9..17149c58b5 100644 --- a/src/system/kernel/arch/x86/arch_vm_translation_map.cpp +++ b/src/system/kernel/arch/x86/arch_vm_translation_map.cpp @@ -632,7 +632,9 @@ flush_tmap(vm_translation_map *map) smp_send_broadcast_ici(SMP_MSG_GLOBAL_INVALIDATE_PAGES, 0, 0, 0, NULL, SMP_MSG_FLAG_SYNC); } else { + cpu_status state = disable_interrupts(); arch_cpu_user_TLB_invalidate(); + restore_interrupts(state); int cpu = smp_get_current_cpu(); uint32 cpuMask = map->arch_data->active_on_cpus