1. A method, comprising: receiving, by a hypervisor associated with a device, guest operating system code that includes an instruction to switch from a current stack to a new stack, the current stack and the new stack being provided in hardware associated with the device; providing, by the hypervisor and to a guest page table associated with the hypervisor, a query for writable pages before or after a reference to the new stack; receiving, by the hypervisor associated with the device and from the guest page table, information identifying the writable pages, the information identifying the writable pages being received based on the query; providing, by the hypervisor associated with the device, test instructions, to reference the writable pages, to the new stack to determine whether one or more faults occur when the writable pages are referenced, the one or more faults occurring when the information identifying the writable pages has not been included in a shadow page table associated with the hypervisor; and switching, by the hypervisor associated with the device, from the current stack to the new stack when no faults occur based on the test instructions.