Patent ID: 8490085

Claim:
A method for CPU virtualization, comprising: running a hypervisor program in a privileged mode of a processor, wherein the hypervisor program is configured to maintain a plurality of virtual privilege levels that are operable in a non-privileged mode of the processor and are organized into a hierarchy of levels; maintaining invalidation lists corresponding to the plurality of virtual privilege levels, wherein each of the invalidation lists is configured to store translation entries that are associated with a virtual address space corresponding to one of the plurality of virtual privilege levels; running, in the non-privileged mode of the processor, an application program on an operating system within a virtual machine supported by the hypervisor program, wherein the application program is associated with a first virtual privilege level selected from the plurality of virtual privilege levels; receiving, by the hypervisor program, a first call from the operating system relating to a request by the application program to the operating system to execute a privileged instruction that requires a more privileged level than the first virtual privilege level; responding by the hypervisor program to the first call from the operating system by associating the privileged instruction with a second virtual privilege level selected from the plurality of virtual privileged levels and corresponding to the more privileged level, wherein associating the privileged instruction with the second virtual privilege level includes removing the translation entries in those invalidation lists that correspond to those of the plurality of virtual privilege levels that are not the second virtual privilege level; and executing, by the hypervisor program, the privileged instruction associated with the second virtual privilege level in the operating system.