Reclaiming existing fields in address translation data structures to extend control over memory accesses

Information

  • Patent Grant
  • 7073042
  • Patent Number
    7,073,042
  • Date Filed
    Thursday, December 12, 2002
    21 years ago
  • Date Issued
    Tuesday, July 4, 2006
    18 years ago
Abstract
In one embodiment, when it is determined that a modification of content of an active address translation data structure is required, an entry in the active address translation data structure is modified to conform to a corresponding entry in a guest address translation data structure. During the modification, a bit field including one or more access control indicators in the entry of the active address translation data structure is not overwritten with corresponding data from the guest address translation data structure.
Description
BACKGROUND OF THE INVENTION

A computer processor accesses system memory to retrieve or store data within the system memory. Specifically, the processor uses the physical address of data in the memory to identify and access the data. However, the physical address where data is stored in the memory is not the address that the processor uses to index the data during internal manipulations. Rather, the processor assigns a virtual address to data being processed according to program instructions. Thus, memory accesses often require the translation of virtual addresses into physical addresses.


A conventional address translation mechanism is typically based on a translation lookaside buffer (TLB), an in-processor structure that acts as a cache for previously processed address translations. For example, in the processor instruction set architecture (ISA) of the 32-bit Intel® architecture (referred to herein as the IA-32 ISA), address translation is controlled by a TLB and a page-table hierarchy. The page-table hierarchy, which is referenced by the processor's control register CR3, is a translation data structure used to translate a virtual memory address (also referred to as a linear memory address in the context of the IA-32 ISA) into a physical memory address when paging is enabled. A page-table hierarchy includes a page directory (PD), a set of page tables (PTs), and multiple page frames (PFs). Typically, translation of a virtual memory address into a physical memory address begins with searching the TLB using either the upper 20 bits (for a 4 KB page) or the upper 10 bits (for a 4 MB page) of the virtual address. If a match is found, the upper bits of a physical page frame that are contained in the TLB are conjoined with the lower bits of the virtual address to form a physical address. If no match is found, the processor consults the page table hierarchy to determine the virtual-to-physical translation, which is then cached in the TLB.


Each entry in the PD and PTs typically includes various fields that control the accessibility of memory pages. Examples of such fields include the present (P) flag indicating whether or not the page referenced by the entry is valid, the user/supervisor (U/S) flag controlling accesses to the page referenced by the entry based on privilege level, and the read/write (R/W) flag controlling accesses based on access type (i.e., read or write)





BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:



FIG. 1 illustrates one embodiment of a virtual-machine environment, in which the present invention may operate;



FIG. 2 is a block diagram of one embodiment of a virtual TLB system;



FIG. 3 is a flow diagram of one embodiment of a process for reclaiming existing fields of an address translation data structure to extend control over memory accesses in a virtual machine environment;



FIG. 4 is a block diagram of one embodiment of a virtual TLB system supporting address translation in the IA-32 ISA; and



FIG. 5 illustrates the formats of page-directory entries (PDEs) and page-table entries (PTEs) in a conventional page-table hierarchy for the IA-32 ISA.





DESCRIPTION OF EMBODIMENTS

A method and apparatus for reclaiming existing bits in an address translation data structure to extend control over memory accesses in a virtual machine environment are described. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention can be practiced without these specific details.


Some portions of the detailed descriptions that follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer system's registers or memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. The operations are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.


It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present invention, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or the like, may refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer-system memories or registers or other such information storage, transmission or display devices.


In the following detailed description of the embodiments, reference is made to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. In the drawings, like numerals describe substantially similar components throughout the several views. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. Other embodiments may be utilized and structural, logical, and electrical changes may be made without departing from the scope of the present invention. Moreover, it is to be understood that the various embodiments of the invention, although different, are not necessarily mutually exclusive. For example, a particular feature, structure, or characteristic described in one embodiment may be included within other embodiments. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims, along with the full scope of equivalents to which such claims are entitled.



FIG. 1 illustrates one embodiment of a virtual-machine environment 100, in which the present invention may operate. In this embodiment, bare platform hardware 116 comprises a computing platform, which may be capable, for example, of executing a standard operating system (OS) or a virtual-machine monitor (VMM), such as a VMM 112. The VMM 112, though typically implemented in software, may emulate and export a bare machine interface to higher level software. Such higher level software may comprise a standard or real-time OS, may be a highly stripped down operating environment with limited operating system functionality, or may not include traditional OS facilities. Alternatively, for example, the VMM 112 may be run within, or on top of, another VMM. VMMs and their typical features and functionality are well known by those skilled in the art and may be implemented, for example, in software, firmware or by a combination of various techniques.


The platform hardware 116 includes a processor 118 and memory 120. Processor 118 can be any type of processor capable of executing software, such as a microprocessor, digital signal processor, microcontroller, or the like. Memory 120 can be a hard disk, a floppy disk, random access memory (RAM), read only memory (ROM), flash memory, any combination of the above devices, or any other type of machine medium readable by processor 118. Memory 120 may store instructions for performing the execution of method embodiments of the present invention.


