Virtualization system using hardware assistance for shadow page table coherence
AssigneeVMware, Inc.
InventorsKeith Adams, Sahil Rihan
Life of this patent
Estimating the term…
Abstract
One embodiment of the present invention includes a method for maintaining a shadow page table in at least partial correspondence with guest page mappings of a guest computation. The method marking with a traced write indication at least those entries of the shadow page table that map physical memory locations which themselves encode the guest page mappings, the marking identifying, for a hardware facility, a subset of memory access targets for which updates are to be recorded in a guest write buffer accessible to the virtualization system. Responsive to a coherency-inducing operation of the guest computation, the method reads from the guest write buffer and introduces corresponding updates into the shadow page table.
Claims32
A method of managing memory mappings in a virtualization system, the method comprising:
- maintaining a shadow page table in at least partial correspondence with guest page mappings of a guest computation;
- marking with a traced write indication at least those entries of the shadow page table that map physical memory locations which themselves encode the guest page mappings, the marking identifying, for a hardware facility, a subset of memory access targets for which updates are to be recorded in a guest write buffer accessible to the virtualization system;
- and
- responsive to a coherency-inducing operation of the guest computation, reading from the guest write buffer and introducing corresponding updates into the shadow page table.
A method of operating a virtualization system, the method comprising:
- supplying underlying hardware with indications of those locations in physical memory for which the virtualization system wishes to receive buffered write information, the indicated locations corresponding to those that encode page mapping information of a guest operating system executing in a virtual machine of the virtualization system;
- and
- asynchronous with write-type accesses performed for the guest operating system which target the indicated locations, but responsive to a coherency-inducing operation of the guest operating system, updating a shadow page table of the virtualization system based on the buffered write information.
A virtualization system that, at a coherence boundary, assures coherence between a shadow page table employed by memory management hardware and a guest page table managed by guest software by (i) providing the memory management hardware with an identification of those of the shadow page table entries that map guest virtual addresses to physical memory locations which themselves encode entries of the guest page table and (ii) at the coherence boundary, accessing a buffered set of updates supplied by the memory management hardware for the physical memory locations so identified and introducing corresponding updates into shadow page tables.
A computer program product embodied in one or more computer readable media and comprising:
- program code executable on a physical machine to implement a virtualization system that exports at least one virtual machine to a guest computation;
- the program code including a virtualization system memory manager executable to maintain a shadow page table in memory of the physical machine in at least partial correspondence with guest page mappings of the guest computation, wherein the memory manager marks with a traced write indication at least those entries of the shadow page table that map locations in the memory of the physical machine which themselves encode the guest page mappings, the marking identifying, for the physical machine, a subset of memory access targets for which updates are to be recorded in a guest write buffer accessible to the virtualization system memory manager;
- wherein the virtualization system memory manager is further executable to, asynchronously but in response to a coherency-inducing operation of the guest computation, read from the guest write buffer and introduce corresponding updates into the shadow page table.
Dependencies are inferred from the claim text.