While commodity operating systems create these struc- tures manually, Virtual Ghost provides a single function, sva.newstate(), to create these two pieces of state. This function creates these new state structures within the SVA VM internal memory to prevent tampering by the system software. The newly created Interrupt Context is a clone of the Interrupt Context of the current thread. The new Thread State is initialized so that, on the next context switch, it be- gins executing in a function specified by the operating sys- tem. In order to maintain kernel control-flow integrity, Vir- tual Ghost verifies that the specified function is the entry point of a kernel function.