The platform hardware 116 can be of a personal computer (PC), mainframe, handheld device, portable computer, set-top box, or any other computing system.


The VMM 112 presents to other software (i.e., “guest” software) the abstraction of one or more virtual machines (VMs), which may provide the same or different abstractions to the various guests. FIG. 1 shows two VMs, 102 and 114. The guest software running on each VM may include a guest OS such as a guest OS 104 or 106 and various guest software applications 108 and 110. The guest OSs 104 and 106 expect to access physical resources (e.g., processor registers, memory and I/O devices) within the VMs 102 and 114 on which the guest OS 104 or 106 is running and to perform other functions. For example, during address-translation operations, the guest OS expects to allocate physical memory, provide protection from and between software applications (e.g., applications 108 or 110), use a variety of paging techniques, etc. However, in a virtual-machine environment, the processor 118 and the VMM 112 need to have ultimate control over address-translation operations to support proper operation of VMs 102 and 114 and provide protection from and between VMs 102 and 114. In one embodiment, an address translation system referred to herein as a virtual translation lookaside buffer (TLB) system is provided that tolerates and supports the OS's attempts to control address translation while allowing the processor 118 and the VMM 112 to retain ultimate control over address-translation operations. Some embodiments of a virtual TLB system will be described in more detail below.


The resources that can be accessed by the guest software may either be classified as “privileged” or “non-privileged.” For privileged resources, the VMM 112 facilitates functionality desired by guest software while retaining ultimate control over these privileged resources. Non-privileged resources do not need to be controlled by the VMM 112 and can be accessed by guest software.


In one embodiment, if guest software attempts to access a privileged resource, control is transferred to the VMM 112. In response, the VMM 112 either permits the guest software to access the privileged resource or emulates the functionality desired by the guest software, and then transfers control back to the guest software. In one embodiment, the transfer of control between the VM 102 or 114 and the VMM 112 is achieved by executing a special instruction. The control of guest software through this mechanism is referred to herein as VMX operation and the transfer of control from the guest software to the VMM is referred to herein as a VM exit. In another embodiment, the transfer of control between the VM 102 or 114 and the VMM 112 is initiated by non-instruction events, such as an asynchronous hardware interrupt or a page fault.


In one embodiment, when a VM exit occurs, components of the processor state used by guest software are saved, and components of the processor state required by the VMM 112 are loaded. This saving and loading of processor state may, depending on the processor instruction set architecture (ISA), have the effect of changing the active address space. For example, in the ISA of the 32-bit Intel® architecture (referred to herein as the IA-32 ISA), the active address space is determined by the values in the control registers, which may be saved and restored on VM exit.


In one embodiment, when a transition from the VMM 112 to guest software occurs, the processor state that was saved at the VM exit (and which may have been modified by the VMM 112) is restored and control is returned to the guest OS 104 or 106 or guest applications 108 or 110.


It should be noted that any other mechanism known in the art can be used to transfer control between the guest software and the VMM 112 without loss of generality.



FIG. 2 is a block diagram of one embodiment of a virtual TLB system 200. The virtual TLB system 200 includes a guest address translation data structure 208 and a virtual TLB 202. The guest address translation data structure 208 indicates how the guest OS intends to translate virtual memory addresses to physical memory addresses. One example of such an address translation data structure is a page-table hierarchy used in the IA-32 ISA. However, various other address translation data structures may be used with the present invention without loss of generality. The guest address translation data structure 208 is managed by the guest OS, which can access and modify any entry in the guest address translation data structure 208. Some entries of the guest address translation data structure 208 include fields that are specifically designated for operational use by software. As shown in FIG. 2, an exemplary entry 212 in the guest address translation data structure 208 includes a software-available field 216 containing one or more bits that are designated for operational use by guest software (i.e., guest software may place values in this bit field for any desired purpose). It should be noted that the entries which include the software-available bit field and the number of bits in the software-available field contained in each entry may vary depending on the ISA. In the page-table hierarchy of the IA-32 ISA, for example, each entry in a page directory and page table includes three “AVAIL” bits that are architecturally guaranteed to be available for system programmer's use. As a result, these bits may not be used or interpreted by the hardware (e.g., to cause any special actions or protections).


The virtual TLB 202 includes a physical TLB 204 managed by the processor and an active address translation data structure 206 managed by the VMM. The active address translation data structure 206 and the guest address translation data structure 208 derive their formats from an architecturally defined format (e.g., the IA-32 format). The physical TLB 204 is loaded by the processor with address translations derived from the active address translation data structure 206.


In one embodiment, the VMM creates the active address translation data structure 206 based on the guest address translation data structure 208 and then periodically modifies one or more entries in the active address translation data structure 206 to conform to the corresponding entries in the guest address translation data structure 208. In one embodiment, the VMM modifies the active address translation data structure 206 upon receiving control over an event initiated by guest software and determining that the likely cause of the event is an inconsistency between the content of the active address translation data structure 206 and the content of the guest address translation data structure. Such event may be, for example, an attempt of the guest OS to manipulate the TLB 204 (e.g., a request of guest software to invalidate cached address translations in the TLB 204) or a page fault generated by the processor in response to an operation performed by guest software (e.g., a page fault generated in response to a request of guest software to write to a memory region that is marked as read-only in the active address translation data structure while being marked as writable in the guest address translation data structure).


