1. One or more non-transitory computer-readable storage mediums storing one or more sequences of instructions, which when executed by one or more processors, cause: executing, within a virtual machine, a guest operating system which does not support Supervisor Mode Execution Protection (SMEP); a hypervisor instructing hardware to enable Supervisor Mode Execution Protection (SMEP) for the virtual machine executing the guest operating system; upon the hypervisor determining that the guest operating system has instructed a central processing unit (CPU) to execute code stored in virtual memory accessible by user space while the CPU is in supervisor mode, the hypervisor consulting a policy to determine whether to propagate a SMEP page fault to the guest operating system; upon the policy indicating that the SMEP page fault should be propagated, propagating the SMEP page fault to the guest operating system, wherein the page fault handler of guest operating system interprets the propagated SMEP page fault as a different type of page fault; and upon the policy indicating that the SMEP page fault should not be propagated, preventing the SMEP page fault from being propagated to the guest operating system, wherein the SMEP page fault is a page fault issued in response to execution of said faulting instruction at a higher privilege mode than required for accessing a virtual address at which said faulting instruction is stored.