Selectable address translation mechanisms
The system addresses inefficiencies in memory management by supporting multiple address translation structures, optimizing virtual memory access through dynamic selection, enhancing system performance and addressing fixed physical memory limitations.
Patent Information
- Application Number
- DE112013004397
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2012-10-08
- Filing Date
- 2013-10-08
- Publication Date
- 2024-11-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing memory management systems face inefficiencies due to fixed physical memory limitations, necessitating the use of virtual memory, which requires effective address translation methods that are not optimally addressed by current techniques.
A system and method that supports multiple address translation structures, including hash and hierarchical page tables, allowing selection of the most suitable structure based on system configuration and memory conditions to enhance translation efficiency.
Enhances memory access performance by dynamically selecting the optimal translation mechanism, improving system efficiency and addressing the limitations of fixed physical memory through virtual memory management.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND OF THE INVENTION
[0001] One or more aspects relate generally to a memory of a computing environment, and more particularly to enabling translation of memory addresses used to access the memory.
[0002] System configurations include physical memory used to store applications and data. The amount of physical memory is fixed and often insufficient for user needs. Therefore, to provide additional memory, or at least the appearance of additional memory, a memory management method known as virtual memory is used. Virtual memory uses virtual addressing, which provides ranges of addresses that can appear much larger than the physical size of main memory.
[0003] To access main memory in a system configuration that includes virtual memory, a memory access request is made, which includes an effective address. The effective address is translated into a real address, which is used to access physical memory.
[0004] A translation is performed using an address translation method. Several address translation methods are available. For example, in PowerPC systems offered by the International Business Machines Corporation, an effective address is translated into a corresponding real address using page table entries. These entries are found by selecting a table entry corresponding to the effective address with an effective segment identifier (ESID) and using the entry to find a group of page table entries using a hash algorithm. In another example, in the z / architecture, also offered by the International Business Machines Corporation, an effective address is translated into a corresponding real address using a hierarchy of translation tables.Translation tables are indexed by a portion of the effective address to determine the address of the next translation table in the hierarchy until a real (or absolute) address is obtained. Both address translation methods provide advantages for their respective operating systems.
[0005] From US 2007 / 0283125 A1 it is known to check, after accessing a virtual memory address, whether it lies in a predetermined address range or not and, depending on this check, to optionally use higher-order bits to determine a page or to use a segment table to derive a physical address.
[0006] US 2012 / 0159039 A1 discloses that a number of translation options are available to move from a virtual address space to a physical address space. SUMMARY
[0007] By providing a computer program product that enables a conversion of a working memory address, disadvantages of the prior art are overcome and additional advantages are provided. The computer program product comprises a working memory medium that is readable by a processing circuit and stores instructions for execution by the processing circuit to perform a method. The method includes, for example,obtaining, by a processor, a memory address to be translated, the processor having a first type of address translation structure and a second type of address translation structure available for translating the memory address, the first type being structurally different from the second type; and selecting, by the processor, one type of address translation structure of the first type of address translation structure and the second type of address translation structure to be used to translate the memory address. The method further comprises obtaining, by the processor, a first address to be translated to a second address, and using a third type of address translation structure to translate the first address to the second address, the second address being the memory address to be translated by the selected one type of address translation structure.Here, the first address has a virtual guest address, the second address has a physical guest address and the method further comprises converting the physical guest address into a physical host address.
[0008] Methods and systems relating to one or more aspects are also described and claimed herein. Furthermore, services relating to one or more aspects are also described and, where appropriate, claimed herein.
[0009] Additional features and advantages are realized by the methods described herein. Further embodiments and aspects are described in detail herein and are considered part of the claimed aspects. BRIEF DESCRIPTION OF THE DIFFERENT VIEWS OF THE DRAWINGS
[0010] One or more aspects are particularly emphasized and expressly claimed as examples in the claims at the end of the specification. The above, as well as objects, features, and advantages of one or more aspects, will become apparent from the following detailed description taken in conjunction with the accompanying drawings, in which: Fig. 1A illustrates an example of a computing environment that includes and utilizes one or more aspects of an implementation capability; Fig. 1B illustrates another example of a computing environment that includes and utilizes one or more aspects of an implementation capability; Fig. 2A illustrates an example of a high-level view of virtual memory mapped to physical memory using a hash page table method; Fig.Figure 2B illustrates an example of a method for generating a virtual address; Fig. Figure 2C illustrates an example structure of a hash page table implementation; Fig. 3 illustrates an example of a segment translation buffer containing example fields of an entry in a segment translation buffer; Fig. Figure 4A shows an example of a page table; Fig. Figure 4B illustrates an example page table entry; Fig. Figure 5A illustrates an example of a hierarchical implementation mechanism; Fig. 5B illustrates an example of indexing general translation tables; Fig. Figure 6A illustrates an example page table entry for the z / architecture; Fig. Figure 6B illustrates an example page table entry for the Power ISA architecture; Fig.7A illustrates one embodiment of logic for selecting a translation mechanism; Fig. 7B illustrates one embodiment of logic used by a hypervisor to handle an address translation error; Fig. Figure 5A illustrates an example of a hierarchical radix translation mechanism; Fig. Figure 9 shows an example of a radix-to-radix transformation mechanism; Fig. 10 illustrates an example of a radix-to-hash page table conversion mechanism; Fig. 11 illustrates an example of using a translation structure of one type to point to a translation structure of another type and perform an address translation; Fig. 12 shows an example of a radix-to-offset conversion mechanism; Fig. 13 illustrates an example of a hash page table translation mechanism; Fig. 14 illustrates an example of a Dynamic Address Translation (DAT) mechanism; and Fig. 15 illustrates an embodiment of a computer program product incorporating one or more aspects. DETAILED DESCRIPTION
[0011] According to one aspect, a system configuration is provided which has available different types of translation structures for use in translating memory addresses from one format (e.g., an effective address and, in particular, a virtual address associated with it) to another format (e.g., a real address). Multiple translation structure formats (e.g., multiple page table formats such as hash page tables and hierarchical page tables) are supported simultaneously in a system configuration, and control is provided to select, for a particular address to be translated, one or more types of translation structures to be used in the translation. In one embodiment, the different types of translation structures are structurally distinct and include, for example, hash structures, hierarchical structures, and / or offset structures, which are described further below.
[0012] Data transfer environments of various architectures may incorporate and utilize one or more aspects of the address translation capability provided here. Environments based on the PowerPC architecture, also known as Power ISA, offered by International Business Machines Corporation and defined in the "Power ISA™ Version 2.06 Revision B" specification, incorporated herein by reference in its entirety. dated July 23, 2010, may include one or more aspects, as may data processing environments of other architectures, such as the z / Architecture offered by International Business Machines Corporation and described in "z / Architecture - Principles of Operation", publication SA22-7932-08, 9th edition, August 2010, which is incorporated herein by reference in its entirety.
[0013] An example of a data processing environment that incorporates and uses one or more aspects of implementation capability is given with regard to Fig. 1A. In one example, a computing environment 100 includes a processor (central processing unit (CPU)) 102 having at least a portion including a memory management unit (MMU) or translation lookaside buffer (TLB) 104 and a cache 106. The processor 102 is communicatively coupled to a memory portion 108 having a cache 110 and an input / output (I / O) portion 112. The I / O portion 112 is communicatively coupled to external I / O devices 114, which may include, for example, data input devices, sensors, and / or output devices such as displays.
[0014] The memory management unit 104 is used to manage the memory portion 108, among other things, to enable access to the memory by providing address translation. To enhance address translation, the memory management unit uses a TLB. The TLB is a cache of previously translated addresses. Thus, when a memory access request is received that includes an address to be translated, the TLB is first checked. If the address and its translation are located in the TLB, no translation is necessary. Otherwise, the received address is translated using any number of translation methods.
[0015] Another embodiment of a data processing environment incorporating and utilizing one or more aspects of the present invention is described in Fig.1B. In this example, a computing environment 150 includes a server 152, which includes, for example, one or more virtual machines 154, one or more central processors (e.g., CPUs) 156, at least one hypervisor 158, and an input / output subsystem 160. The virtual machines and the hypervisor are contained in a memory 162.
[0016] In this embodiment, each virtual machine is capable of providing a guest operating system 168 and may run one or more applications 170. An operating system or application running in a virtual machine appears to have access to an entire system, but in fact, only a portion of it is available.
[0017] The central processors 156 (e.g., CPUs) are physical processor resources that can be assigned to a virtual machine. For example, the virtual machine 154 contains one or more logical processors, each of which represents all or part of a physical processor 156 that can be dynamically assigned to the virtual machine. The virtual machines 154 are managed by the hypervisor 158, e.g., the PowerVM offered by International Business Machines Corporation.
[0018] The central processor 156, like the CPU 102, contains at least one MMU / TLB portion and at least one cache memory.
[0019] The input / output subsystem 160 controls the flow of data between devices and memory (also referred to herein as main memory or main storage). It is coupled to the server in that it can be part of the server or separate from it. The I / O subsystem relieves the central processors of the task of communicating directly with the I / O devices coupled to the server and allows for concurrent data processing and I / O processing.
[0020] Further details regarding the physical memory used by any of the systems, such as memory 108 or memory 162, and access to it, are described with reference to Fig.2A. As is known, physical memory has a defined size, and virtual memory is used to make the physical memory appear larger than it is. An example of a general view of virtual memory 201 mapped to physical memory 203 (e.g., memory 108, 162) is shown in Fig.2A. In this example, the mapping from virtual memory to real memory is performed using a page table method 205 (Hash Page Table, HPT) to find page table entries (PTEs), such as those used by Power ISA. In this example, programs use only regions A and B of virtual memory. Each segment of virtual memory is mapped to a segment ID (SID) entry 207, which is identified by an effective segment ID (ESID) (including ESIDs for B and ESIDs for A). An "effective address" 204 used by the program selects a SID entry containing the ESID value as well as a virtual segment ID (VSID) value 214. The VSID value represents the most significant bits of a virtual address used by the hash algorithm 205 to search the hash page table.A hash value based on the VSID is used to find a PTE. The page table entry contains an address 213 of a page of physical memory 203.
[0021] Fig.2B illustrates an example method for generating a virtual address 202 for performing a hash function. In this manner, for example, an effective address 204 is received in a memory management unit of a processor. The effective address 204 includes an ESID field 206, a page field 208, and a byte offset field 210. The ESID field is used to locate an entry in a segment lookaside buffer (SLB) 212, which is a cache of recently accessed segment identifier entries. Specifically, an SLB is searched for an entry with an ESID 206 value of the effective address 204. The entry with ESID 206 includes an associated VSID 214 and other data, as described below. The associated VSID is used to generate virtual address 202, which contains VSID 214; as well as page 208 and byte 210 from effective address 204.The virtual address 202 is used to obtain a real address that is used to access a physical memory in the memory system. In this disclosure, the terms "physical memory," "real memory," "system memory," and "absolute memory" are used interchangeably and refer to the main memory accessible by a processor.
[0022] Fig.Figure 2C illustrates an HPT translation structure as used by Power ISA. The ESID portion 206 of an effective address (EA) 204 is used to locate an entry in the SLB 212. The entry includes a VSID field 214. The value of the VSID field 214 and a portion of the EA 204 (page.byte) are processed 230 with a hash function to generate a hash value used to locate a PTE group 252 in an HPT 250. Page table entries 253 of the PTE group 252 are searched to locate a corresponding PTE that has a field that matches a value of a most significant portion of the VSID. If a corresponding PTE is found, the address (e.g., the real address) of the physical memory page in the PTE is used to access the physical memory.Once a PTE entry is found, the page portion 208 of the IO 204 and the address of the physical memory page found in the PTE are stored in a TLB 254 to improve performance, so that subsequent accesses to the same IO page hit the TLB 254, avoiding the PTE lookup. The page table is found by a page table source address provided by the processor.
[0023] Further details on a segment translation buffer and a page table are provided with reference to the Fig. 3 and 4A and 4B. Referring to Fig.3, the SLB 212 first defines the mapping between ESIDs and VSIDs. The number of SLB entries (SLBEs) in an SLB depends on the implementation and includes at least 32 entries in one example. In one example, the segment translation buffer 212 contains a plurality of SLBEs 300, and each SLB entry 300 maps an ESID 302 to a VSID 308. In one example, the SLBE 300 contains the following fields: the ESID 302 (bits 0 to 35); a valid entry indicator 304 (V) (bit 36) indicating whether the entry is valid (V = 1) or invalid (V = 0); a segment size selector (B) 306 (bits 37 to 38), which in an example has the following meaning: 0b00 to 256 megabytes (MB) (s = 28), 0b01 to 1 terabyte (TB) (s = 40), 0b10 to 256 TB (s = 48) and 0b11 - reserved; the VSID 308 (bits 39 to 88); a memory key indicator (K s) 310 for supervisor status (privileged) (bit 89); a memory key indicator (K p ) 312 for the problem status (bit 90); an indicator (N) 314 for a segment marked as non-executable if N = 1 (bit 91); a bit 0 (L) 316 of the virtual page size selector (bit 92); a class indicator (Class, C) 318 (bit 93); Bits 1:2 (LP) 322 of the virtual page size selector (bits 95 to 96); and a radix segment indicator (RS) 326 (bit 99), where in one example 0 represents disabled and 1 represents enabled. If RS = 1, then the virtual address used for searching the hash page table has the lowest (in SLBE B coded) number S of bits that are set to zero.
[0024] In one embodiment, instructions from a segment marked as non-executable (N = 1) cannot be executed. Segments can contain different page sizes. The L and LP bits specify the base size of the virtual page that the segment can contain. The SLB LψLP -Encodings are as follows in an example: Coding Base page size 0b000 4 KB 0b101 64 KB Additional values 2 b bytes, where b > 12 and b can vary depending on the encoding value, The additional values, as well as the corresponding base values of the virtual page, depend on the respective implementation. Values not supported by a given implementation are reserved for that implementation.
[0025] The virtual base page size, also known as the base page size, is the smallest virtual page size for the segment. The virtual base page size is 2 b Bytes. The actual size of the virtual page (also called actual page size or virtual page size) is determined by PTE LψLP specified.
[0026] The class field is used with the SLB Invalidate Entry (SLBIE) and SLB Invalidate All (SLBIA) commands. "Class" refers to a grouping of SLB entries and implementation-specific translation data, so that only entries in a specific group need be invalidated, while others can be retained. The class value assigned to an implementation-specific translation entry obtained from an SLB entry must match the class value of that SLB entry. The class entry assigned to an implementation-specific translation entry not obtained from an SLB entry (e.g., in real-mode address translations) is 0.
[0027] The software must ensure that the SLB contains at most one entry that maps to a given effective address for an instruction. An attempt to create an SLB entry that violates this requirement may cause a machine error.
[0028] As described here, at least one field of the SLB is used to access a page table and, in particular, to access a specific page table entry. Further details on page tables and page table entries will be discussed in relation to the Fig. 4A and Fig. 4B. In this example, the page table and its corresponding entries refer to the Power ISA architecture; however, other page tables and entries may be used for other architectures.
[0029] Referring to Fig.4A, a page table 400 initially contains one or more page table entries 402. In one example, the page table 400 is an HPT, which is a variable-size data structure that specifies the mapping between virtual page numbers (VPNs) and real page numbers (RPNs), where the real page number of a real page consists, for example, of bits 0:47 of the address of the first byte in the real page. The size of the hash page table can be any size from 2 n bytes with 18≤n≤46. The hash page table must be located in memory that has the memory control attributes used for implicit accesses to it. In one embodiment, the starting address shall be a multiple of its size, unless the implementation supports a "Server.Relaxed Page Table Alignment" category, in which case its starting address may be, for example, a multiple of 2. 18bytes.
[0030] In one example, the hashed page table contains groups of page table entries (Page Table Entry Groups, PTEGs). A PTEG, for example, contains eight page table entries of 16 bytes each; thus, each PTEG has a length of 128 bytes. PTEGs are entry points for page table lookups.
[0031] Further details about a page table entry are given in Fig. 4B. Each page table entry 402 maps a virtual page number to a real page number. For the Power ISA architecture, a page table entry contains, for example, the following: double word Bit(s) name Description 0 0:1 B (404) Segment size 0b00 to 256MB; 0b01 to 1TB; 0b10 to 256 TB; 0b11 to reserved 2:56 AVA (406) Abbreviated Virtual Address 57:60 SW (408) Available for software use 61 L (410) Virtual page size 0b0 to 4 KB 0b1 to larger than 4 KB (large page) 62 H (412) Identifier of the hash function 63 V (414) Entry valid (V = 1) or invalid (V = 0) 1 0 PP (416) Page Protection Bit 0 1 / Reserved 2:3 Key (420) KEY bits 0:1 4:43 ARPN (422) Abbreviated Real Page Number (abbreviated real page number) 44:51 LPs (424) Large Page Size Selector 4:51 RTABORG (426) Virtualized real address of a radix table (if SLBE RS = 1 or VRMASD RS = 1) 52:54 Key (428) KEY bits 2:4 55 R (430) Reference bit 56 C (432) Change bit 57:60 WIMG (434) Memory control bits 61 N (436) Non-executable page if N = 1 62:63 PP (438) Side protection bits 1:2
[0032] Further details on the implementation of page tables and page table entries are described in the Power ISA™ Version 2.06 Revision B specification dated July 23, 2010, offered by International Business Machines Corporation, which is incorporated herein by reference in its entirety.
[0033] The use of a hash page table to translate addresses is only one example of a translation method. Other address translation schemes, including those using a hierarchy of translation tables, are described below and in the following publications: "z / Architecture - Principles of Operation," publication SA22-7932-08, 9th edition, August 2010, and "Intel Itanium Architecture Software Developer's Manual Volume 2: System Architecture," document 245318-005, each of which is incorporated herein by reference in its entirety. In an example for the z / Architecture, the hierarchy of tables is referred to as DAT tables, while for Power ISA, the tables are referred to as radix tables.
[0034] An example of a conversion mechanism with a hierarchical conversion table is given with regard to Fig.5A. In this example, translation tables 504 are provided for translating addresses of virtual memory 502 into real addresses, however, in this example, only areas A and B are to be used. The origin point of the most significant translation table of the hierarchical translation tables 504 is provided, for example, by a control register (CR3) 506. An effective address 508 is used to index each table of the hierarchical translation tables 504 to determine a origin address of the next table until, for example, a PTE is found that has an address 509 of a page of physical memory 510. In an example where the translation mechanism is a DAT, the effective address is a virtual address with a plurality of indexes used to index the translation tables.
[0035] Fig.5B shows an example in which the most significant translation table of the hierarchy is indexed by the most significant part 508a of an effective address 508 to find an entry 512a in Table 1, which is used to find the next translation table (Table 2). The entry 512a thus contains a source address of Table 2. Similarly, a next part 508b of the effective address 508 is used to index Table 2 to find an entry 512b in Table 2 that has the source address of Table 3. A next part of the effective address 508c is used to index Table 3 to find an entry 512c in Table 3 that has a source address of a page table 514a. A next portion 508d of the effective address 508 is used to index a page table 514a to find a page table entry 512d having the address of a physical memory page 516.In one embodiment, the origin of the hierarchy of translation tables may include a table selector field to determine which translation table from the hierarchy of translation tables the origin applies. Therefore, the translation may only require a subset of the hierarchy (with an effective address constrained to contain a predetermined number of most significant bits with a value of zero). A translation using fewer tables is faster than one using more tables.
[0036] The page table entry found by traversing the hierarchical page tables contains various data, including at least part of a physical address used to access physical memory. The format and data contained in the page table entry depend on the system configuration architecture and / or the specific implementation.
[0037] In an example where the address translation is the z / architecture DAT translation, a page table entry 600 contains the following, as shown in Fig. 6A shown: A page-frame real address (PFRA) (602): Bits 0 through 51 provide the leftmost bits of a real memory address. When these bits are right-concatenated with the 12-bit byte index field of the virtual address, a 64-bit real address is provided; A "Page Invalid" bit 604 (I): Bit 53 controls whether the page associated with the page table entry is available. If the bit has a value of zero, address translation continues using the page table entry. If the bit has a value of one, the page table entry may not be used for translation. a DAT protection bit (Protection, P) 606: Bit 54 controls whether memory accesses are possible in the page. This protection mechanism is provided in addition to the key-controlled protection mechanisms and the lower address range protection mechanisms. The bit has no effect on fetch accesses; and A change-recording override (CO) 608: If an extended DAT is not applicable, bit 55 of the page table entry shall contain the value zero; otherwise, a translation-specific exception is detected during the execution of an instruction that uses this entry for address translation. If an extended DAT is applied and a segment table entry (STE) format control has the value zero, bit 55 of the page table entry is the change-recording override for the page.
[0038] In another example, where the address translation is the Power ISA radix translation, a page table entry contains the following fields, as shown in Fig. 6B. The format of this page table entry contains at least some fields that are similar to the fields of the page table entry obtained using the hash method for Power ISA. In one example, a page table entry 650 contains: Bits name Description 0 N (652) Non-executable page if N = 1 1 PP (654) Page Protections 0 2-6 Key (656) KEY bits 0:4 7-51 AA (658) Abbreviated Address (concatenated with twelve zeros) 52-54 SO (660) Available for software 55 G (662) Guarded (protected) 56 L (664) Leaf 0 - is Page Directory Entry (PDE) (0 to 1, 52 to 55, 57 to 62 are ignored) 1 - is PTE 57 C (666) Changed 58 R (668) Reference 59 I (670) Cache Inhibited 60 W (672) Writethrough 61-62 PP (674) Side protection 1:2 63 V (676) Indicator for a valid entry
[0039] According to one aspect, a system configuration is provided with various types of address translation structures for use in translating addresses. For example, one type uses a hierarchical data structure (e.g., a radix structure), and another type uses a hash data structure. Other and / or different types of structures may also be used, including, for example, a combination of a hierarchical and a hash structure or an offset structure. Furthermore, in one example, the type of translation structure to be used for a particular translation is selectable.
[0040] An embodiment of the logic for selecting from a plurality of translation mechanisms for translating an address is described with regard to Fig.7A. In this example, the environment is a virtualized environment with one or more guests (e.g., guest operating systems running within partitions) supported by a host (e.g., a host machine including a host operating system and / or a hypervisor), and the translated address is a virtual guest address (obtained based on an effective address) that is translated into a physical host address (also referred to as a real host address). In one embodiment, unless otherwise stated, hardware of the environment (e.g., an MMU) is used to execute the logic from Fig.7A. In another embodiment, hardware and / or firmware is used to perform the logic. As used herein, firmware includes, for example, the microcode, millicode, and / or macrocode of the processor. It includes, for example, the hardware-level instructions and / or data structures used for implementing higher-level machine code. In one embodiment, it includes, for example, vendor-specific code, typically provided as microcode containing trusted software or as microcode specific to the underlying hardware and controlling operating system access to the system hardware.
[0041] With a view to Fig.7A, the hardware within a partition (e.g., an MMU of a processor within the virtualized environment) first receives a memory access request that includes a memory address translation request for an effective address, STEP 700. The memory access request may be, for example, a memory load / store operation, a memory operand in an instruction, an instruction address to be accessed during an instruction fetch, a real address load, or a prefetch instruction.
[0042] Based on the effective address in the translation request, a guest virtual address is obtained and translated within the partition to a guest physical address using a selected translation format, e.g., a radix translation, STEP 702. Based on the translation of the guest virtual address to the guest physical address, it is determined whether a translation event occurred, QUERY 704. If a translation event occurred, the hardware presents the event (e.g., a radix table error) along with the guest virtual address to the operating system using an instruction storage interrupt (ISI) or data storage interrupt (DSI), depending on whether the translation that resulted in an error corresponded to an instruction or a data access, STEP 706.However, if no translation event occurred, the virtual guest address was translated to the physical guest address.
[0043] Next, it is determined which type of translation should be selected to translate the physical guest address to the physical host address, QUERY 708. In the example here, either a hierarchical translation mechanism (e.g., a radix translation) or a hash page table translation mechanism is selected; however, in other embodiments, other types of translation mechanisms may be selected, such as an offset mechanism or others. In one embodiment, the selection of the translation mechanism depends on the type of hypervisor that configures the system for a translation, as well as the preference of that hypervisor; and / or the selection may be based on the state of the memory. For example, if the host memoryIf the host memory has low fragmentation or large page sizes, a radix or other hierarchical translation can be selected; if the host memory is highly fragmented, a hash page table translation can be selected; and for static partitions, an offset translation mechanism can be selected. Other selection criteria are also possible.
[0044] Furthermore, in one embodiment, a selection may be performed at different stages of a conversion, e.g., from a virtual guest to a physical guest stage and / or from a physical guest to a physical host stage, with each selection being independent of the other. Thus, the selection of a particular structure at one stage (e.g., a guest stage) has no effect on the selection at another stage (e.g., a host stage).
[0045] In one example, the selection is configured by the system's hypervisor by setting one or more indicators in one or more control registers, other registers, or memory after the selection is made and before a conversion request is received. In another example, the selection is made dynamically at conversion time, e.g., by the hypervisor or the operating system, and the selection is provided to the hardware or firmware.
[0046] Further, if a radix translation (or other hierarchical translation) is selected for the host translation at INQUIRY 708, the guest physical address is translated to the host physical address using a radix translation (or other hierarchical translation), STEP 710. However, if a hash page table translation was selected, the guest physical address is translated to the host physical address using a hash page table translation, STEP 712. Although not shown in this specific example, other translation mechanisms may also be selected.
[0047] If a translation event occurs during a guest physical address to host physical address translation, QUERY 714, the hypervisor is notified of the event by a host instruction storage interrupt (HISI) / host data storage interrupt (HDSI) specifying the guest physical address, STEP 716. If no translation event was not notified, the guest physical address has been translated to the host physical address, and the host physical address is usable for memory access.
[0048] If the hypervisor is interrupted by a HISI or HDSI, the hypervisor performs a specific processing, an example of such processing with regard to Fig.7B. First, the hypervisor receives the HISI / HDSI, STEP 760. Next, in one embodiment, it determines whether guest radix translation is enabled, QUERY 762. In one example, this is determined by an indicator in a control register or other register. If guest radix translation is not enabled, HPT event processing is performed as usual, STEP 764. For example, the hypervisor reloads the HPT. Further, execution of the instruction that caused a HISI / HDSI is restarted, STEP 766.
[0049] If guest radix translation is enabled back at INQUIRY 762, in one embodiment, the partition fault address to be translated (e.g., the physical guest address) is obtained by the operating system from the hardware, STEP 768. Furthermore, a translation entry for the address is obtained from a memory map to load the host translation table, STEP 770. The obtained translation entry is incorporated into the host translation table (e.g., in another embodiment, an HPT or radix table), STEP 772, and execution of the instruction that caused the HISI / HDSI is restarted, STEP 774.
[0050] In one embodiment, a host translation is performed, for example, using an HPT structure. According to this embodiment, after STEP 768, a translation entry for the address is further obtained from a memory map to load the HPT, STEP 770. According to another embodiment and in another execution, a physical host page has been swapped out and is swapped in before a translation entry is integrated. The obtained translation entry is integrated into the HPT, STEP 772, and execution of the instruction that caused the HISI / HDSI is restarted, STEP 774. In another embodiment, a host translation is performed through a radix structure. According to this embodiment, after STEP 768, a translation fault for a radix table is further processed, where, for example,A translation entry for the address is obtained from a memory map to load the radix table, STEP 770. According to another embodiment and in another execution, a physical host page has been swapped out and is swapped in before a translation entry is integrated. The obtained translation entry is integrated into the radix table, STEP 772, and execution of the instruction that caused the HISI / HDSI is restarted, STEP 774.
[0051] Further details on various types of translation structures, including a hierarchical translation structure such as a radix translation structure, and variations thereof, such as a radix-to-radix translation structure (i.e., using a radix table for a guest translation in conjunction with a radix table for a host translation) and a radix-to-HPT translation structure (i.e., using a radix table for a guest translation in conjunction with an HPT table for a host translation) are provided below with regard to the Fig. 8 to 10 described.
[0052] Referring to Fig.8, an embodiment of the logic for translating a virtual address into a physical address using radix translation is first described. As shown, a radix table origin, stored, for example, in a register 800, indicates the beginning of a radix translation structure 802. The radix translation structure 802, also referred to as a radix page table (RTAB), is a variable-size hierarchical data structure that specifies the mapping between virtual page numbers and real page numbers, virtual page numbers and virtualized real page numbers, or virtualized real page numbers and real page numbers, where the real page number of a real page consists, for example, of bits 0 through 44 of the address of the first byte of the real page. The RTAB is located in memory that has the memory control attributes used for implicit access to it.In one example, the starting address is aligned to a 4-kilobyte boundary. In one embodiment, the RTAB contains a sequence of tables with 512 entries each.
[0053] For example, in one example, the radix translation structure 802 contains a plurality of radix structures, including a four-level page directory (PD) 802a, a three-level PD 802b, a two-level PD 802c, and a one-level PT 802d. Each page directory and page table contains a plurality of entries, referred to herein as PDEs and PTEs, respectively. (The L field of an entry indicates whether there are additional entries to be used in the translation.) In this example, the structures are indexed using a page number 810 generated from a segment offset 812 of the effective address.
[0054] For example, to index radix structure 802, the first X (e.g., 9) bits of page number 810 are used as an offset from PD 802a, pointed to by radix table origin 800. The contents of a selected PDE of PD 802a provide an address of PD 802b, and the next X bits of page number 810 are used to index into PD 802b and obtain an address of PD 802c. Furthermore, the next X bits of page number 810 are used to access a selected PDE of PD 802c and obtain the address of page table 802d. The last X bits of page number 810 are used to access a selected PTE of PT 802d. The output of the PTE of the PT 802d in conjunction with a byte portion 814 of the segment offset 812 generates a physical address 816, also known as a real address.
[0055] The above describes one embodiment of translating a virtual address into a physical address using a radix translation. However, if the virtual address is a guest virtual address, additional processing may be used to translate each guest address into a corresponding host address. One embodiment of this logic is discussed with respect to Fig. 9, which shows an example of a radix-to-radix conversion mechanism. A single radix is used for both guest and host conversions.
[0056] With a view to Fig. 9, a mechanism for a radix-to-radix conversion includes a guest radix structure 902 and a host radix structure 904. The guest radix structure 902 is similar to the radix structure 802 of Fig.8 and includes a plurality of radix structures such as a four-level PD 902a, a three-level PD 902b, a two-level PD 902c, and a single-level PT 902d, each containing a plurality of entries. Similarly, the host radix structure 904, shown multiple times for clarity, also includes a plurality of radix structures such as a four-level PD, a three-level PD, a two-level PD, and a single-level PT, each containing a plurality of PDEs or PTEs. A pointer 900 to a guest page table (also referred to as a virtual real address of a four-level guest table) is translated by the host radix structure 904 to provide a real address of the four-level guest table to the guest radix translation structure 902. The bits of the virtual real address of the four-level table are used, for example, to traverse the host radix structure 904, as described above with regard to Fig.8 to obtain a physical address of a four-level PD 902a. For example, the first X (e.g., 9) bits of the virtual physical address 900 are used to index a four-level PD of structure 904 to obtain, from its entry, an address of a three-level PD of structure 904. The next X bits of the virtual physical address 900 are used to index the three-level PD of structure 904 to obtain an address of the two-level PD of structure 904. The next X bits of the address 900 are used to index the two-level PD of structure 904 to obtain an address of the one-level PT of structure 904, and the next X bits of the address 900 are used to index the one-level PT of structure 904 to obtain a physical address of the four-level PD 902a.
[0057] Next, in the guest structure 902, the first X (e.g., 9) bits of the effective address to be translated (not shown) are used to index the four-level PD 902a to obtain a virtual real address of the three-level PD 902b. Using the host radix structure 904, which is indexed by the bits of the virtual real address of the three-level PD as described above, this virtual address is translated to a real address of the three-level PD 902b. Next, the second set of X bits of the effective address are used to index the PD 902b to obtain a virtual real address of the two-level PD 902c. Next, the address is translated using the host structure 904 to obtain a real address of the two-level PD 902c. The third set of X bits of the effective address is used to index the PD 902c to obtain a virtual real address of the PT 902d.The virtual real address is then translated using the host radix structure 904 to obtain a real address of the single-stage PT 902d. The next X bits of the effective address are used to index the PT 902d to obtain a virtual real address. The virtual real address is translated using the host radix structure 904, and the output of the translation, in conjunction with a byte offset of the effective address, is a physical host address 906. In one example, with this type of translation, a worst-case 24 read operation is required to translate one address.
[0058] In addition to the above, a mechanism for a radix-to-HTP conversion is provided, where the guest conversions are performed via a radix structure and the host conversions are performed via a hash page table structure. An example of a radix-to-HTP conversion is shown with regard to Fig. 10. With regard to Fig. 10, a pointer 1000 to a guest page table (also referred to as a virtual real address of a four-level table (1004a)) is input to a host HPT 1002 to translate the address 1000 into a real address of the four-level PD 1004a of a guest radix translation structure 1004. Similar to the radix structures described above, the radix translation structure 1004 includes a plurality of radix translation structures, such as a four-level PD 1004a, a three-level PD 1004b, a two-level PD 1004c, and a one-level PT 1004d, in which case the real address of the four-level structure 1004a, referred to as a four-level PD, is obtained from the HPT 1002.
[0059] The first X (e.g., 9) bits of the effective address to be translated are used to index the PD 1004a to obtain its contents. As with any of these translations, the contents of the selected four-level PD entry of the PD 1004a are checked to see if there are additional levels to search (e.g., if L = 0), and if so, the virtual real address of the PD 1004b is used to perform a hash operation on the HPT 1002. Based on this, the real address of a three-level PD structure 1004b is obtained. The next X bits of the effective address are used to index the PD 1004b, and this access provides a virtual real address of a two-level structure 1004c. This virtual address is used in the hash structure 1002 to obtain a real address of the structure 1004c.The next X bits of the effective address are used to index the PD 1004c to obtain a virtual real address of the single-level PT 1004d, which is used to access the HPT. The output of the HPT access is the real address of a single-level table 1004d, which is used to obtain another virtual real address. Since all levels in the page table have been processed and therefore implicitly L=1, this is the last table of the radix structure, so this entry is the page table entry. The next X bits of the effective address are used to index the page table to provide the guest physical address. The guest physical address is used to access the hash table. The hash table output, in conjunction with a byte offset of the effective address, provides the host physical address 1006, which corresponds to the translated effective address.
[0060] In one embodiment, the pointer to the guest page table (e.g., the pointer 1000 to the guest page table; also known as the virtual real address of the first table in the hierarchy of tables) is obtained using the hash table. This is done with regard to Fig. 11. If SLBE RS= 1 (1100), in this example, a PTE (1102) found during a hash PTE lookup is, as shown, an indirect PTE that is used to point to a hierarchical page table 1104 that can be manipulated by non-hypervisor code. In this example, the hierarchical page table is an RTAB, which is used together with the hash table, e.g., by the Power ISA architecture. The ARPN and LP fields of the hash page table entry (found during a hash translation) are replaced by the RTABORG, which is the virtualized real address of the radix page table. In one example, the radix page table is then used to obtain a virtual real address (also known as a physical guest address) of a physical memory to be accessed. In one embodiment, the virtual real address is then obtained, e.g., via a hash mechanism (see, e.g., Fig.10) or a radix mechanism (see e.g. Fig. 9) implemented.
[0061] More specifically, if the indicator indicates that multiple types of translation formats should be used to translate the effective address of the request into a real address (i.e., SLBE RS=1). The VSID is used to find an entry in one type of table (e.g., the hash table) to obtain the root of another type of table (e.g., a hierarchical table such as a radix table). Specifically, in one example, the VSID is used to generate a canonical address used to index the HPT to obtain the RTABORG. A canonical address is an address generated for a plurality of pages in a segment. A given segment therefore contains a plurality of pages that share the same radix table. Thus, the address for indexing the HPT must be the same for all these pages. To generate the canonical address, the least significant address bits are set to zero for all addresses that share the same radix table (with an appropriate constant added in one embodiment).For example, the virtual address, obtained from the effective address, contains the VSID as well as page and byte offsets. The VSID is used (optionally together with the constant) to generate the canonical address. The canonical address is used to index the HPT to obtain the origin point of the radix table (i.e., the virtual real address of the first table in the hierarchy of tables to be used in the translation).
[0062] In addition to or instead of the conversion mechanisms described above, other conversion mechanisms may also be used. An example of another type of conversion mechanism is a radix-to-offset mechanism, which uses a radix-to-offset conversion mechanism in conjunction with a host conversion based on a real-mode base value and a real-mode limit value, an example of which is shown in Fig. 12 is described.
[0063] In this example, the conversion is performed using a real-mode offset register (RMOR) and a real-mode limit selector (RMLS) 1202, as well as a radix structure 1204. As described above, the radix structure 1204 in this example includes a four-stage PD 1204a, a three-stage PD 1204b, a two-stage PD 1204c, and a single-stage PT 1204d, each containing a plurality of PDEs or PTEs. A pointer 1200 to a guest page table (also known as a virtual real address of the PD 1204a) is converted to a real address of the PD 1204a using an RMOR value and an RMLS. The RMOR value is added to the address 1200, and the result of the addition is compared to the RMLS. If it is below the limit, in this example the result is used to access PD 1204a of radix table 1204. The radix table is traversed as described here (e.g.using the first X (e.g., 9) bits of the effective address) to obtain a virtual real address of PD 1204b from the selected PDE of PD 1204a. The base value and threshold are used again, but this time with the virtual real address of PD 1204b, to obtain the real address of PD 1204b. Translation continues, and when the selected PTE of PD 1204d is found, a guest physical address is obtained, which is translated using host structure 1202 to obtain an address that, when concatenated with a byte offset of the effective address, provides a host physical address to be used in the translation.
[0064] The above discussion describes in detail aspects where multiple types of translation structures are included in a configuration, and where it is possible to select which translation mechanism(s) can be used to translate an effective address into a real host address. However, if the system configuration does not support such a feature, or if it supports the feature and conventional translation methods, a conventional translation is provided.
[0065] An embodiment of the logic of a conventional implementation method using a hash page table is presented with regard to Fig.13. First, an address request containing an effective address is received, STEP 1300. The effective address is used to generate a virtual address, STEP 1302. For example, the ESID is used to find an SLBE containing a VSID. The VSID in conjunction with the page byte of the effective address provides the virtual address to be translated. Thus, the virtual address is generated by address substitution (referred to here as segmentation) rather than using paging support. It is then determined whether an SLB address generation event has occurred, QUERY 1304. This is the case, for example, if an SLB error occurred while looking up the ESID. If not, the virtual address is translated to a real address using conventional HPT translation, STEP 1306. It is determined whether a translation event has occurred, QUERY 1308.If there is no HPT translation event, processing is complete and the real address can be used for memory access.
[0066] If an HPT translation event is present back in QUERY 1308, the translation event is indicated either to the operating system or to the hypervisor, using, for example, an ISI / DSI or a HISI / HDSI, STEP 1310. Processing of the HPT event is performed, including optionally performing a page break, STEP 1312. The operating system or hypervisor restarts the command, STEP 1314, and flow returns to STEP 1300.
[0067] If an SLB creation event is present back in QUERY 1304, an SLB event is reported to the operating system, STEP 1320. In addition, SLB event processing is performed, e.g., a reload of the SLB (without paging), STEP 1322. The operating system restarts the instruction, STEP 1324, and processing continues with STEP 1300.
[0068] Another conventional method for translating memory addresses is used with regard to Fig.14. This method uses a hierarchical translation mechanism. First, an address request is received, STEP 1400. The address is translated using, for example, a DAT translation, STEP 1402. An example of an architecture that uses a DAT translation is the z / Architecture, which is described in an IBM publication entitled "z / Architecture - Principles of Operation," publication SA22-7932-08, 9th edition, August 2010, and which is incorporated herein by reference in its entirety. It is then determined whether a DAT translation event, such as an error, has occurred, QUERY 1404. If not, the address has been translated to the physical address, STEP 1406, and processing is complete.
[0069] However, if a DAT translation event is present, QUERY 1404, the translation event is indicated to either the operating system or the hypervisor, STEP 1410. DAT event processing is performed in the operating system or hypervisor, optionally performing a page turn, STEP 1412. The operating system or hypervisor then restarts the instruction, STEP 1414, and processing continues with STEP 1400.
[0070] The above describes in detail an ability to select from several types of translation structures to translate an effective address into a real address. Although examples of translation mechanisms are described, additional and / or different mechanisms may also be used. In one example, a first address (e.g., a virtual guest address) is translated to a second address (e.g., a physical guest address) using a scheme that may be selected from, for example, a radix translation, another hierarchical translation, segmentation (e.g., using an SLB), a hash page table, or a combination of the above, by way of example. The second address is translated to a third address (e.g., a physical host address) using a translation scheme that may be selected from, for example,can be selected from one or more page-level schemes (translation schemes that are not offset mechanisms); radix mechanisms; other hierarchical mechanisms; hash mechanisms; or offset mechanisms.
[0071] In one embodiment, the third address (e.g., a physical host address) corresponds to an address executed in a hypervisor partition under the control of another virtualization layer. The third address is thus another virtual address to be translated into a physical address. The translation is performed as described above, and the translation mechanisms can also be independently selected.
[0072] Those skilled in the art will appreciate that aspects of the present invention may be embodied as a system, method, or computer program product. Accordingly, aspects of the present invention may be embodied as an entirely hardware embodiment, an entirely software embodiment (e.g., firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects, which may be collectively referred to as a "circuit," "module," or "system." Furthermore, aspects of the present invention may be embodied as a computer program product embodied in one or more computer-readable media having computer-readable program code embodied thereon.
[0073] Any combination of one or more computer-readable media may be used. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable signal medium may contain a propagated data signal with computer-readable program code embodied therein, e.g., as baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of different forms, including, but not limited to, an electromagnetic form, an optical form, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium that can convey, carry, or transmit a program intended for use by or in connection with an instruction-executing system, apparatus, or device.
[0074] A computer-readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or unit, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium include (but are not limited to): an electrical connection having one or more conductors, a portable computer diskette, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.For the purposes of this document, a computer-readable storage medium may be any physical medium that can contain or store a program used by or in connection with an instruction execution system, apparatus, or device.
[0075] With a view to Fig. 15, in one example, a computer program product 1500 includes, for example, one or more non-transitory, computer-readable storage media 1502 for storing thereon computer-readable program code means or logic 1504 to provide and enable one or more aspects of the present invention.
[0076] Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wired, fiber optic cable, RF, and other media, or any combination thereof.
[0077] Computer program code for performing operations for one or more aspects may be written in any combination of one or more programming languages, including, but not limited to, an object-oriented programming language such as Java, Smalltalk, C++, or similar, and traditional procedural programming languages such as the C programming language, assembly language, or similar programming languages. The program code may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server.In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (e.g., over the Internet using an Internet service provider).
[0078] One or more aspects are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that the instructions, executing via the processor of the computer or other programmable data processing apparatus, produce a means by which the functions / acts described in the block or block diagram may be implemented.the blocks of the flow chart and / or block diagram.
[0079] These computer program instructions may also be stored on a computer-readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner such that the instructions stored on the computer-readable medium produce an article of manufacture having instructions for performing the function / act specified in the flowchart and / or block diagram block(s).
[0080] The computer program instructions may also be loaded into a computer, other programmable data processing device, or other device to cause a series of operational steps to be performed on the computer, other programmable data device, or other device, such that the instructions executing on the computer or other data processing device provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block(s).
[0081] The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Thus, each block of the flowchart or block diagram may represent a module, segment, or portion of code comprising one or more executable instructions for implementing the one or more specified logical functions. It should also be noted that in some alternative embodiments, the functions mentioned in the block may occur in a different order than that mentioned in the figures. For example, two consecutively illustrated blocks may in fact occur substantially concurrently, or the blocks may sometimes execute in reverse order, depending on the functionality involved.It is also worth noting that each block of the block diagrams and / or flowchart illustration, as well as combinations of blocks in the block diagrams and / or flowchart illustration, may be implemented by special purpose hardware-based systems that perform the specified functions or acts or combinations thereof, or by combinations of special purpose hardware and computer instructions.
[0082] In addition to the above, one or more aspects may be provided, offered, implemented, managed, maintained, etc., by a service provider that offers management of customer environments. For example, the service provider may create, manage, support, etc., computer code and / or computer infrastructure that performs one or more aspects of the present customer environments for one or more customers. The service provider may, in turn, receive payment from the customer, e.g., under a subscription and / or fee agreement. Additionally or alternatively, the service provider may receive payment from the sale of advertising content to one or more third parties.
[0083] According to one aspect, an application may be implemented to perform one or more aspects of the present invention. Thus, in one example, implementing an application may include providing computing infrastructure capable of performing one or more aspects of the present invention.
[0084] According to another aspect, a computing infrastructure may be implemented comprising integrating computer-readable code into a computing system, wherein the code, in conjunction with the computing system, is capable of performing one or more aspects of the present invention.
[0085] According to yet another aspect, a process for integrating a computing infrastructure may be provided, comprising integrating computer-readable code into a computer system. The computer system comprises a computer-readable medium, the computer medium comprising one or more aspects of the present invention. In conjunction with the computer system, the code is capable of performing one or more aspects of the present invention.
[0086] Although various embodiments are described above, they are merely examples. For example, computing environments of other architectures may incorporate and utilize one or more aspects of the present invention. Additionally, other types of implementation structures may be used, and other types of environments may benefit from one or more aspects. Furthermore, the structures may have different fields and / or the fields may have different sizes. Furthermore, the number of bits used to index a structure may be the same or different for each stage and / or for each structure. Many variations are possible.
[0087] Furthermore, other types of computing environments may benefit from one or more aspects. For example, an environment may include an emulator (e.g., software or other emulation mechanisms) in which a particular architecture (e.g., instruction execution, architected functions such as address translation, and architected registers) or a subset thereof is emulated (e.g., on a native computer system having a processor and memory). In such an environment, one or more emulation functions of the emulator may implement one or more aspects of the present invention, even though a computer executing the emulator may have a different architecture than the emulated capabilities. In one example, the emulated specific instruction or operation is decoded in emulation mode, and an appropriate emulation function is created to implement the particular instruction or operation.to carry out the individual operation.
[0088] For example, in an emulation environment, a host computer includes memory to store instructions and data; an instruction fetch unit to retrieve instructions from memory and optionally provide local buffer storage for the retrieved instruction; an instruction decode unit to receive the fetched instructions and determine the type of instructions that were fetched; and an instruction execution unit to execute the instructions. Execution may include loading data from memory into a register; storing data from a register back into memory; or performing some other type of arithmetic or logical operation as determined by the decode unit. In one example, each unit is implemented in software. For example, the operations performed by the units are implemented as one or more subroutines within emulator software.
[0089] Furthermore, a data processing system suitable for storing and / or executing program code may be used, including at least one processor connected directly or indirectly to memory elements via a system bus. The memory elements include, for example, local memory used during actual execution of the program code, mass storage, and cache memory that provides temporary storage of at least some program code to reduce the frequency with which the code must be retrieved from mass storage during execution.
[0090] Input / output (I / O) devices (including, but not limited to, keyboards, displays, direct access storage devices (DASDs), tape, CDs, DVDs, USB flash drives, and other memory storage devices, etc.) may be connected to the system either directly or through intervening I / O controllers. Network adapters may also be connected to the system to enable the data processing system to interface with other data processing systems or with remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the available types of network adapters.
[0091] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a" and "an" are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the verbs "comprises" and / or "comprising" in this specification indicate the presence of the recited features, integers, steps, acts, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, acts, elements, components, and / or groups thereof.
[0092] The contemplated structures, materials, acts, and equivalents of all means or steps in addition to the functional elements (if any) in the following claims are intended to include any structure, material, or act capable of performing the function in conjunction with other claimed elements as expressly claimed herein. The description of the present invention has been presented for purposes of illustration and explanation and is not intended to be exhaustive or limiting of the invention as described. Those skilled in the art will recognize that numerous changes and modifications may be made without departing from the spirit and scope of the invention.The embodiment was chosen and described in order to best explain the various aspects and practical application and to enable others skilled in the art to understand the various embodiments with various modifications as are suited to the particular use contemplated.
Claims
[1] A computer program product that enables the translation of memory addresses, the computer program product comprising: a computer-readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit to perform a method comprising: Obtaining a memory address to be translated by a processor, the processor having a first type of address translation structure and a second type of address translation structure available for translating the memory address, the first type being structurally different from the second type; and Selecting, by the processor, a type of address translation structure of the first type of address translation structure and the second type of address translation structure to be used to translate the memory address, the method further comprising: Receiving, by the processor, a first address to be translated into a second address; and Using a third type of address translation structure to translate the first address to the second address, wherein the second address is the memory address to be translated by the selected one type of address translation structure, wherein the first address comprises a virtual guest address, the second address comprises a physical guest address, and wherein the method further comprises translating the physical guest address into a physical host address. [2] The computer program product of claim 1, wherein the selected one type of address translation structure is different from the third type of address translation structure. [3] The computer program product of claim 2, wherein the third type of address translation structure uses a hierarchical translation structure and the selected one type of address translation structure uses a hash translation structure. [4] The computer program product of claim 1, wherein the method further comprises selecting the third type of address translation structure from a plurality of types of address translation structures. [5] The computer program product of claim 4, wherein the plurality of types of address translation structures includes at least one type of a hierarchical address translation structure, a hash translation structure, an offset translation structure, a combination type translation structure, and a segmentation type translation structure. [6] The computer program product of claim 4, wherein selecting the third type of address translation structure is independent of selecting the one type of address translation structure. [7] The computer program product of claim 1, wherein the physical guest address corresponds to an address of a partition executing under control of at least one further virtualization stage, and wherein the method further comprises translating the physical host address into a further physical host address. [8] The computer program product of claim 1, wherein at least one of the first type of address translation structure and the second type of address translation structure is selected from a set of translation types consisting of a hierarchical translation structure, a hash translation structure, and an offset translation structure. [9] A computer system enabling the translation of memory addresses, the computer system comprising: a RAM; and a processor for exchanging data with the memory, wherein the computer system is configured to perform a method, the method comprising: Obtaining, by the processor, a memory address to be translated, wherein the processor has a first type of address translation structure and a second type of address translation structure available for translating the memory address, the first type being structurally different from the second type; and Selecting, by the processor, one type of address translation structure of the first type of address translation structure and the second type of address translation structure to be used to translate the memory address, the method further comprising: Receiving, by the processor, a first address to be translated into a second address; and Using a third type of address translation structure to translate the first address to the second address, wherein the second address is the memory address to be translated by the selected one type of address translation structure, wherein the first address comprises a virtual guest address, the second address comprises a physical guest address, and wherein the method further comprises translating the physical guest address into a physical host address. [10] The computer system of claim 9, wherein the method further comprises selecting the third type of address translation structure from a plurality of types of address translation structures. [11] The computer system of claim 10, wherein the plurality of types of address translation structures includes at least one type of a hierarchical address translation structure, a hash translation structure, an offset translation structure, a combination type translation structure, and a segmentation type translation structure. [12] The computer system of claim 10, wherein selecting the third type of address translation structure is independent of selecting the one type of address translation structure. [13] The computer system of claim 9, wherein the physical host address corresponds to an address of a partition executing under control of at least one further virtualization stage, and wherein the physical host address is translated into a further physical host address. [14] The computer system of claim 9, wherein at least one of the first type of address translation structure and the second type of address translation structure is selected from a set of translation types consisting of a hierarchical translation structure, a hash translation structure, and an offset translation structure. [15] Method for enabling a conversion of memory addresses, the method comprising: Obtaining a memory address to be translated by a processor, the processor having a first type of address translation structure and a second type of address translation structure available for translating the memory address, the first type being structurally different from the second type; and Selecting, by the processor, one type of address translation structure of the first type of address translation structure and the second type of address translation structure to be used to translate the memory address, the method further comprising: Receiving, by the processor, a first address to be translated into a second address; and Using a third type of address translation structure to translate the first address to the second address, wherein the second address is the memory address to be translated by the selected one type of address translation structure, wherein the first address comprises a virtual guest address, the second address comprises a physical guest address, and wherein the method further comprises translating the physical guest address into a physical host address.
Citation Information
Patent Citations
Dynamic selection of memory virtualization techniques
US20070283125A1
Generalized Control Registers
US20120159039A1