When modifying the content of the active address translation data structure 206, the VMM refrains from copying software-available bit fields 216 from the guest address translation data structure 208 to the active address translation data structure 206 because the bit fields 216 are used internally by the guest software and have no meaning to the VMM. Accordingly, because a bit field 216 contained in an entry of the active address translation data structure 206 does not become overwritten with data from the guest address translation data structure 208, the VMM is able to reclaim this bit field for its own use. In one embodiment, the VMM uses a bit field within an entry (e.g., entry 210) of the active address translation data structure 206 to store access control indicators 214 that control accessibility of a memory region referenced by the entry 210. Examples of access control indicators and their usage in a virtual machine environment will be discussed in greater detail below.



FIG. 3 is a flow diagram of one embodiment of a process 300 for reclaiming existing fields of an address translation data structure to extend control over memory accesses in a virtual machine environment. The process may be performed by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both.


Referring to FIG. 3, process 300 begins with processing logic setting access control indicators in one or more entries of an active address translation data structure (processing block 302). Processing logic sets access control indicators when creating an entry in the active address translation data structure. In one embodiment, an entry is created when processing logic creates the entire active address translation data structure based on a guest address translation data structure used by the guest OS for address translation operations. Alternatively, processing logic creates an entry in the active address translation data structure after a new entry is added to the guest address translation data structure. In one embodiment, once the access control indicators are set, processing logic can modify them as needed at any time.


Next, at processing block 304, processing logic detects transfer of control to the VMM which was caused by an event initiated by guest software (e.g., an attempt of guest software to manipulate the TLB or a page fault generated in response to an operation performed by guest software) and evaluates this event. Based on this evaluation, processing logic determines whether this event requires a modification of the active address translation data structure (decision box 306). This determination may, for example, depend on whether the page fault was generated because of the inconsistency between the content of the active address translation data structure and the content of the guest address translation data structure or for some other reason.


If the determination made at decision box 306 is negative, process 300 ends. Alternatively, if the determination made at decision box 306 is positive, processing logic refrains from overwriting the access control indicators while modifying the remaining content of the active address translation data structure to match the content of the guest address translation data structure (processing block 308). As a result, the access control indicators are maintained in the active address translation data structure for use by the processor during address translation operations.


Exemplary functionality of access control indicators will now be described with reference to specific features of the IA-32 ISA. However, it should be noted that the access control indicators may be used for various purposes other than those discussed below and with various processors other than IA-32 processors.



FIG. 4 is a block diagram of one embodiment of a virtual TLB system 400 supporting address translation in the IA-32 ISA. The system 400 includes a virtual TLB 404 containing an active translation data structure represented by an active page-table hierarchy 406 and a physical TLB 408. The system 400 also includes a guest translation data structure represented by a guest page-table hierarchy 402. The active page-table hierarchy 406 and the guest page-table hierarchy 402 derive their format from the IA-32 architecturally-defined format. The entries of the guest page-table hierarchy 402 have a conventional format according to the IA-32 ISA.



FIG. 5 illustrates the format 502 of page-directory entries (PDEs) and the format 504 of page-table entries (PTEs) in a conventional page-table hierarchy for the IA-32 ISA. Each PDE and PTE includes a set of bits that control the accessibility of memory pages. These bits include, for example, the present (P) flag 516 or 510 that indicates whether or not the page referenced by the entry is valid, the user/supervisor (U/S) flag 520 or 514 that controls accesses to the page referenced by the entry based on privilege level, and the read/write (R/W) flag 518 or 512 that controls accesses based on access type (i.e., read or write). Further, each PDE and PTE includes three “AVAIL” bits 506 and 508. AVAIL bits 506 and 508 are architecturally guaranteed to be available for use by system programmers. That is, software may place values in the AVAIL bits for any desired purpose (e.g., for recording information associated with a given page). As a result, hardware may not interpret or use these bits for any other purpose (e.g., new page-level protections). Thus, if these fields are not used by software, they become “wasted”.


Returning to FIG. 4, the AVAIL bits in each PDE and PTE are set by the VMM and are not overwritten with data from the guest page-table hierarchy 402 when the content of the active page-table hierarchy 406 is modified. In one embodiment, the AVAIL bits are set when the active page-table hierarchy 406 is created or a new entry is added to the active page-table hierarchy 406.


In one embodiment, all entries in the active page-table hierarchy 406 are initially marked invalid (using P flag 516 in each PDE and P flag 510 in each PTE) to emulate the initialization state of the TLB when the TLB has no entries. Subsequently, when guest software presents a virtual address to the processor, the processor finds only invalid entries in the active page-table hierarchy 406, and a page fault is generated. The page fault transitions control from the guest OS to the VMM. The VMM then copies corresponding entries from the guest page-table hierarchy 402 to the active page-table hierarchy 406, refilling the active page-table hierarchy 406. During the refill, the AVAIL bits in the guest page-table hierarchy 402 are ignored (i.e., the AVAIL bits are not copied to the active page-table hierarchy 406).


