Bypassing guest page table walk for shadow page table entries not present in guest page table
AssigneeVMware, Inc.
InventorsSahil Rihan, Pratap Subrahmanyam
Life of this patent
Estimating the term…
Abstract
A method and system are provided that does not perform a page walk on the guest page tables if the shadow page table entry corresponding to the guest virtual address for accessing the virtual memory indicates that a corresponding mapping from the guest virtual address to a guest physical address is not present in the guest page tables. A marker or indicator is stored in the shadow page table entries to indicate that a mapping corresponding to the guest virtual address of the shadow page table entry is not present in the guest page table.
Claims30
For a virtual memory of a virtualized computer system in which guest page tables map virtual addresses to guest physical addresses which are backed by machine addresses, and shadow page tables and a translation look-aside buffer map the virtual addresses to the corresponding machine addresses, a computer-implemented method of accessing the virtual memory using a virtual address, the method comprising:
- determining whether an indicator of a shadow page table entry corresponding to the virtual address is in a first state or a second state, the indicator indicating whether the guest page tables contain a valid address translation for the virtual address, this indication being distinct from an indication as to whether the shadow page tables contain a valid address translation for the virtual address, so that a shadow page table entry may indicate that the shadow page tables do not contain a valid address translation for the virtual address while indicating that the guest page tables do contain a valid address translation for the virtual address;
- responsive to the indicator being in the first state, performing an address translation look-up in the guest page tables to determine a guest physical address corresponding to the virtual address, using the guest physical address to determine a corresponding machine address, and inserting into the shadow page tables a mapping from the virtual address to the corresponding machine address;
- and
- responsive to the indicator being in the second state, delivering a page fault indication to guest system software, without performing the address translation look-up in the guest page tables.
For a virtual memory of a virtualized computer system in which guest page tables map virtual addresses to guest physical addresses which are backed by machine addresses, and shadow page tables and a translation look-aside buffer map the virtual addresses to the corresponding machine addresses, a computer program product stored on a non-transitory computer readable medium and configured to perform a computer-implemented method of accessing the virtual memory using a virtual address, the method comprising:
- determining whether an indicator of a shadow page table entry corresponding to the virtual address is in a first state or a second state, the indicator indicating whether the guest page tables contain a valid address translation for the virtual address, this indication being distinct from an indication as to whether the shadow page tables contain a valid address translation for the virtual address, so that a shadow page table entry may indicate that the shadow page tables do not contain a valid address translation for the virtual address while indicating that the guest page tables do contain a valid address translation for the virtual address;
- responsive to the indicator being in the first state, performing an address translation look-up in the guest page tables to determine a guest physical address corresponding to the virtual address, using the guest physical address to determine a corresponding machine address, and inserting into the shadow page tables a mapping from the virtual address to the corresponding machine address;
- and
- responsive to the indicator being in the second state, delivering a page fault indication to guest system software, without performing the address translation look-up in the guest page tables.
A virtualized computer system running on a host computer, including virtual memory wherein guest page tables map virtual addresses to guest physical addresses which are backed by machine addresses, and shadow page tables and a translation look-aside buffer map the virtual addresses to the corresponding machine addresses, the virtualized computer system including a storage device storing computer instructions configured to perform a computer-implemented method of accessing the virtual memory using a virtual address, and one or more central processing units for executing the computer instructions, the method comprising:
- determining whether an indicator of a shadow page table entry corresponding to the virtual address is in a first state or a second state, the indicator indicating whether the guest page tables contain a valid address translation for the virtual address, this indication being distinct from an indication as to whether the shadow page tables contain a valid address translation for the virtual address, so that a shadow page table entry may indicate that the shadow page tables do not contain a valid address translation for the virtual address while indicating that the guest page tables do contain a valid address translation for the virtual address;
- responsive to the indicator being in the first state, performing an address translation look-up in the guest page tables to determine a guest physical address corresponding to the virtual address, using the guest physical address to determine a corresponding machine address, and inserting into the shadow page tables a mapping from the virtual address to the corresponding machine address;
- and
- responsive to the indicator being in the second state, delivering a page fault indication to guest system software, without performing the address translation look-up in the guest page tables.
For a virtual memory of a virtualized computer system in which guest page tables map virtual addresses to guest physical addresses which are backed by machine addresses, and shadow page tables and a translation look-aside buffer map the virtual addresses to the corresponding machine addresses, a computer-implemented method of managing the shadow page tables, the method comprising:
- detecting a guest page table entry that cannot be used to translate a guest virtual address to a guest physical address;
- and
- responsive to detecting the guest page table entry, setting an indicator of a shadow page table entry corresponding to the virtual address to a first state, the indicator indicating whether the guest page tables contain a valid address translation for the virtual address, this indication being distinct from an indication as to whether the shadow page tables contain a valid address translation for the virtual address, so that a shadow page table entry may indicate that the shadow page tables do not contain a valid address translation for the virtual address while indicating that the guest page tables do contain a valid address translation for the virtual address.
For a virtual memory of a virtualized computer system in which guest page tables map virtual addresses to guest physical addresses which are backed by machine addresses, and shadow page tables and a translation look-aside buffer map the virtual addresses to the corresponding machine addresses, a computer program product stored on a non-transitory computer readable medium and configured to perform a computer-implemented method of managing the shadow page tables, the method comprising:
- detecting a guest page table entry that cannot be used to translate a guest virtual address to a guest physical address;
- and
- responsive to detecting the guest page table entry, setting an indicator of the shadow page table entry corresponding to the virtual address to a first state, the indicator indicating whether the guest page tables contain a valid address translation for the virtual address, this indication being distinct from an indication as to whether the shadow page tables contain a valid address translation for the virtual address, so that a shadow page table entry may indicate that the shadow page tables do not contain a valid address translation for the virtual address while indicating that the guest page tables do contain a valid address translation for the virtual address.
A virtualized computer system running on a host computer, including virtual memory wherein guest page tables map virtual addresses to guest physical addresses which are backed by machine addresses, and shadow page tables and a translation look-aside buffer map the virtual addresses to the corresponding machine addresses, the virtualized computer system including a storage device storing computer instructions configured to perform a computer-implemented method of managing the shadow page tables, and one or more central processing units for executing the computer instructions, the method comprising:
- detecting a guest page table entry that cannot be used to translate a guest virtual address to a guest physical address;
- and
- responsive to detecting the guest page table entry, setting an indicator of the shadow page table entry corresponding to the virtual address to a first state, the indicator indicating whether the guest page tables contain a valid address translation for the virtual address, this indication being distinct from an indication as to whether the shadow page tables contain a valid address translation for the virtual address, so that a shadow page table entry may indicate that the shadow page tables do not contain a valid address translation for the virtual address while indicating that the guest page tables do contain a valid address translation for the virtual address.
Dependencies are inferred from the claim text.