IP Library Granted Patent US 7,992,147
Granted Patent B2
US 7,992,147 · App. 12/758,683 · Granted Aug 2, 2011

Processor control register virtualization to minimize virtual machine exits

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,992,147
App. No.
12/758,683
Granted
Aug 2, 2011
Kind
B2
Abstract

A processor includes a processor control register with a control flag that determines an operating mode of the processor. A pointer to a guest virtual machine context in a portion of a random access memory (RAM) is coupled to the processor. An execution control unit tests a first flag in the guest virtual machine context, the first flag to indicate whether the control flag is owned by a guest virtual machine associated with the guest virtual machine context. The execution control unit maintains the control flag in the processor control register if the control flag is owned by the guest virtual machine and maintains the control flag in a shadow location in the guest virtual machine context if the control flag is not owned by the guest virtual machine.

Claims (35)

1. A method for setting an operating mode of a processor by maintaining a control flag included in a processor control register of the processor by a guest virtual machine, the method comprising:

determining whether the control flag is owned by the guest virtual machine;

maintaining the control flag in the processor control register if the control flag is owned by the guest virtual machine; and

maintaining the control flag in a shadow location in a guest virtual machine context in a memory coupled to the processor if the control flag is not owned by the guest virtual machine.

2. The method of claim 1 , wherein determining whether the control flag is owned by the guest virtual machine further comprises testing a first flag in a mask word.

3. The method of claim 1 , further comprising:

determining whether the control flag is maintained in the shadow location;

maintaining the control flag in the shadow location if the control flag is not owned by the guest virtual machine and is maintained in the shadow location; and

exiting to a virtual machine monitor if the control flag is not owned by the guest virtual machine and is not maintained in the shadow location.

4. The method of claim 3 , wherein determining whether the control flag is maintained in a shadow location is performed only if the control flag is not owned by the guest virtual machine.

5. The method of claim 3 , wherein determining whether the control flag is maintained in a shadow location further comprises testing a flag.

6. A processor comprising:

a processor control register that includes a control flag that determines an operating mode of the processor;

a pointer to a guest virtual machine context in a portion of a random access memory (RAM) coupled to the processor;

an execution control unit

to determine whether the control flag is owned by a guest virtual machine associated with the guest virtual machine context, and

to maintain the control flag by the guest virtual machine in the processor control register if the control flag is owned by the guest virtual machine and to maintain the control flag in a shadow location in the guest virtual machine context if the control flag is not owned by the guest virtual machine.

7. The processor of claim 6 , wherein the execution control unit is further to test a first flag in the guest virtual machine context, the first flag to indicate whether the control flag is owned by a guest virtual machine associated with the guest virtual machine context.

8. The processor of claim 6 , further comprising:

a second mask word in the guest virtual machine context, the second mask word to include a second flag to indicate whether the control flag is maintained in the shadow location;

wherein the execution control unit is further

to maintain the control flag in the shadow location if the control flag is not owned by the guest virtual machine and is maintained in the shadow location, and

to cause an exit to a virtual machine monitor if the control flag is not owned by the guest virtual machine and is not maintained in the shadow location.

9. The processor of claim 7 , wherein the execution control unit is responsive to the second flag only if the first flag indicates that the control flag is not owned by the guest virtual machine.

10. A computer storage medium including data that, when accessed by a processor, cause the processor to perform operations comprising:

determining whether a control flag included in a processor control register of the processor is owned by a guest virtual machine, the control flag to determine an operating mode of the processor;

maintaining the control flag in a processor control register if the control flag is owned by the guest virtual machine; and

maintaining the control flag in a shadow location in a guest virtual machine context in a memory coupled to the processor if the control flag is not owned by the guest virtual machine.

11. The computer storage medium of claim 10 further including data that cause the processor to perform operations comprising testing a first flag in a mask word to determine whether the control flag is owned by the guest virtual machine.

12. The computer storage medium of claim 10 further including data that cause the processor to perform operations comprising:

determining whether the control flag is maintained in the shadow location;

maintaining the control flag in the shadow location if the control flag is not owned by the guest virtual machine and is maintained in the shadow location; and

exiting to a virtual machine monitor if the control flag is not owned by the guest virtual machine and is not maintained in the shadow location.

13. The computer storage medium of claim 12 wherein determining whether the control flag is maintained in a shadow location is performed only if the control flag is not owned by the guest virtual machine.

14. The computer storage medium of claim 12 further including data that cause the processor to perform operations comprising testing a flag to determine whether the control flag is maintained in a shadow location.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 15, 2022
From: INTEL CORPORATION
To: TAHOE RESEARCH, LTD.
Reel/Frame 061175/0176 →