Guest software is allowed to freely modify the guest page-table hierarchy 402 including changing virtual-to-physical mapping, permissions, etc. Accordingly, the active page-table hierarchy 406 may not be always consistent with the guest page-table hierarchy 402. That is, the active page-table hierarchy 406 may be out-of-date, e.g., it may allow too much access to its entries, provide wrong virtual-to-physical address mapping, etc. When a problem arises from an inconsistency between the hierarchies 402 and 406, the guest OS issues one of the instructions 416 to the physical TLB 408. These instructions result in the transfer of control from the guest OS to the VMM. The VMM will then determine the cause of the instruction and modify the content of the active page-table hierarchy 406 (e.g., remove the entries referred to by guest software in the issued instruction from the active page-table hierarchy 406). During the modification, the AVAIL bits in the guest page-table hierarchy 402 are not copied to the active page-table hierarchy 406.


Because the AVAIL bits in the active page-table hierarchy 406 remain unchanged, they can be reclaimed by the VMM. Once reclaimed, the AVAIL bits can be used in various ways. For example, one of the AVAIL bits may be a guest/host (“G/H”) access bit that controls the access to the page by guest software. That is, the processor may permit access to the page referenced by the PTE only when the VMM (the “Host”) is running if the “G/H” bit in an active PTE is clear. If the “G/H” bit is set, the processor may permit access to the page when either the VMM or the guest software is running.


The “G/H” bit can be used to resolve address space conflicts between the VMM and a guest OS. In the current IA-32 ISA, an address space conflict typically arises because existing processors (e.g., IA-32 microprocessors) do not allow the VMM to receive control over an event initiated by the guest OS (e.g., an attempt of the guest OS to access a privileged hardware resource) unless a portion of the VMM code and/or data structures is located in the same virtual address space as the guest OS. However, because the guest OS does not expect the VMM code and/or data structures to reside in the same address space, it can attempt to access a region occupied by the VMM in this address space, causing an address space conflict between the guest OS and the VMM. This conflict may result in abnormal termination of operations performed by the VMM or the guest OS.


The “G/H” bit prevents the occurrence of an address space conflict between the guest OS and the VMM. Specifically, with the “G/H” bit, the VMM finds a place in the guest OS's virtual address space to map its code and data structures and ensures that the corresponding “G/H” bit is cleared to protect the VMM code and data structures from accesses by the guest OS. When an attempt of the guest OS to access the address space occupied by the VMM is detected, the VMM code and data structures are remapped into an unused region within the guest OS's virtual address space, and the guest OS is able to access the desired address space.


The “G/H” bit can also be used to simplify address switches in the ISAs that do not require a portion of the VMM code and/or data structures to reside in the guest OS address space to receive control over an event initiated by the guest OS. For example, when the guest software is controlled by VMX operation, a VM exit causes a full address space switch to occur before transferring control to the VMM, hence no requirement to have a potion of the VMM code and/or data structures to reside in the guest OD address space. However, performing a full address switch for each VM exit is costly. Accordingly, the performance can be optimized by running a portion of the VMM code and/or data structures in the guest OS address space and use the “G/H” bit to protect the VMM code and data structures from accesses by the guest OS as discussed above.


In another example, two of the AVAIL bits may be interpreted by the processor as execute-privilege “X” and read-privilege “R” bits, while the existing “R/W” bit may be reinterpreted as a write-privilege “W” bit. As a result, different types of page accesses can be controlled independently. For example, the processor may prohibit execution of any instructions from the page when the X bit is clear and enable execution of instructions from the page when the X bit is set. Similarly, the “R” bit may control data read accesses from the page, and the “W” bit may control data write accesses to the page.


The combination of independently settable “R”, “W” and “X” bits may be beneficial for use with dynamic binary translators, which modify instruction binaries for various purposes, such as instruction-set emulation, address tracing, etc. For example, the combination of the “R”, “W” and “X” bits may simplify handling of self-modifying code (SMC) and self-examining code (SEC) by a dynamic binary translator on IA-32 processors. That is, a dynamic binary translator can set the combination of the “R”, “W” and “X” bits to 001 on a page that holds translated instructions, thus allowing the execution of the code by the processor while detecting the code's attempts to modify or read the code's instruction bytes (which may differ from the original instructions of the code due to the translation or patching actions of the binary translator). For pages that hold a mixture of instructions and data, a binary translator can set the “R” and “W” bits as appropriate, but keep the “X” bit set to 0 so that the code can directly access data on the page but will not be able to execute instructions on the page. An attempt to execute instructions on the page will cause a transition to the VMM which can then emulate the faulting instructions.


