IP Library Granted Patent US 8,392,628
Granted Patent B2
US 8,392,628 · App. 12/838,256 · Granted Mar 5, 2013

Sharing memory spaces for access by hardware and software in a virtual machine environment

Inventors: Jose Renato G. Santos (San Jose, CA); Yoshio Turner (San Francisco, CA)
Assignee: Hewlett-Packard Development Company, L.P.
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,392,628
App. No.
12/838,256
Filed
Jul 16, 2010
Granted
Mar 5, 2013
Kind
B2
Art Unit
2181
USPC
710/22
Abstract

Example methods, apparatus, and articles of manufacture to share memory spaces for access by hardware and software in a virtual machine environment are disclosed. A disclosed example method involves enabling a sharing of a memory page of a source domain executing on a first virtual machine with a destination domain executing on a second virtual machine. The example method also involves mapping the memory page to an address space of the destination domain and adding an address translation entry for the memory page in a table. In addition, the example method involves sharing the memory page with a hardware device for direct memory access of the memory page by the hardware device.

Claims (40)

1. A method to share memory resources between first and second virtual machines, the method comprising:

enabling sharing of a memory page of a source domain executing on a first virtual machine with a destination domain executing on a second virtual machine;

allocating a virtual address mapping region for the memory page of the source domain in a virtual address space of the destination domain by allocating a memory range in the virtual address space, the memory range mapped to a base virtual address of the source domain, and the base virtual address received in an initialization request from the destination domain;

adding an address translation entry for the memory page in a table;

operating a hypervisor to service a grant request from the source domain to provide the destination domain and a hardware device with access to the memory page of the source domain; and

maintaining the allocated virtual address mapping region in the virtual address space until a revoke request is received at the hypervisor from the source domain, the revoke request including a translation table handle field and a page handle field to deny attempts to access the memory page when it is unshared.

2. A method as defined in claim 1 , wherein the table is an input/output memory management unit (IOMMU) table.

3. A method as defined in claim 2 , further comprising:

removing the address translation entry from the IOMMU table and unmapping the memory page from the virtual address space of the destination domain after the revoke request is received from the source domain.

4. A method as defined in claim 1 , wherein the allocating of the virtual address mapping region for the memory page, and the adding of the address translation entry are performed by the hypervisor.

5. A method as defined in claim 1 , wherein the source domain is a guest domain and the destination domain is a driver domain, the driver domain to exchange information between the source domain and the hardware device.

6. An apparatus to share memory resources between first and second virtual machines, the apparatus comprising:

a processor; and

a memory having instructions stored thereon that, when executed, cause the processor to at least:

respond to an initialization request to initialize a first virtual machine for sharing memory of the first virtual machine by:

initializing a first input/output memory management unit (IOMMU) table for a first device; and

allocating a virtual address mapping region for the memory of the first virtual machine in a virtual address space table of a second virtual machine by allocating a memory range in the virtual address space table, the memory range mapped to a base virtual address of the first virtual machine, and the base virtual address received in the initialization request;

operate a hypervisor to service a grant request from the first virtual machine to share the memory of the first virtual machine with the second virtual machine; and

unmap the allocated virtual address mapping region from the virtual address space table when a revoke request is received at the hypervisor from the first virtual machine, the revoke request including a translation table handle field and a page handle field to deny attempts to access the memory when it is unshared.

7. An apparatus as defined in claim 6 , wherein the instructions, when executed, further cause the processor to initialize a second IOMMU table for a second device in response to a second initialization request associated with initializing the sharing of the memory of the first virtual machine in the virtual machine environment.

8. An apparatus as defined in claim 7 , wherein the instructions, when executed, further cause the processor to initialize a first mapping region in the first IOMMU table corresponding to a memory page shared by the first virtual machine and a second mapping region in the second IOMMU table corresponding to the memory page shared by the first virtual machine.

9. An apparatus as defined in claim 6 , wherein the second virtual machine is a driver virtual machine and the first virtual machine is a guest virtual machine.

10. An apparatus as defined in claim 6 , wherein the instructions, when executed, further cause the processor to generate the translation table handle for use by the first virtual machine to identify the virtual address mapping region corresponding to the first virtual machine in the virtual address space table.

11. An apparatus as defined in claim 6 , wherein the first IOMMU table and the virtual address space table are initialized by the hypervisor executed by the processor.

12. An apparatus as defined in claim 6 , wherein the initialization request includes:

the base virtual address of the memory;

a base virtual input/output address of the memory to allocate an IOMMU address mapping region corresponding to the first virtual machine in the IOMMU table; and

a range size value indicative of a size of the virtual address mapping region and indicative of a size of the IOMMU address mapping region.

13. A tangible machine readable storage device or storage disc comprising instructions that, when executed, cause a machine to at least:

enable sharing of a memory page of a source domain executing on a first virtual machine with a destination domain executing on a second virtual machine;

allocate a virtual address mapping region for the memory page of the source domain in a virtual address space of the destination domain by allocating a memory range in the virtual address space, the memory range mapped to a base virtual address of the source domain, and the base virtual address received in an initialization request from the destination domain;

add an address translation entry for the memory page in a table;

operate a hypervisor to service a grant request from the source domain to provide the destination domain and a hardware device with access to the memory page of the source domain; and

maintain the allocated virtual address mapping region in the virtual address space until a revoke request is received at the hypervisor from the source domain, the revoke request including a translation table handle field and a page handle field to deny attempts to access the memory page when it is unshared.

14. The tangible machine readable storage device or storage disc as defined in claim 13 , wherein the table is an input/output memory management unit (IOMMU) table.

15. The tangible machine readable storage device or storage disc as defined in claim 14 having instructions stored thereon that, when executed, further cause the machine to use the address translation entry in the IOMMU table to verify and translate addresses associated with direct memory access (DMA) transfers between the hardware device and the memory page.

16. The tangible machine readable storage device or storage disc as defined in claim 14 having instructions stored thereon that, when executed, further cause the machine to:

remove the address translation entry from the IOMMU table and unmap the memory page from the virtual address space of the destination domain after the revoke request is received from the source domain.

17. The tangible machine readable storage device or storage disc as defined in claim 13 , wherein the allocating of the virtual address mapping region for the memory page, and the adding of the address translation entry are performed by the hypervisor.

18. The tangible machine readable storage device or storage disc as defined in claim 13 , wherein the source domain is a great domain and the destination domain is a driver domain, the driver domain to exchange information between the source domain and the hardware device.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 9, 2015
From: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
To: HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP
Reel/Frame 037079/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 5, 2010
From: SANTOS, JOSE RENATO G.; TURNER, YOSHIO
To: HEWLETT-PACKARD DEVELOPMENT COMPANY, L.P.
Reel/Frame 024801/0757 →
Continuity (1)
Related Publication 20120017029A1 · Jan 19, 2012