Patent ID: 8479199

Claim:
A method for executing virtualization instructions in a central processing unit (CPU) operatively connected to a memory to improve the performance of nested virtualization in a computer system, comprising: fetching a virtualization instruction from said memory, said virtualization instruction being a control structure read or write instruction for reading or writing data in a control structure used by a virtual machine monitor (VMM) to maintain state on a virtual machine (VM) to support transitions between a root mode of operation of said CPU in which said VMM executes and a non-root mode of operation of said CPU in which said VM executes; performing a privileged data access to a primary control structure of a primary VMM according to said virtualization instruction if said CPU is in said root mode, wherein said primary control structure is used by said primary VMM to maintain state on a primary VM; and performing a non-privileged data access to a secondary control structure of a secondary VMM according to said virtualization instruction if said CPU is in said non-root mode and a secondary control structure field in said primary control structure is enabled, wherein said secondary control structure is used by said secondary VMM to maintain state on a secondary VM nested within the primary VM.