The combination of “R”, “W” and “X” bits may also allow secure execution of code containing an embedded secret key or algorithm. That is, the VMM may map the code containing an embedded secret key or algorithm onto a page that is referenced by an entry with the combination of “R”, “W” and “X” bits set to 001. As a result, the secure code can be invoked and executed, and at the same time, the embedded secret key or algorithm will be protected from being read or modified by other code running in the same address space.


The combination of “R”, “W” and “X” bits may further be used to assist debugging operations. Specifically, present pages holding data may be mapped either with the combination of “R”, “W” and “X” bits set to 010 or 110 by a VMM-resident debugger. With these protections, the debugger can immediately determine when problematic code has inadvertently started to execute data as if it were instructions.


In yet another example, one of the AVAIL bits may be combined with the existing “U/S” bit to indicate whether a given page is accessible by code running at a certain privilege level. The VMM can then use two bits to specify the highest privilege level at which a given page is accessible. For example, the value of 00 may indicate that only the code running at privilege level 0 may access a given page, the value of 01 may indicate that the code running at privilege level 0 or 1 may access the page, the value of 10 may indicate that the code running at privilege level 0, 1 or 2 may access the page, and the value of 11 may indicate that the code running at any privilege level may access the page. The use of two bits to control the privilege level of the accessing code provides higher degree of flexibility, making it possible, for example, to run device drivers at privilege level 1 and the rest of the OS kernel at privilege level 0, while using page-level protections to guard the ring-0 kernel against rogue or faulty ring-1 device drivers. These page level protections are not possible with the existing “U/S” bit, which clusters rings 0, 1, 2 together as the supervisor (S) privilege level, and designates ring 3 as the user (U) privilege level.


The functionalities described above with reference to the “G/H” bit, the independently settable “R”, “W” and “X” bits and the combination of the “U/S” bit with one AVAIL bit can be achieved simultaneously by redefining the meanings of the 3 existing “P”, “R/W” and “U/S” bits and combining them with the 3 reclaimed AVAIL bits. Specifically, three of the resulting six bits may be used as independently settable “R”, “W” and “X” bits, two of the remaining three bits may be used to indicate the highest ring at which the code has access rights, and the last bit can be used as a “G/H” bit. For this interpretation of the bits, the page may be considered “not present” if the combination of the “R”, “W”, and “X” bits has a setting of 000.


It should be noted that the existing fields within the active address translation data structures can be interpreted and used in a variety of ways other than those described above without loss of generality.


Thus, a method and apparatus for reclaiming existing fields in an address translation data structure have been described. It is to be understood that the above description is intended to be illustrative, and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.

