IP Library Granted Patent US 7,334,076
Granted Patent B2
US 7,334,076 · App. 11/075,219 · Granted Feb 19, 2008

Method and system for a guest physical address virtualization in a virtual machine environment

Assignee: Microsoft 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 7,334,076
App. No.
11/075,219
Granted
Feb 19, 2008
Kind
B2
Abstract

A method of sharing pages between virtual machines in a multiple virtual machine environment includes initially allocating a temporary guest physical address range of a first virtual machine for sharing pages with a second virtual machine. The temporary range is within a guest physical address space of the first virtual machine. An access request, such as with a DMA request, from a second virtual machine for pages available to the first virtual machine is received. A reference count of pending accesses to the pages is incremented to indicate a pending access and the ages are mapped into the temporary guest physical address range. The pages are accessed and the reference count is decremented. The mapping in the temporary guest physical address range is then removed if the reference count is zero.

Claims (39)

1. A method of sharing pages between virtual machines, the virtual machines operating using resources from a host computer, the method comprising:

allocating a temporary guest physical address range of a first virtual machine for sharing pages between virtual machines;

receiving a request from a second virtual machine to access pages available to the first virtual machine, the request received by virtualization software on the host computer;

incrementing a reference counter of pending accesses to indicate a pending DMA transfer and verifying that a guest physical address to a host physical address mapping for the pages is valid and a DMA (direct memory access) exclusion vector allows access to the pages;

mapping the pages into a portion of the temporary guest physical address range of the first virtual machine;

allowing the pages available to the first virtual machine to be accessed by the second virtual machine by setting up a DMA controller to transfer information between the second virtual machine and a range of host physical addresses;

completing access of the pages by the second virtual machine and notifying the virtualization software of access completion;

decrementing the reference counter of pending accesses to the pages by setting a DMA exclusion vector to exclude the DMA controller from operating on the pages if the reference counter is decremented to zero; and

removing the mapping of the pages from the temporary guest physical address range if the reference counter is zero.

2. The method of claim 1 , wherein receiving a request from a second virtual machine to access pages available to the first virtual machine comprises receiving a direct memory address (DMA) request from a second virtual machine to access pages mapped to a first virtual machine.

3. The method of claim 1 , wherein completing access of the pages by the second virtual machine and notifying the virtualization software of access completion comprises receiving an indication from host hardware that DMA operations are complete and sending a completion message from the first virtual machine to the second virtual machine, wherein the second virtual machine notifies the virtualization software of completion.

4. The method of claim 1 , wherein removing the mapping of the pages from the temporary guest physical address range further comprises un-mapping entries of the pages from one or more of a shadow page table and a translation look-aside table.

5. A computer system for sharing pages between virtual machines, the system comprising:

a host computer, the host computer having hardware resources available to a plurality of virtual machines;

virtualization software, the virtualization software comprising an interface between the host computer and any of the plurality of virtual machines;

a first virtual machine and a second virtual machine, the first virtual machine having access to at least one page resource;

a temporary guest physical address range of the first virtual machine for sharing pages between virtual machines;

a host processor having access to the host computer memory, the memory having instructions which when executed, perform a method comprising:

receiving a request from the second virtual machine to access the pages available to the first virtual machine, the request received by the virtualization software;

incrementing a reference counter of pending accesses to indicate a pending DMA (direct memory access) transfer and verifying that a guest physical address to a host physical address mapping for the pages is valid and a DMA exclusion vector allows access to the pages;

mapping the pages into a portion of the temporary guest physical address range;

allowing the pages available to the first virtual machine to be accessed by the second virtual machine by setting up a DMA controller to transfer information between the second virtual machine and a range of host physical addresses;

notifying the virtualization software of access completion;

decrementing the reference counter of pending accesses to the pages by setting a DMA exclusion vector to exclude the DMA controller from operating on the pages if the reference counter is decremented to zero; and

removing the mapping of the pages from the temporary guest physical address range if the reference counter is zero.

6. The system of claim 5 , further comprising at least one of a translation look aside buffer and a shadow page table, the at least one of the translation look aside buffer and the shadow page table being updated as a result of the method step of removing the mapping of the pages.

7. The system of claim 6 , wherein the method step of removing the mapping of the pages from the temporary guest physical address range further comprises un-mapping entries of the pages from one or more of the shadow page table and the translation look-aside buffer.

8. The system of claim 5 , wherein the method step of completing access of the pages by the second virtual machine and notifying the virtualization software of access completion comprises receiving an indication from the DMA controller that the information transfer is complete and sending a completion message from the first virtual machine to the second virtual machine, wherein the second virtual machine notifies the virtualization software of completion.

9. A computer-readable storage medium having computer-executable instructions for performing a method of sharing pages between virtual machines, the virtual machines operating using resources from a host computer, the method comprising:

allocating a temporary guest physical address range of a first virtual machine for sharing pages between virtual machines;

receiving a request from a second virtual machine to access pages available to the first virtual machine, the request received by virtualization software on the host computer;

incrementing a reference counter of pending accesses; to indicate a pending DMA (direct memory access) transfer and verifying that a guest physical address to a host physical address mapping for the pages is valid and a DMA exclusion vector allows access to the pages, wherein the reference count acts to lock out other accesses to the pages;

mapping the pages into a portion of the temporary guest physical address range of the first virtual machine;

allowing the pages available to the first virtual machine to be accessed by the second virtual machine by setting up a DMA controller to transfer information between the second virtual machine and a range of host physical addresses;

completing access of the pages by the second virtual machine and notifying the virtualization software of access completion;

decrementing the reference counter of pending accesses to the pages by setting a DMA exclusion vector to exclude the DMA controller from operating on the pages if the reference counter is decremented to zero; and

removing the mapping of the pages from the temporary guest physical address range if the reference counter is zero.

10. The computer-readable storage medium of claim 9 , wherein the step of receiving a request from a second virtual machine to access pages available to the first virtual machine comprises receiving a direct memory address (DMA) request from the second virtual machine to access the pages mapped to the first virtual machine.

11. The computer-readable storage medium of claim 9 , wherein the step of completing access of the pages by the second virtual machine and notifying the virtualization software of access completion comprises receiving an indication from host hardware that DMA operations are complete and sending a completion message from the first virtual machine to the second virtual machine, wherein the second virtual machine notifies the virtualization software of completion.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034543/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 9, 2006
From: HENDEL, MATTHEW D.; TRAUT, ERIC
To: MICROSOFT CORPORATION
Reel/Frame 017810/0771 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 9, 2006
From: HENDEL, MATTHEW D.; TRAUT, ERIC
To: MICROSOFT CORPORATION
Reel/Frame 016989/0224 →
Continuity (1)
Related Publication 20060206658A1 · Sep 14, 2006