Page table entry caches with multiple tag lengths
Systems and methods are disclosed for page table entry caches with multiple tag lengths. For example, an integrated circuit (e.g., a processor) includes a page table walk circuitry including a page table entry cache, in which the page table walk circuitry is configured to access a multi-level page table, and in which a first entry of the page table entry cache combines a first number of multiple levels and a second entry of the page table entry cache combines a second number of multiple levels that is different from the first number of multiple levels.
1 . An integrated circuit comprising:
a page table walk circuitry including a page table entry cache, wherein the page table walk circuitry is configured to access a first multi-level page table that encodes a first stage address translation in a two-stage address translation, wherein a first entry of the page table entry cache includes a first tag and combines a first number of multiple levels, wherein a second entry of the page table entry cache includes a second tag and combines a second number of multiple levels that is different from the first number of multiple levels, wherein at least one of the first tag or the second tag are used checking the page table entry cache, wherein the first tag includes a translation tag that indicates a privilege level, a virtualization mode, and a translation mode;
wherein the page table walk circuitry is further configured to:
check the page table entry cache for a guest virtual address using multiple tag lengths corresponding to overlapping subsets of the guest virtual address;
responsive to finding a tag matching a subset of the guest virtual address, access a guest physical address that is stored in an entry of the page table entry cache corresponding to the tag matching a subset of the guest virtual address;
check the page table entry cache for the guest physical address using multiple tag lengths corresponding to overlapping subsets of the guest physical address;
responsive to finding a tag matching a subset of the guest physical address, access a first system physical address that is stored in an entry of the page table entry cache corresponding to the tag matching a subset of the guest physical address;
determine a second system physical address as a translation of the guest physical address by continuing a page table walk of the first multi-level page table using the first system physical address pointing to a page table in the first multi-level page table; and
continue a page table walk of a second multi-level page table using the second system physical address pointing to a page table in the second multi-level page table.
2 . The integrated circuit of claim 1 , wherein the first tag has a different length than the second tag.
3 . The integrated circuit of claim 1 , wherein
responsive to finding matches at two or more different tag lengths for the guest virtual address, the page table walk circuitry is configured to select an entry of the page table entry cache corresponding to a match with a longest tag length from among the matches and continue the page table walk using the guest physical address pointing to a page table that is stored in the selected entry of the page table entry cache.
4 . The integrated circuit of claim 1 , wherein the translation mode is from a set of translation modes consisting of a single-stage translation mode, a G-stage only mode, a VS-stage only mode, and a nested translation mode.
5 . The integrated circuit of claim 1 , wherein the page table entry cache is a first page table entry cache, and wherein the page table walk circuitry further comprises:
a second page table entry cache, wherein the second multi-level page table encodes a second stage address translation in the two-stage address translation, and wherein a third entry of the second page table entry cache combines a third number of multiple levels and a fourth entry of the second page table entry cache combines a fourth number of multiple levels that is different from the third number of multiple levels.
6 . The integrated circuit of claim 5 , wherein
responsive to finding matches at two or more different tag lengths for the guest physical address, the page table walk circuitry is configured to select an entry of the first page table entry cache corresponding to a match with a longest tag length from among the matches and continue the page table walk using the first system physical address pointing to a page table that is stored in the selected entry of the first page table entry cache.
7 . A method comprising:
receiving an address translation request including a guest virtual address;
checking a page table entry cache for the guest virtual address using multiple tag lengths corresponding to overlapping subsets of the guest virtual address;
responsive to finding a tag matching a subset of the guest virtual address, accessing a guest physical address that is stored in an entry of the page table entry cache corresponding to the tag matching a subset of the guest virtual address;
checking the page table entry cache for the guest physical address using multiple tag lengths corresponding to overlapping subsets of the guest physical address;
responsive to finding a tag matching a subset of the guest physical address, accessing a first system physical address that is stored in an entry of the page table entry cache corresponding to the tag matching a subset of the guest physical address;
determining a second system physical address as a translation of the guest physical address by continuing a page table walk of a first multi-level page table using the first system physical address pointing to a page table in the first multi-level page table; and
continuing a page table walk of a second multi-level page table using the second system physical address pointing to a page table in the second multi-level page table to determine a third system physical address as a translation of the guest virtual address.
8 . The method of claim 7 , wherein a tag of a first entry of the page table entry cache has a different length than a tag of a second entry of the page table entry cache.
9 . The method of claim 7 , wherein a first entry of the page table entry cache combines a first number of multiple levels and a second entry of the page table entry cache combines a second number of multiple levels that is different from the first number of multiple levels.
10 . The method of claim 7 , wherein the tag matching a subset of the guest virtual address includes a translation tag that indicates a translation mode is a nested translation mode.
11 . The method of claim 7 , wherein the tag matching a subset of the guest physical address includes a translation tag that indicates a translation mode is a G-stage only mode.
12 . A non-transitory computer readable medium storing instructions, that upon execution, cause operations comprising:
receiving an address translation request including a guest virtual address;
checking a page table entry cache for the guest virtual address using multiple tag lengths corresponding to overlapping subsets of the guest virtual address;
responsive to finding a tag matching a subset of the guest virtual address, accessing a guest physical address that is stored in an entry of the page table entry cache corresponding to the tag matching a subset of the guest virtual address;
checking the page table entry cache for the guest physical address using multiple tag lengths corresponding to overlapping subsets of the guest physical address;
responsive to finding a tag matching a subset of the guest physical address, accessing a first system physical address that is stored in an entry of the page table entry cache corresponding to the tag matching a subset of the guest physical address;
determining a second system physical address as a translation of the guest physical address by continuing a page table walk of a first multi-level page table using the first system physical address pointing to a page table in the first multi-level page table; and
continuing a page table walk of a second multi-level page table using the second system physical address pointing to a page table in the second multi-level page table to determine a third system physical address as a translation of the guest virtual address.
13 . The non-transitory computer readable medium of claim 12 , wherein a tag of a first entry of the page table entry cache has a different length than a tag of a second entry of the page table entry cache.
14 . The non-transitory computer readable medium of claim 12 , wherein a first entry of the page table entry cache combines a first number of multiple levels and a second entry of the page table entry cache combines a second number of multiple levels that is different from the first number of multiple levels.
15 . The non-transitory computer readable medium of claim 12 , wherein the tag matching a subset of the guest virtual address includes a translation tag that indicates a translation mode is a nested translation mode.
16 . The non-transitory computer readable medium of claim 12 , wherein the tag matching a subset of the guest physical address includes a translation tag that indicates a translation mode is a G-stage only mode.