Claims
  • 1. A method comprising: determining that a modification of content of an active address translation data structure is required; andmodifying an entry in the active address translation data structure to conform to a corresponding entry in a guest address translation data structure; andkeeping a portion of the entry in the active address translation data structure unchanged while modifying the entry in the active address translation data structure, the unchanged portion of the entry in the active address translation data structure including at least one access control indicator and corresponding to a field designated for operational use by guest software within the entry of the guest address translation data structure.
  • 2. The method of claim 1 wherein the content of the active address translation data structure is used by a processor to cache address translations in a translation-lookaside buffer (TLB).
  • 3. The method of claim 1 wherein the guest address translation data structure is used by guest software for address translation operations.
  • 4. The method of claim 1 wherein the active address translation data structure is managed by a virtual machine monitor (VMM).
  • 5. The method of claim 1 further comprising: setting the at least one access control indicator to a specific value.
  • 6. The method of claim 1 wherein the active address translation data structure is an active page-table hierarchy.
  • 7. The method of claim 6 wherein: the entry in the active address translation data structure is any one of a page-table entry and a page-directory entry; andthe at least one access control indicator is at least one software-available bit within the entry.
  • 8. The method of claim 6 wherein the at least one access control indicator includes a guest-host indicator controlling access to a corresponding page in the page-table hierarchy by guest software.
  • 9. The method of claim 6 wherein the at least one access control indicator includes an execute-privilege indicator controlling execution of instructions from a corresponding page in the page-table hierarchy and a read-privilege indicator controlling read accesses to the corresponding page in the page-table hierarchy.
  • 10. The method of claim 9 wherein a read/write bit is re-interpreted as a write privilege indicator controlling write accesses to the corresponding page in the page-table hierarchy.
  • 11. The method of claim 6 wherein the at least one access control indicator includes a privilege-level access indicator controlling accesses to a corresponding page in the page-table hierarchy by code running at a specific privilege level.
  • 12. An apparatus comprising: a guest address translation data structure to translate virtual memory addresses into physical memory addresses by guest software;an active address translation data structure to derive partial content from the guest address translation data structure, the partial content excluding a field designated for operational use by guest software within each of a plurality of entries in the guest address translation data structure, the designated field remaining unchanged when a corresponding entry in the active address translation data structure is modified to conform to content of the guest address translation data structure; anda translation-look aside buffer (TLB) to store address translations obtained from the active address translation data structure by a processor.
  • 13. The apparatus of claim 12 wherein the active address translation data structure is managed by a virtual machine monitor (VMM).
  • 14. The apparatus of claim 13 wherein the VMM is to set at least one access control indicator in an entry of the active address translation data structure to a specific value, the at least one access control indicator corresponding to a field designated for operational use by the guest software within a relevant entry of the guest address translation data structure.
  • 15. The apparatus of claim 12 wherein the active address translation data structure is an active page-table hierarchy.
  • 16. The apparatus of claim 15 wherein: the entry in the active address translation data structure is any one of a page-table entry and a page-directory entry; andthe at least one access control indicator is at least one software-available bit within the entry.
  • 17. The apparatus of claim 15 wherein the at least one access control indicator in the entry of the active address translation data structure includes a guest-host indicator controlling access to a corresponding page in the page-table hierarchy by guest software.
  • 18. The apparatus of claim 15 wherein the at least one access control indicator in the entry of the active address translation data structure includes an execute-privilege indicator controlling execution of instructions from a corresponding page in the page-table hierarchy and a read-privilege indicator controlling read accesses to the corresponding page in the page-table hierarchy.
  • 19. The apparatus of claim 18 wherein a read/write bit is re-interpreted as a write privilege indicator controlling write accesses to the corresponding page in the page-table hierarchy.
  • 20. The apparatus of claim 15 wherein the at least one access control indicator in the entry of the active address translation data structure includes a privilege-level access indicator controlling accesses to a corresponding page in the page-table hierarchy by code running at a specific privilege level.
  • 21. A machine-readable medium containing instructions which, when executed by a processing system, cause the processing system to perform a method, the method comprising: determining that a modification of content of an active address translation data structure is required; andmodifying an entry in the active address translation data structure to conform to a corresponding entry in a guest address translation data; andkeeping a portion of the entry in the active address translation data structure unchanged while modifying the entry in the active address translation data structure, the unchanged portion of the entry in the active address translation data structure including at least one access control indicator and corresponding to a field designated for operational use by guest software within the entry of the guest address translation data structure.
  • 22. The machine-readable medium of claim 21 wherein the content of the active address translation data structure is used by a processor to cache address translations in a translation-lookaside buffer (TLB).
  • 23. The machine-readable medium of claim 21 wherein the guest address translation data structure is used by guest software for address translation operations.
  • 24. The machine-readable medium of claim 21 wherein the active address translation data structure is managed by a virtual machine monitor (VMM).
  • 25. The machine-readable medium of claim 21 wherein the active address translation data structure is an active page-table hierarchy.
  • 26. The machine-readable medium of claim 25 wherein: the entry in the active address translation data structure is any one of a page-table entry and a page-directory entry; andthe at least one access control indicator is at least one software-available bit within the entry.
  • 27. A system comprising: a processing system; anda memory, coupled to the processing system, to store instructions, which when executed by the processing system, cause the processing system to determine that a modification of content of an active address translation data structure is required, to modify an entry in the active address translation data structure to conform to a corresponding entry in a guest address translation data structure, and to keep a portion of the entry in the active address translation data structure unchanged while modifying the entry in the active address translation data structure, the unchanged portion of the entry in the active address translation data structure including at least one access control indicator and corresponding to a field designated for operational use by guest software within the entry of the guest address translation data structure.
  • 28. The system of claim 27 wherein the content of the active address translation data structure is used by a processor to cache address translations in a translation-lookaside buffer (TLB).
  • 29. The system of claim 27 wherein the guest address translation data structure is used by guest software for address translation operations.
  • 30. The system of claim 29 wherein the active address translation data structure is managed by a virtual machine monitor (VMM).
