IP Library Granted Patent US 7,836,275
Granted Patent B2
US 7,836,275 · App. 12/154,627 · Granted Nov 16, 2010

Method and apparatus for supporting address translation in a virtual machine environment

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,836,275
App. No.
12/154,627
Granted
Nov 16, 2010
Kind
B2
Abstract

In one embodiment, a method includes receiving control transitioned from a virtual machine (VM) due to a privileged event pertaining to a translation-lookaside buffer (TLB), and determining which entries in a guest translation data structure were modified by the VM. The determination is made based on metadata extracted from a shadow translation data structure maintained by a virtual machine monitor (VMM) and attributes associated with entries in the shadow translation data structure. The method further includes synchronizing entries in the shadow translation data structure that correspond to the modified entries in the guest translation data structure with the modified entries in the guest translation data structure.

Claims (63)

1. A method comprising:

creating a shadow page table (PT) hierarchy based on a guest PT hierarchy used by a guest operating system for address translation operations; and

deriving metadata from the shadow PT hierarchy to determine subsequently which entries of the guest PT hierarchy that are represented in the shadow PT hierarchy were modified, the metadata comprising an active entry list identifying mappings that map pages used by the guest operating system in forming the guest PT hierarchy, and one or more active directory lists identifying higher level mapping structures referencing a lower level structure through which the shadow PT hierarchy is to be accessed.

2. The method of claim 1 wherein:

the active entry list is an active PT entry (PTE) list identifying PTEs in the shadow PT hierarchy, which map PT pages and page directory (PD) pages from the guest PT hierarchy, and

the one or more active directory lists include an active PD entry (PDE) list identifying PDEs in the shadow PT hierarchy, which point to PTs with the identified PTEs.

3. The method of claim 1 wherein:

the active entry list is an active PT entry (PTE) list identifying PTEs in the shadow PT hierarchy, which map any of page map level 4 (PML4) pages, page directory pointer (PDP) pages, page directory (PD) pages, and PT pages; and

the one or more active directory lists include an active PD entry (PDE) list containing PDEs that reference a page with active PTE list entries, an active PDP entry (PDPE) list containing active PDPE entries which reference a PD with an active PDE list entry, and an active PML4E entry (PML4E) list containing entries which map a PDP with elements from the active PDPE list.

4. The method of claim 2 further comprising:

tracking pages used by the guest operating system in forming the guest PT hierarchy; and

tracking mappings to any Dynamic Random Access Memory (DRAM) backed page frame.

5. The method of claim 1 further comprising:

identifying one or more large-size pages in the guest PT hierarchy; and

creating a PT table in the shadow PT hierarchy for each of the one or more large-size pages.

6. The method of claim 1 further comprising:

detecting a change in a structure of the guest PT hierarchy; and

modifying the metadata to reflect the change.

7. The method of claim 1 wherein:

content of the shadow PT hierarchy is used by a processor to cache address translations in the TLB.

8. An apparatus comprising:

a memory to store instructions;

a processor, coupled to the memory; and

an address translator, executed from the memory by the processor to:

create a shadow page table (PT) hierarchy based on a guest PT hierarchy used by a guest operating system for address translation operations; and

derive metadata from the shadow PT hierarchy to determine subsequently which entries of the guest PT hierarchy that are represented in the shadow PT hierarchy were modified, the metadata comprising an active entry list identifying mappings that map pages used by the guest operating system in forming the guest PT hierarchy, and one or more active directory lists identifying higher level mapping structures referencing a lower level structure through which the shadow PT hierarchy is to be accessed.

9. The apparatus of claim 8 wherein:

the active entry list is an active PT entry (PTE) list identifying PTEs in the shadow PT hierarchy, which map PT pages and page directory (PD) pages from the guest PT hierarchy, and

the one or more active directory lists include an active PD entry (PDE) list identifying PDEs in the shadow PT hierarchy, which point to PTs with the identified PTEs.

10. The apparatus of claim 8 wherein:

the active entry list is an active PT entry (PTE) list identifying PTEs in the shadow PT hierarchy, which map any of page map level 4 (PML4) pages, page directory pointer (PDP) pages, page directory (PD) pages, and PT pages; and

the one or more active directory lists include an active PD entry (PDE) list containing PDEs that reference a page with active PTE list entries, an active PDP entry (PDPE) list containing active PDPE entries which reference a PD with an active PDE list entry, and an active PML4E entry (PML4E) list containing entries which map a PDP with elements from the active PDPE list.

11. The apparatus of claim 9 wherein the address translator is further executed from the memory by the processor to:

track pages used by the guest operating system in forming the guest PT hierarchy; and

track mappings to any Dynamic Random Access Memory (DRAM) backed page frame.

12. The apparatus of claim 8 wherein the address translator is further executed from the memory by the processor to:

identify one or more large-size pages in the guest PT hierarchy; and

create a PT table in the shadow PT hierarchy for each of the one or more large-size pages.

13. The apparatus of claim 8 wherein the address translator is further executed from the memory by the processor to:

detect a change in a structure of the guest PT hierarchy; and

modify the metadata to reflect the change.

14. The apparatus of claim 8 wherein:

content of the shadow PT hierarchy is used by the processor to cache address translations in the TLB.

15. A non-transient computer readable storage medium including instructions that, when executed by a processing system, cause the processing system to perform a method comprising:

creating a shadow page table (PT) hierarchy based on a guest PT hierarchy used by a guest operating system for address translation operations; and

deriving metadata from the shadow PT hierarchy to determine subsequently which entries of the guest PT hierarchy that are represented in the shadow PT hierarchy were modified, the metadata comprising an active entry list identifying mappings that map pages used by the guest operating system in forming the guest PT hierarchy, and one or more active director,,/lists identifying higher level mapping structures referencing a lower level structure through which the shadow PT hierarchy is to be accessed.

16. The computer readable storage medium of claim 15 wherein:

the active entry list is an active PT entry (PTE) list identifying PTEs in the shadow PT hierarchy, which map PT pages and page directory (PD) pages from the guest PT hierarchy, and

the one or more active directory lists include an active PD entry (PDE) list identifying PDEs in the shadow PT hierarchy, which point to PTs with the identified PTEs.

17. The computer readable storage medium of claim 15 wherein:

the active entry list is an active PT entry (PTE) list identifying PTEs in the shadow PT hierarchy, which map any of page map level 4 (PML4) pages, page directory pointer (PDP) pages, page directory (PD) pages, and PT pages; and

the one or more active directory lists include an active PD entry (PDE) list containing PDEs that reference a page with active PTE list entries, an active PDP entry (PDPE) list containing active PDPE entries which reference a PD with an active PDE list entry, and an active PML4E entry (PML4E) list containing entries which map a PDP with elements from the active PDPE list.

18. The computer readable storage medium of claim 16 , wherein the method further comprises:

tracking pages used by the guest operating system in forming the guest PT hierarchy; and

tracking mappings to any Dynamic Random Access Memory (DRAM) backed page frame.

19. The computer readable storage medium of claim 15 , wherein the method further comprises:

identifying one or more large-size pages in the guest PT hierarchy; and

creating a PT table in the shadow PT hierarchy for each of the one or more large-size pages.

20. The computer readable storage medium of claim 15 , wherein the method further comprises:

detecting a change in a structure of the guest PT hierarchy; and

modifying the metadata to reflect the change.

21. The computer readable storage medium of claim 15 wherein:

content of the shadow PT hierarchy is used by a processor to cache address translations in the TLB.

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