TLB miss fault handler and method for accessing multiple page tables
First Claim
1. A computer program embodied in a tangible medium, the computer program being executable in a virtual computer system, the virtual computer system comprising a virtual machine monitor having a first address space and a virtual machine having a second address space, the virtual computer system further comprising a first page table for mapping addresses from the first address space and a second page table for mapping addresses from the second address space, the computer program comprising:
- a first routine for responding to a TLB Miss fault resulting from an attempted memory access, the first routine executing in the same context in which the TLB Miss fault occurred; and
a second routine executing in a different context from the first routine, wherein;
the first routine determines an operating state in which the virtual computer system was operating when the TLB Miss fault occurred,the first routine receives an address space identifier which indicates if the attempted memory access was to the first address space or the second address space,the first routine uses the operating state and the address space identifier to determine if the attempted memory access is permitted, andif the attempted memory access is permitted, the first routine uses the address space identifier to determine if the attempted memory access was to the first address space or the second address space, and, if the attempted memory access was to the first address space, the first routine attempts to find a translation for the attempted memory access in the first page table, or, if the attempted memory access was to the second address space, the first routine attempts to find a translation for the attempted memory access in the second page table, orthe attempted memory access is not permitted, a context switch is performed and execution switches to the second routine for responding to the impermissible attempted memory access.
1 Assignment
0 Petitions
Accused Products
Abstract
A virtual memory system implementing the invention provides concurrent access to translations for virtual addresses from multiple address spaces. One embodiment of the invention is implemented in a virtual computer system, in which a virtual machine monitor supports a virtual machine. In this embodiment, the invention provides concurrent access to translations for virtual addresses from the respective address spaces of both the virtual machine monitor and the virtual machine. Multiple page tables contain the translations for the multiple address spaces. Information about an operating state of the computer system, as well as an address space identifier, are used to determine whether, and under what circumstances, an attempted memory access is permissible. If the attempted memory access is permissible, the address space identifier is also used to determine which of the multiple page tables contains the translation for the attempted memory access.
-
Citations
27 Claims
-
1. A computer program embodied in a tangible medium, the computer program being executable in a virtual computer system, the virtual computer system comprising a virtual machine monitor having a first address space and a virtual machine having a second address space, the virtual computer system further comprising a first page table for mapping addresses from the first address space and a second page table for mapping addresses from the second address space, the computer program comprising:
-
a first routine for responding to a TLB Miss fault resulting from an attempted memory access, the first routine executing in the same context in which the TLB Miss fault occurred; and a second routine executing in a different context from the first routine, wherein; the first routine determines an operating state in which the virtual computer system was operating when the TLB Miss fault occurred, the first routine receives an address space identifier which indicates if the attempted memory access was to the first address space or the second address space, the first routine uses the operating state and the address space identifier to determine if the attempted memory access is permitted, and if the attempted memory access is permitted, the first routine uses the address space identifier to determine if the attempted memory access was to the first address space or the second address space, and, if the attempted memory access was to the first address space, the first routine attempts to find a translation for the attempted memory access in the first page table, or, if the attempted memory access was to the second address space, the first routine attempts to find a translation for the attempted memory access in the second page table, or the attempted memory access is not permitted, a context switch is performed and execution switches to the second routine for responding to the impermissible attempted memory access. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. In a virtual computer system comprising a virtual machine monitor having a first address space and a virtual machine having a second address space, the virtual machine monitor having an emulation mode that may access both the first and the second address spaces and a direct execution mode that may only access the second address space, a method for providing virtual address translations for both the emulation mode and the direct execution mode, the method comprising:
-
providing a first page table having translations for the first address space; providing a second page table having translations for the second address space; and in response to a TLB Miss fault, performing the following steps; determining whether the virtual machine monitor was in the emulation mode or the direction execution mode when the TLB Miss fault occurred; determining whether the TLB Miss fault resulted from an attempt to access the first address space or the second address space; and
;if the virtual machine monitor was in the emulation mode and the attempted access was to the first address space, obtaining the virtual address translation from the first page table; if the virtual machine monitor was in the emulation mode and the attempted access was to the second address space, obtaining the virtual address translation from the second page table;
or if the virtual machine monitor was in the direct execution mode and the attempted access was to the second address space, obtaining the virtual address translation from the second page table. - View Dependent Claims (15, 16, 17, 18, 19)
-
-
20. A method of emulating a guest instruction in a virtual computer system, the virtual computer system comprising a virtual machine monitor having a first address space and a virtual machine having a second address space, the method comprising:
-
using one or more references to the first address space to retrieve one or more emulation instructions, wherein execution of the emulation instructions emulates the execution of the guest instruction; using one or more references to the second address space to retrieve one or more data for use with the emulation instructions; providing a first page table for translations for the first address space; providing a second page table for translations for the second address space; and in response to an attempted memory access, using an address space identifier to determine if the attempted memory access was to the first address space or to the second address space, and, if the attempted memory access was to the first address space, using the first page table to obtain a translation for the attempted memory access, or, if the attempted memory access was to the second address space, using the second page table to obtain a translation for the attempted memory access. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27)
-
Specification