Contained herein is material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction of the patent disclosure by any person as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all rights to the copyright whatsoever.
This invention relates to virtual machines of a computer processor such as a microprocessor. In particular, the invention relates to memory management for virtual machines.
An Operating System (OS) is a software program that controls physical computer hardware (e.g., a processor, memory, and disk and CD-ROM drives) and presents application programs with a unified set of abstract services (e.g., a file system). A Virtual Machine Manager (VMM) is also a software program that controls physical computer hardware such as, for example, the processor, memory, and disk drives. Unlike an OS, a VMM presents programs executing within a Virtual Machine (VM) with the illusion that they are executing on real physical computer hardware that includes, for example, a processor, memory and a disk drive.
Each VM typically functions as a self-contained entity, such that software executing in a VM executes as if it were running alone on a “bare” machine instead of within a virtual machine that shares a processor and other physical hardware with other VMs. It is the VMM that emulates certain functions of a “bare” machine so that software executing within a VM executes as if it were the sole entity executing on the computer.
Various techniques have been developed to assign physical system memory to virtual machines running on a system. One such technique is the use of partitioned memory. Partitioned memory is where physical system memory is divided into a number of contiguous regions. While partitioned memory is less expensive to implement in the CPU, memory cannot be easily reconfigured dynamically between virtual machines.
Also various techniques have been developed to obtain greater performance from a given memory capacity. One such technique is the use of virtual memory. Virtual memory is based on the concept that, when running a program, the entire program need not be loaded into main memory at one time. Instead, the computer's operating system loads sections of the program into main memory from a secondary storage device (e.g., a hard disk drive) as needed for execution.
To make this scheme viable, the operating system maintains tables, which keep track of where each section of the program resides in main memory and secondary storage. As a result of executing a program in this way, the program's logical addresses no longer correspond to physical addresses in main memory. To handle this situation a central processing unit (CPU) maps the program's effective or virtual addresses into their corresponding physical addresses.
However, in computer systems implementing the partitioned memory technique, it is often desirable to dynamically reallocate memory for each virtual machine. It is also desirable manage memory on an individual page basis, rather than in large regions. With current partitioned memory systems, it is not possible to dynamically reallocate memory. Current partitioned memory systems also impose many limitations on the page level flexibility that many operating systems require to support virtual memory.
The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the invention. The drawings, however, should not be taken to limit the invention to the specific embodiments, but are for explanation and understanding only.
A mechanism for remapping partitioned virtual machine memory to page granular memory is described. Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.
In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.
In one embodiment, processor 101 is a processor in the Pentium® family of processors including the Pentium® IV family and mobile Pentium® and Pentium® IV processors available from Intel Corporation of Santa Clara, Calif. Alternatively, other processors may be used.
Processor 101 is coupled to a processor bus 110. Processor bus 110 transmits data signals between processor 101 and other components in computer system 100. Computer system 100 also includes a memory 113. In one embodiment, memory 113 is a dynamic random access memory (DRAM) device. However, in other embodiments, memory 113 may be a static random access memory (SRAM) device, or other memory device.
Memory 113 may store instructions and code represented by data signals that may be executed by processor 101. According to one embodiment, a cache memory 102 resides within processor 101 and stores data signals that are also stored in memory 113. Cache 102 speeds up memory accesses by processor 101 by taking advantage of its locality of access. In another embodiment, cache 102 resides external to processor 101.
Computer system 100 further comprises a chipset 111 coupled to processor bus 110 and memory 113. Chipset 111 directs data signals between processor 101, memory 113, and other components in computer system 100 and bridges the data signals between processor bus 110, memory 113, and a first input/output (I/O) bus 120.
In one embodiment, I/O bus 120 may be a single bus or a combination of multiple buses. In a further embodiment, I/O bus 120 may be a Peripheral Component Interconnect adhering to a Specification Revision 2.1 bus developed by the PCI Special Interest Group of Portland, Oreg. In another embodiment, I/O bus 120 may be a Personal Computer Memory Card International Association (PCMCIA) bus developed by the PCMCIA of San Jose, Calif. Alternatively, other busses may be used to implement I/O bus. I/O bus 120 provides communication links between components in computer system 100.
A network controller 121 is coupled I/O bus 120. Network controller 121 links computer system 100 to a network of computers (not shown in
A display device controller 122 is also coupled to I/O bus 120. Display device controller 122 allows coupling of a display device to computer system 100, and acts as an interface between the display device and computer system 100. In one embodiment, display device controller 122 is a monochrome display adapter (MDA) card.
In other embodiments, display device controller 122 may be a color graphics adapter (CGA) card, an enhanced graphics adapter (EGA) card, an extended graphics array (XGA) card or other display device controller. The display device may be a television set, a computer monitor, a flat panel display or other display device. The display device receives data signals from processor 101 through display device controller 122 and displays the information and data signals to the user of computer system 100.
A video decoder 123 is also coupled to I/O bus 120. Video decoder 123 is a hardware device that translates received encoded data into its original format. According to one embodiment, video decoder 123 is a Moving Picture Expert Group 4 (MPEG-4) decoder. However, one of ordinary skill in the art will appreciate that video decoder 123 may be implemented with other types of MPEG decoders.
According to one embodiment, computer system 100 supports virtual machines using partitioned memory. In a further embodiment, computer system 100 includes a mechanism to re-map post virtual machine memory to page granular memory.
Partitioning logic 210 supports virtual machine systems by the partitioning of addresses in memory 113. Partitioning logic 210 stores mapping information that indicates the location of pages in memory 113 at TLB 218. In particular, partitioning logic 210 generates a range of addresses for each virtual machine. For example, a 0-1 Gb range may be allocated for a first virtual machine, while 1-2 Gb, and 2-3 Gb ranges are allocated to a second and third virtual machines, respectively.
TLB 218 is coupled to partitioning logic 210. TLB 218 is a cache of the most frequently used page table entries (PTEs) in memory 113. In particular, TLB 218 includes the current active addresses being used in memory 113. Consequently, it is not necessary to access PTEs in memory 113 each time an address translation is performed.
In conventional virtual machine systems, partitioning logic 210 and TLB 218 perform all of the necessary address translations. However, it is often desirable to manage memory 113 on an individual page basis, rather than in large regions. With current partitioned memory systems, it is not possible to specify memory with page level flexibility that most operating systems require.
Chipset 111 includes a TLB 220. TLB 220 is a cache that includes the current active addresses being used at a remap table within memory 113. Memory 113 includes page tables 236 and remap tables 238. Page tables 236 translate the partitioned virtual machine addresses into physical memory addresses. Page tables 236 includes a collection of PTEs. Page tables 236 hold one PTE for each mapped virtual page. To access a page in physical memory, the appropriate PTE is looked up to find where the page resides.
Similar to page tables 236, remap tables 238 include a list of table entries that specify the remapping of partitioned virtual addresses to page level addresses. In one embodiment, TLB 220 and remap tables 238 are implemented to translate memory addresses back to supporting page level operation, thus, circumventing the range partitioning imposed by processor 101.
Offset register 550 provides mapping to an address space of a virtual machine that controls bus master 530. Typically, the computer system 100 operating system expects that the partitioned virtual machine physical address is the actual address. However, since the address is not the true physical address, because of the chipset remapping, the address used by bus master is not correct. Thus, offset manager 550 and TLB 220 correct the address so that the address is translated the same as the addresses of the operating system running in a VM are. According to one embodiment, TLB 220 may block bus master 530 access to memory 113 based upon a flag bit within TLB 220 base address. This flag can prevent read or write access or both depending on the definition provided by a particular implementation.
Directory entry 320 receives the bottom 10 bits of the partitioned address in order to define a starting location at remap table 330. Remap table 330 receives the next 10 bits that indicate an actual table entry within table 330 that includes the corresponding physical address. After the physical address is selected, the address is transmitted from TLB out 310 along with the first 12 bits of the partitioned address.
The chipset remapping mechanism combines memory partitioning with the advantages of page granular remapping. Thus, the chipset remapping mechanism enables processors that support virtual machines with partitioned memory space to take advantage of the flexibility provided by a page granular memory space. For instance, dynamic resizing of memory for virtual machines, which is nearly impossible in conventional systems, may now be achieved
Whereas many alterations and modifications of the present invention will no doubt become apparent to a person of ordinary skill in the art after having read the foregoing description, it is to be understood that any particular embodiment shown and described by way of illustration is in no way intended to be considered limiting. Therefore, references to details of various embodiments are not intended to limit the scope of the claims which in themselves recite only those features regarded as the invention.
This application is a continuation of prior U.S. patent application Ser. No. 10/330,986 filed Dec. 27, 2002 now U.S. Pat. No. 7,900,017.
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 | 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 et al. | 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 |
5139760 | Ogawa et al. | Aug 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 | Holtey 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 | Jul 1996 | A |
5555385 | Osisek | Sep 1996 | A |
5555414 | Hough et al. | Sep 1996 | A |
5560013 | Scalzi et al. | Sep 1996 | A |
5564040 | Kubala | 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 |
5757919 | Herbert et al. | May 1998 | A |
5764969 | Kahle et al. | Jun 1998 | A |
5784707 | Khalidi et al. | Jul 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 |
5809551 | Blandy | 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 et al. | 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 |
5956756 | Khalidi et al. | Sep 1999 | A |
5970147 | Davis | 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 et al. | May 2000 | A |
6075938 | Bugnion et al. | Jun 2000 | A |
6085296 | Karkhanis et al. | 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-Insley | 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 | Nakamura | Jun 2001 | B1 |
6260095 | Goodrum | Jul 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 | Aug 2001 | B1 |
6282657 | Kaplan et al. | Aug 2001 | B1 |
6292874 | Barnett | Sep 2001 | B1 |
6301646 | Hostetter | Oct 2001 | B1 |
6308270 | Guthery | Oct 2001 | B1 |
6314409 | Schneck et al. | Nov 2001 | B2 |
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 et al. | Mar 2002 | B1 |
6374286 | Gee et al. | Apr 2002 | B1 |
6374317 | Ajanovic et al. | Apr 2002 | B1 |
6378068 | Foster et al. | 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 | Sep 2002 | B1 |
6463535 | Drews | 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 | B2 |
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 |
6683615 | Baldwin | Jan 2004 | B1 |
6684326 | Cromer et al. | Jan 2004 | B1 |
6772315 | Perego | Aug 2004 | B1 |
6772316 | Lyon | Aug 2004 | B2 |
6856320 | Rubinstein et al. | Feb 2005 | B1 |
7089377 | Chen | Aug 2006 | 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 |
20020152428 | James et al. | Oct 2002 | A1 |
20020166061 | Falik et al. | Nov 2002 | A1 |
20020169717 | Challener | Nov 2002 | A1 |
20020184399 | Bak et al. | Dec 2002 | 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 |
20030131178 | Huang et al. | Jul 2003 | A1 |
20030159056 | Cromer et al. | Aug 2003 | A1 |
20030172234 | Soltis, Jr. | Sep 2003 | A1 |
20030188179 | Challener et al. | Oct 2003 | A1 |
20030196085 | Lampson et al. | Oct 2003 | A1 |
20040088505 | Watanabe | May 2004 | A1 |
20040098544 | Gaither et al. | May 2004 | A1 |
20040117539 | Bennett et al. | Jun 2004 | A1 |
Number | Date | Country |
---|---|---|
1382277 | Nov 2002 | CN |
4217444 | Dec 1992 | DE |
0473913 | Mar 1992 | EP |
0600112 | 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 |
1271277 | Jan 2003 | EP |
2000076139 | Mar 2000 | JP |
9524696 | Sep 1995 | WO |
9729567 | Aug 1997 | WO |
9812620 | Mar 1998 | WO |
9834365 | Aug 1998 | WO |
9844402 | Oct 1998 | WO |
9905600 | Feb 1999 | WO |
9909482 | Feb 1999 | WO |
9918511 | Apr 1999 | WO |
9957863 | Nov 1999 | WO |
9965579 | Dec 1999 | WO |
0021238 | Apr 2000 | WO |
0062232 | Oct 2000 | WO |
0127723 | Apr 2001 | WO |
0127821 | Apr 2001 | WO |
0163994 | Aug 2001 | WO |
0175564 | Oct 2001 | WO |
0175565 | Oct 2001 | WO |
0175595 | Oct 2001 | WO |
0201794 | Jan 2002 | WO |
0217555 | Feb 2002 | WO |
02060121 | Aug 2002 | WO |
02086684 | Oct 2002 | WO |
03058412 | Jul 2003 | WO |
Number | Date | Country | |
---|---|---|---|
20110131363 A1 | Jun 2011 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 10330986 | Dec 2002 | US |
Child | 13020124 | US |