1. A system comprising: a memory; one or more processors, coupled to the memory; a virtual machine executing on the one or more processors; and a hypervisor executing on the one or more processors to: determine, by the hypervisor, a first location in the memory, corresponding to a physical address of a virtual machine function; determine, by the hypervisor, a second location in the memory of the virtual machine function, wherein the second location in the memory is offset from the first location in the memory of the virtual machine function; modify, by the hypervisor, the virtual machine function at the second location in the memory to include checking code; execute, by the hypervisor, the virtual machine function; while executing the virtual machine function, execute, by the hypervisor, the checking code; while executing the checking code, determine, by the hypervisor using the checking code, whether interrupts are disabled on a virtual machine; and responsive to determining that the interrupts are enabled on the virtual machine, at least one of disable, by the hypervisor using the checking code, the interrupts on the virtual machine and abort, by the hypervisor using the checking code, the virtual machine function.