VIRTUAL MACHINE CONTROL PROGRAM AND VIRTUAL MACHINE SYSTEM
First Claim
1. A control program of a virtual machine that makes a plurality of OS'"'"'s operate using a computer having a CPU and memory,wherein the CPU has a memory protection function that is controlled based on a data structure,wherein the data structure has a first field and a second field that control approval/disapproval of a memory operation in each memory area,wherein the memory protection function, when the first or second field is set as operation-prohibited, generates a protection exception to an operation of the memory area and generates a cause code indicating a field that becomes an occurrence reason of the protection exception,wherein the OS controls a first data structure made up of the data structure on the memory,wherein the memory area that is specified to be operation-prohibited by the first field of the first data structure is wider than the memory area that is specified to be operation-prohibited by the second field of the first data structure,wherein the control program makes the computer execute a procedure of referring to the first data structure, a procedure of creating the second data structure that is made up of the data structure and whose second field prohibits a memory operation of the memory area that requires emulation of reading/writing, a procedure of making the memory protection function refer to the second data structure, and a procedure of determining necessity of emulation by referring to the cause code at the time of occurrence of the protection exception.
1 Assignment
0 Petitions
Accused Products
Abstract
The program attains compatibility of suppression of an overhead accompanying page exception handling in the case of operating a program whose amount of memory use is large on a virtual machine and suppression of the overhead accompanying page exception handling in the case of operating a first OS that has a function of making another OS run on a virtual machine. A VMM creates a shadow PT for prohibiting reading-writing of privileged memory that requires emulation of reading/writing by using a RSV-bit, and registers the shadow PT and the second PT that a second OS operating on the first OS has in an x86 compatible CPU equipped with a page exception detecting function using two PT'"'"'s. When a page exception occurs, the VMM refers to a cause code of the page exception and, when a P field of the cause code is 0, determines immediately that emulation is unnecessary.
23 Citations
20 Claims
-
1. A control program of a virtual machine that makes a plurality of OS'"'"'s operate using a computer having a CPU and memory,
wherein the CPU has a memory protection function that is controlled based on a data structure, wherein the data structure has a first field and a second field that control approval/disapproval of a memory operation in each memory area, wherein the memory protection function, when the first or second field is set as operation-prohibited, generates a protection exception to an operation of the memory area and generates a cause code indicating a field that becomes an occurrence reason of the protection exception, wherein the OS controls a first data structure made up of the data structure on the memory, wherein the memory area that is specified to be operation-prohibited by the first field of the first data structure is wider than the memory area that is specified to be operation-prohibited by the second field of the first data structure, wherein the control program makes the computer execute a procedure of referring to the first data structure, a procedure of creating the second data structure that is made up of the data structure and whose second field prohibits a memory operation of the memory area that requires emulation of reading/writing, a procedure of making the memory protection function refer to the second data structure, and a procedure of determining necessity of emulation by referring to the cause code at the time of occurrence of the protection exception.
-
9. A virtual machine system having a CPU and memory in which a plurality of OS'"'"'s and a control program for making the plurality of OS'"'"'s operate are installed,
wherein the CPU has a memory protection function controlled based on a data structure, wherein the data structure includes the first field and the second field that control approval/disapproval of a memory operation in each memory area, wherein the memory protection function generates a protection exception to an operation of the memory area when the first or second field thereof is set as operation-prohibited, and creates the cause code indicating a field that became a reason of occurrence of the protection exception, wherein the OS controls the first data structure that is made up of the data structure on the memory, wherein the first data structure is such that a memory area being set as operation-prohibited by the first field is larger than the memory area being set as operation-prohibited by the second field, and wherein the control program has: -
a function of referring to the first data structure; a function of creating a second data structure that is made up of the data structure and such that a memory operation of the memory area requiring emulation of reading/writing is prohibited using the second field; a function of making the memory protection function refer to the second data structure; and a function of determining the necessity of emulation by referring to the cause code at the time of occurrence of the protection exception. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. A virtual machine system that is realized by program processing using a computer system including a CPU and memory and in which a plurality of OS'"'"'s and a control program for driving the plurality of OS'"'"'s are installed,
wherein each of the plurality of OS'"'"'s is equipped with a first event handler and a first data structure such that the memory is divided into a plurality of memory areas and a memory address and access approval/disapproval are controlled in the each memory area, wherein the control program is equipped with a second event handler, a first function of executing emulation in response to an instruction issued by each of the plurality of OS'"'"'s, and a second function of creating a second data structure reflecting the first data structure, wherein each of the first and second data structures is equipped with the first field and that second field that specify access approval/disapproval in the each memory area, wherein the CPU makes notification to the first event handler when the first field of the second data structure is set as access-prohibited, wherein the CPU makes notification to the second event handler when the second field of the second data structure is set as access-prohibited, and wherein the control program executes the emulation when notification is made to the second event handler.
Specification