Method and apparatus for managing software controlled cache of translating the physical memory access of a virtual machine between different levels of translation entities
AssigneeInternational Business Machines Corporation
InventorsHubertus Franke, Benjamin Herrenschmidt, Jon K. Kriegel, Andrew M. Theurer, James Xenidis
Life of this patent
Estimating the term…
Abstract
A method and a system for allowing a guest operating system (guest OS) to modify an entry in a TLB directly without an involvement of a hypervisor are disclosed. Upon receiving a guest TLB miss exception, a guest OS issues a TLBWE (TLB Write Entry) instruction to logic. The logic executes the TLBWE instruction at a supervisor mode without invoking a hypervisor. The TLB may incorporate entries in a guest page table and entries in a host page table.
Claims20
A method for allowing a guest operating system (guest OS) to modify an entry in a main TLB (Translation Lookahead Buffer) directly without an involvement of a hypervisor comprising:
- providing a guest virtual address (GVA) from the guest OS to the main TLB;
- issuing at the main TLB a guest TLB miss exception, if there is no entry corresponding to the GVA in the main TLB;
- in response to the guest TLB miss exception, issuing a TLBWE (Translation Lookahead Buffer Write Entry) instruction from the guest OS to a hardware logic, the TLBWE instruction including a <the GVA, a guest physical address (GPA)> tuple, the <the GVA, the GPA> tuple indicating the GVA corresponds to the GPA;
- accessing from the hardware logic to a host TLB to find a matching entry in the host TLB, the matching entry including a <the GPA, a host physical address (HPA)> tuple, the <the GPA, the HPA> tuple indicating the GPA corresponds to the HPA;
- constructing a new entry for the main TLB based on the found matching entry and the TLBWE instruction, the new entry including a <the GVA, the HPA> tuple, the <the GVA, the HPA> tuple indicating the GVA corresponds to the HPA;
- and
- entering the new entry from the hardware logic to the main TLB.
A method for allowing a guest operating system (guest OS) to modify an entry in a TLB (Translation Lookahead Buffer) directly without an involvement of a hypervisor comprising:
- providing a guest virtual address (GVA) from the guest OS to the TLB;
- issuing at the TLB a guest TLB miss exception, if there is no entry corresponding to the GVA in the TLB;
- in response to the guest TLB miss exception, issuing a TLBWE (Translation Lookahead Buffer Write Entry) instruction from the guest OS to a hardware logic, the TLBWE instruction including a <the GVA, a guest physical address (GPA)> tuple, the <the GVA, the GPA> tuple indicating the GVA corresponds to the GPA;
- computing, at the hardware logic, a host physical address (HPA) corresponding to the GPA;
- constructing a new entry for the TLB based on the HPA and the TLBWE instruction, the new entry including a <the GVA, the HPA> tuple, the <the GVA, the HPA> tuple indicating the GVA corresponds to the HPA;
- and
- entering the new entry from the hardware logic to the TLB.
A system for allowing a guest operating system (guest OS) to modify an entry in a main TLB (Translation Lookahead Buffer) directly without an involvement of a hypervisor comprising:
- means for providing a guest virtual address (GVA) from the guest OS to the main TLB;
- means for issuing at the main TLB a guest TLB miss exception, if there is no entry corresponding to the GVA in the main TLB;
- means for issuing a TLBWE (Translation Lookahead Buffer Write Entry) instruction from the guest OS to a hardware logic, the TLBWE instruction including a <the GVA, a guest physical address (GPA)> tuple, the <the GVA, the GPA> tuple indicating the GVA corresponds to the GPA;
- means for accessing from the hardware logic to a host TLB to find a matching entry in the host TLB, the matching entry including a <the GPA, a host physical address (HPA)> tuple, the <the GPA, the HPA> tuple indicating the GPA corresponds to the HPA;
- means for constructing a new entry for the main TLB based on the found matching entry and the TLBWE instruction, the new entry including a <the GVA, the HPA> tuple, the <the GVA, the HPA> tuple indicating the GVA corresponds to the HPA;
- and
- means for entering the new entry from the hardware logic to the main TLB.
A system for allowing a guest operating system (guest OS) to modify an entry in a TLB (Translation Lookahead Buffer) directly without an involvement of a hypervisor comprising:
- means for providing a guest virtual address (GVA) from the guest OS to the TLB;
- means for issuing at the TLB a guest TLB miss exception, if there is no entry corresponding to the GVA in the TLB;
- means for issuing a TLBWE (Translation Lookahead Buffer Write Entry) instruction from the guest OS to a hardware logic, the TLBWE instruction including a <the GVA, a guest physical address (GPA)> tuple, the <the GVA, the GPA> tuple indicating the GVA corresponds to the GPA;
- a hardware logic for computing a host physical address (HPA) corresponding to the GPA;
- means for constructing a new entry for the TLB based on the HPA and the TLBWE instruction, the new entry including a <the GVA, the HPA> tuple, the <the GVA, the HPA> tuple indicating the GVA corresponds to the HPA;
- and
- means for entering the new entry from the hardware logic to the TLB.
Dependencies are inferred from the claim text.