IP Library › Granted Patent US 9,489,223
Granted Patent B2
US 9,489,223 · App. 13/686,315 · Granted Nov 8, 2016

Virtual machine wakeup using a memory monitoring instruction

Inventors: Michael Tsirkin (Raanana, IL); Avi Kivity (Raanana, IL); Dor Laor (Raanana, IL)
Assignee: Red Hat Israel, Ltd.
G06F9/45533G06F9/4418G06F2009/45575
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 9,489,223
App. No.
13/686,315
Granted
Nov 8, 2016
Kind
B2
Abstract

A method and system for managing a virtual computing system including an event source configured to send an event to a destination virtual machine (VM) executing a memory monitoring instruction on a designated address range of a host memory. A hypervisor instructs a destination virtual central processing unit (VCPU) associated with the destination VM to execute the memory monitoring instruction to the designated address range of a memory. A physical CPU associated with the designated address range is configured not to perform an exit to the hypervisor in response to execution of the memory monitoring instruction by the destination VCPU. The hypervisor instructs an event source to write data to the designated address range to send an event for performance by the destination VM, wherein the destination VM wakes up and performs the identified event in response to the event source writing to the identified address range.

Claims (28)

1. A method comprising:

determining, by a processing device executing a hypervisor, a frequency of events to be performed by a destination virtual machine (VM) exceeds an event frequency threshold;

in response to the determining, switching the destination VM from a first mode that enables an exit to the hypervisor in response to execution of a memory monitoring instruction to a memory monitoring mode that disables the exit of the destination VM in response to execution of the memory monitoring instruction;

in response to the switching, instructing, by the processing device, a virtual central processing unit (VCPU) associated with the destination VM to execute a first memory monitoring instruction to a designated address range of a host memory, wherein the destination VM executes the first memory monitoring instruction to the designated address range and enters a wait mode, without causing an exit to the hypervisor in response to execution of the first memory monitoring instruction; and

sending, by the processing device, an instruction to an event source to write data to the designated address range on which the destination VM is executing the first memory monitoring instruction to thereby wake up the destination VM from the wait mode and send an event for performance by the destination VM.

2. The method of claim 1 , wherein the destination VM wakes up and performs the identified event in response to the event source writing data to the designated address range.

3. The method of claim 1 , wherein the event source comprises at least one of a physical central processing unit CPU), a hardware device, or a source VCPU associated with a source VM.

4. The method of claim 1 , wherein the designated address range comprises a protected portion not writeable by the event source.

5. The method of claim 1 , wherein writing data to the designated address range comprises executing an atomic instruction.

6. The method of claim 1 , wherein the hypervisor maintains an assignment of an additional address range wherein each of the additional address range is dedicated for writing to by a specific source type.

7. A computer system comprising:

a memory to store instructions; and

a processing device operatively coupled to the memory, the processing device to execute the instructions to:

determine a frequency of events to be performed by a destination virtual machine (VM) exceeds an event frequency threshold;

in response to determining the frequency of events, switch the destination VM from a first mode that enables an exit to a hypervisor in response to execution of a memory monitoring instruction to a memory monitoring mode that disables the exit of the destination VM in response to execution of the memory monitoring instruction;

in response to switching, instruct a virtual central processing unit (VCPU) associated with the destination VM to execute a first memory monitoring instruction to a designated address range of a host memory, wherein the destination VM executes the first memory monitoring instruction to the designated address range and enters a wait mode, without causing an exit to the hypervisor in response to execution of the first memory monitoring instruction; and

send an instruction to an event source to write data to the designated address range on which the destination VM is executing the first memory monitoring instruction to thereby wake up the destination VM from the wait mode and send an event for performance by the destination VM.

8. The computer system of claim 7 , wherein the event source comprises at least one of a physical central processing unit (CPU), a hardware device, or a source virtual CPU associated with a source virtual machine.

9. The computer system of claim 7 , wherein the designated address range comprises a protected portion not writeable by the event source.

10. The computer system of claim 7 , the processing device to maintain an assignment of a plurality of additional address ranges, wherein each of the plurality of additional address ranges is dedicated for writing to by a specific source type.

11. A non-transitory computer readable storage medium comprising instructions that, when executed by a processing device, cause the processing device to:

determine a frequency of events to be performed by a destination virtual machine (VM) exceeds an event frequency threshold;

in response to determining the frequency of events, switch the destination VM from a first mode that enables an exit to a hypervisor in response to execution of a memory monitoring instruction to a memory monitoring mode that disables the exit of the destination VM in response to execution of the memory monitoring instruction;

in response to switching, instruct a virtual central processing unit (VCPU) associated with the destination VM to execute a first memory monitoring instruction to a designated address range of a host memory, wherein the destination VM executes the first memory monitoring instruction to the designated address range and enters a wait mode, without causing an exit to the hypervisor in response to execution of the first memory monitoring instruction; and

send an instruction to an event source to write data to the designated address range on which the destination VM is executing the first memory monitoring instruction to thereby wake up the destination VM from the wait mode and send an event for performance by the destination VM.

12. The non-transitory computer readable storage medium of claim 11 , wherein the event source comprises at least one of a physical central processing unit (CPU), a hardware device, or a source virtual CPU associated with a source virtual machine.

13. The non-transitory computer readable storage medium of claim 11 , wherein the designated address range comprises a protected portion not writeable by the event source.

14. The non-transitory computer readable storage medium of claim 11 , the processing device to maintain an assignment of an additional address range, wherein the additional address ranges is dedicated for writing to by a specific source type.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2013
From: TSIRKIN, MICHAEL; KIVITY, AVI; LAOR, DOR
To: RED HAT ISRAEL, LTD.
Reel/Frame 029606/0155 →
Continuity (1)
Related Publication 20140149979A1 · May 29, 2014