US Referenced Citations (207)
Number Name Date Kind
3699532 Schaffer et al. Oct 1972 A
3996449 Attanasio et al. Dec 1976 A
4037214 Birney et al. Jul 1977 A
4162536 Morley Jul 1979 A
4207609 Luiz et al. Jun 1980 A
4247905 Yoshida et al. Jan 1981 A
4276594 Morley Jun 1981 A
4278837 Best Jul 1981 A
4307447 Provanzano et al. Dec 1981 A
4319233 Matsuoka et al. Mar 1982 A
4319323 Ermolovich et al. Mar 1982 A
4347565 Kaneda et al. Aug 1982 A
4366537 Heller et al. Dec 1982 A
4403283 Myntti et al. Sep 1983 A
4419724 Branigin et al. Dec 1983 A
4430709 Schleupen et al. Feb 1984 A
4521852 Guttag Jun 1985 A
4571672 Hatada et al. Feb 1986 A
4621318 Maeda Nov 1986 A
4759064 Chaum Jul 1988 A
4795893 Ugon Jan 1989 A
4802084 Ikegaya et al. Jan 1989 A
4825052 Chemin et al. Apr 1989 A
4907270 Hazard Mar 1990 A
4907272 Hazard Mar 1990 A
4910774 Barakat Mar 1990 A
4975836 Hirosawa et al. Dec 1990 A
5007082 Cummins Apr 1991 A
5022077 Bealkowski et al. Jun 1991 A
5075842 Lai Dec 1991 A
5079737 Hackbarth Jan 1992 A
5187802 Inoue et al. Feb 1993 A
5230069 Brelsford et al. Jul 1993 A
5237616 Abraham et al. Aug 1993 A
5255379 Melo Oct 1993 A
5287363 Wolf et al. Feb 1994 A
5293424 Hotley et al. Mar 1994 A
5295251 Wakui et al. Mar 1994 A
5317705 Gannon et al. May 1994 A
5319760 Mason et al. Jun 1994 A
5361375 Ogi Nov 1994 A
5386552 Garney Jan 1995 A
5421006 Jablon et al. May 1995 A
5434999 Goire et al. Jul 1995 A
5437033 Inoue et al. Jul 1995 A
5442645 Ugon et al. Aug 1995 A
5455909 Blomgren et al. Oct 1995 A
5459867 Adams et al. Oct 1995 A
5459869 Spilo Oct 1995 A
5469557 Salt et al. Nov 1995 A
5473692 Davis Dec 1995 A
5479509 Ugon Dec 1995 A
5504922 Seki et al. Apr 1996 A
5506975 Onodera Apr 1996 A
5511217 Nakajima et al. Apr 1996 A
5522075 Robinson et al. May 1996 A
5528231 Patarin Jun 1996 A
5533126 Hazard et al. Jul 1996 A
5555385 Osisek Sep 1996 A
5555414 Hough et al. Sep 1996 A
5560013 Scalzi et al. Sep 1996 A
5564040 Kubals Oct 1996 A
5566323 Ugon Oct 1996 A
5568552 Davis Oct 1996 A
5574936 Ryba et al. Nov 1996 A
5582717 Di Santo Dec 1996 A
5604805 Brands Feb 1997 A
5606617 Brands Feb 1997 A
5615263 Takahashi Mar 1997 A
5628022 Ueno et al. May 1997 A
5633929 Kaliski, Jr. May 1997 A
5657445 Pearce Aug 1997 A
5668971 Neufeld Sep 1997 A
5684948 Johnson et al. Nov 1997 A
5706469 Kobayashi Jan 1998 A
5717903 Bonola Feb 1998 A
5720609 Pfefferle Feb 1998 A
5721222 Bernstein et al. Feb 1998 A
5729760 Poisner Mar 1998 A
5737604 Miller et al. Apr 1998 A
5737760 Grimmer, Jr. et al. Apr 1998 A
5740178 Jacks et al. Apr 1998 A
5752046 Oprescu et al. May 1998 A
5757604 Bennett et al. May 1998 A
5757919 Herbert et al. May 1998 A
5764969 Kahle et al. Jun 1998 A
5796835 Saada Aug 1998 A
5796845 Serikawa et al. Aug 1998 A
5805712 Davis Sep 1998 A
5809546 Greenstein et al. Sep 1998 A
5825875 Ugon Oct 1998 A
5825880 Sudia et al. Oct 1998 A
5835594 Albrecht et al. Nov 1998 A
5844986 Davis Dec 1998 A
5852717 Bhide et al. Dec 1998 A
5854913 Goetz et al. Dec 1998 A
5867577 Patarin Feb 1999 A
5872994 Akiyama et al. Feb 1999 A
5890189 Nozue et al. Mar 1999 A
5900606 Rigal May 1999 A
5901225 Ireton et al. May 1999 A
5903752 Dingwall et al. May 1999 A
5919257 Trostle Jul 1999 A
5935242 Madany et al. Aug 1999 A
5935247 Pai et al. Aug 1999 A
5937063 Davis Aug 1999 A
5944821 Angelo Aug 1999 A
5953502 Helbig, Sr. Sep 1999 A
5956408 Arnold Sep 1999 A
5970147 Davis et al. Oct 1999 A
5978475 Schneier et al. Nov 1999 A
5978481 Ganesan et al. Nov 1999 A
5987557 Ebrahim Nov 1999 A
6014745 Ashe Jan 2000 A
6035374 Panwar et al. Mar 2000 A
6044478 Green Mar 2000 A
6055637 Hudson et al. Apr 2000 A
6058478 Davis May 2000 A
6061794 Angelo May 2000 A
6075938 Bugnion et al. Jun 2000 A
6085296 Karkhanis Jul 2000 A
6088262 Nasu Jul 2000 A
6092095 Maytal Jul 2000 A
6093213 Favor et al. Jul 2000 A
6101584 Satou et al. Aug 2000 A
6108644 Goldschlag et al. Aug 2000 A
6115816 Davis Sep 2000 A
6125430 Noel et al. Sep 2000 A
6131166 Wong-Isley Oct 2000 A
6148379 Schimmel Nov 2000 A
6158546 Hanson et al. Dec 2000 A
6173417 Merrill Jan 2001 B1
6175924 Arnold Jan 2001 B1
6175925 Nardone et al. Jan 2001 B1
6178509 Nardone et al. Jan 2001 B1
6182089 Ganapathy et al. Jan 2001 B1
6188257 Buer Feb 2001 B1
6192455 Bogin et al. Feb 2001 B1
6199152 Kelly et al. Mar 2001 B1
6205550 Nardone et al. Mar 2001 B1
6212635 Reardon Apr 2001 B1
6222923 Schwenk Apr 2001 B1
6249872 Wildgrube et al. Jun 2001 B1
6252650 Nakaumra Jun 2001 B1
6269392 Cotichini et al. Jul 2001 B1
6272533 Browne Aug 2001 B1
6272637 Little et al. Aug 2001 B1
6275933 Fine et al. Aug 2001 B1
6282650 Davis Aug 2001 B1
6282651 Ashe et al. Aug 2001 B1
6282657 Kaplan et al. Aug 2001 B1
6292874 Barnett Sep 2001 B1
6301646 Hostetter et al. Oct 2001 B1
6308270 Guthery et al. Oct 2001 B1
6314409 Schneck et al. Nov 2001 B1
6321314 Van Dyke Nov 2001 B1
6327652 England et al. Dec 2001 B1
6330670 England et al. Dec 2001 B1
6339815 Feng et al. Jan 2002 B1
6339816 Bausch Jan 2002 B1
6357004 Davis Mar 2002 B1
6363485 Adams Mar 2002 B1
6374286 Gee et al. Apr 2002 B1
6374317 Ajanovic et al. Apr 2002 B1
6378068 Foster Apr 2002 B1
6378072 Collins et al. Apr 2002 B1
6389537 Davis et al. May 2002 B1
6397242 Devine et al. May 2002 B1
6397379 Yates, Jr. et al. May 2002 B1
6412035 Webber Jun 2002 B1
6421702 Gulick Jul 2002 B1
6435416 Slassi Aug 2002 B1
6445797 McGough et al. Sep 2002 B1
6463535 Drews et al. Oct 2002 B1
6463537 Tello Oct 2002 B1
6499123 McFarland et al. Dec 2002 B1
6505279 Phillips et al. Jan 2003 B1
6507904 Ellison et al. Jan 2003 B1
6529909 Bowman-Amuah Mar 2003 B1
6535988 Poisner Mar 2003 B1
6557104 Vu et al. Apr 2003 B1
6560627 McDonald et al. May 2003 B1
6609199 DeTreville Aug 2003 B1
6615278 Curtis Sep 2003 B1
6633963 Ellison et al. Oct 2003 B1
6633981 Davis Oct 2003 B1
6651171 England et al. Nov 2003 B1
6678825 Ellison et al. Jan 2004 B1
6684326 Cromer et al. Jan 2004 B1
20010021969 Burger et al. Sep 2001 A1
20010027511 Wakabayashi et al. Oct 2001 A1
20010027527 Khidekel et al. Oct 2001 A1
20010037450 Metlitski et al. Nov 2001 A1
20020007456 Peinado et al. Jan 2002 A1
20020023032 Pearson et al. Feb 2002 A1
20020147916 Strongin et al. Oct 2002 A1
20020166061 Falik et al. Nov 2002 A1
20020169717 Challener Nov 2002 A1
20030018892 Tello Jan 2003 A1
20030074548 Cromer et al. Apr 2003 A1
20030115453 Grawrock Jun 2003 A1
20030126442 Glew et al. Jul 2003 A1
20030126453 Glew et al. Jul 2003 A1
20030159056 Cromer et al. Aug 2003 A1
20030188179 Challener et al. Oct 2003 A1
20030196085 Lampson et al. Oct 2003 A1
20040117539 Bennett et al. Jun 2004 A1
Foreign Referenced Citations (40)
Number Date Country
42177444 Dec 1992 DE
0473913 Mar 1992 EP
0600112 Jun 1994 EP
0602867 Jun 1994 EP
0892521 Jan 1999 EP
0930567 Jul 1999 EP
0961193 Dec 1999 EP
0965902 Dec 1999 EP
1030237 Aug 2000 EP
1055989 Nov 2000 EP
1056014 Nov 2000 EP
1085396 Mar 2001 EP
1146715 Oct 2001 EP
1209563 May 2002 EP
1271277 Jan 2003 EP
76139 Mar 2000 JP
76139 Mar 2000 JP
WO9524696 Sep 1995 WO
WO 9729567 Aug 1997 WO
WO9812620 Mar 1998 WO
WO 9834365 Aug 1998 WO
WO 9844402 Oct 1998 WO
WO 9905600 Feb 1999 WO
WO 9909482 Feb 1999 WO
WO9918511 Apr 1999 WO
WO 9957863 Nov 1999 WO
WO9965579 Dec 1999 WO
WO0021238 Apr 2000 WO
WO 0062232 Oct 2000 WO
WO 0127723 Apr 2001 WO
WO 0127821 Apr 2001 WO
WO0163994 Aug 2001 WO
WO 0175564 Oct 2001 WO
WO 0175565 Oct 2001 WO
WO 0175595 Oct 2001 WO
WO0201794 Jan 2002 WO
WO 0217555 Feb 2002 WO
WO02060121 Aug 2002 WO
WO 02086684 Oct 2002 WO
WO03058412 Jul 2003 WO
Related Publications (1)
Number Date Country
20040117593 A1 Jun 2004 US