IP Library › Granted Patent US 8,621,459
Granted Patent B2
US 8,621,459 · App. 11/615,821 · Granted Dec 31, 2013

Method and apparatus for multithreaded guest operating system execution through a multithreaded host virtual machine monitor

Inventors: Konstantin Levit-Gurevich (Kiryat Byalik, IL); Boaz Ouriel (Zichron Yakov, IL)
Assignee: Intel Corporation
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 8,621,459
App. No.
11/615,821
Granted
Dec 31, 2013
Kind
B2
Abstract

Methods and apparatus for virtualization of guest operating systems (OSs) include allocating virtual machines (VMs). The VMs are assigned to each of the available hardware threads and resumed or launched for the first time. If scheduling of additional VMs is required upon exiting the VM context, another VM is selected and assigned to the hardware thread to be resumed or launched. A VM monitor is used to resume or launch a VM while the host operating system is prevented from controlling the hardware thread. A VM context structure is loaded. The thread is set to the state of the guest OS and the VM context is resumed or launched. The state of the guest OS is saved locally during a context switch to the context of the VM monitor. The VM context structure is then cleared and the host OS is allowed to control the hardware thread again.

Claims (38)

1. A computerized method for resuming or launching a virtual machine, the method comprising:

disabling interrupts by clearing an interrupt flag to prevent a host operating system from controlling a first hardware thread of a plurality of hardware threads;

loading a first virtual machine context;

setting the first hardware thread to the state of a first guest operating system, wherein the first guest operating system executes within the first virtual machine context;

resuming or launching the first virtual machine context;

saving the state of the first guest operating system locally;

performing a context switch to the context of a virtual machine monitor, wherein the virtual machine monitor executes under the host operating system and the virtual machine monitor schedules the first virtual machine context;

clearing the first virtual machine context from the first hardware thread; and

setting the interrupt flag to allow the host operating system to control the first hardware thread.

2. The method of claim 1 wherein loading a first virtual machine context structure comprises executing a VMPTRLD instruction to mark the first virtual machine context structure valid and load it from a specified address in memory.

3. The method of claim 2 wherein setting the first hardware thread to the state of the first guest operating system comprises loading a guest-state area of the first virtual machine context.

4. An article of manufacture comprising:

a non-transitory computer-readable storage medium including executable instructions that, when accessed by a machine, cause the machine to:

disable interrupts by clearing an interrupt flag to prevent a host operating system from controlling a first hardware thread of a plurality of hardware threads;

load a first virtual machine context;

set the first hardware thread to the state of a first guest operating system, wherein the first guest operating system executes within the first virtual machine context;

resume or launch the first virtual machine context;

save the state of the first guest operating system locally;

perform a context switch to the context of a virtual machine monitor, wherein the virtual machine monitor executes under the host operating system and the virtual machine monitor schedules the first virtual machine context;

clear the first virtual machine context from the first hardware thread; and

set the interrupt flag to allow the host operating system to control the first hardware thread.

5. The article of manufacture of claim 4 wherein said storage medium includes an executable to mark the first virtual machine context structure valid and load it from a specified address in memory.

6. The article of manufacture of claim 4 wherein the first hardware thread is set to the state of the first guest operating system by loading a guest-state area of the virtual machine context structure.

7. A computing system comprising:

a processor having a plurality of hardware threads;

a host operating system executable on the processor;

a multithreaded guest operating system executable on a plurality of virtual machines of the processor;

a multithreaded virtual machine monitor executable on the processor under the host operating system to schedule virtual machines on the plurality of hardware threads;

the multithreaded virtual machine monitor to:

disable interrupts by clearing an interrupt flag to prevent the host operating system from controlling a first hardware thread of the plurality of hardware threads;

load a first virtual machine context;

set the first hardware thread to the state of a first guest operating system, wherein the first guest operating system executes within the first virtual machine context;

resume or launch the first virtual machine context;

save the state of the first guest operating system locally;

clear the first virtual machine context from the first hardware thread after a context switch to the context of the multithreaded virtual machine monitor; and

set the interrupt flag to allow the host operating system to control the first hardware thread.

8. The computing system of claim 7 wherein said multithreaded virtual machine monitor includes an executable instruction to mark the first virtual machine context structure valid and load it from a specified address in memory.

9. The computing system of claim 8 wherein the first hardware thread is set to the state of the first guest operating system by loading a guest-state area of the virtual machine context structure.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 22, 2008
From: LEVIT-GUREVICH, KONSTANTIN; OURIEL, BOAZ
To: INTEL CORPORATION
Reel/Frame 021274/0055 →
Continuity (1)
Related Publication 20080155536A1 · Jun 26, 2008