Patent ID: 8099575
Filing Date: 2012-01-17
Classification: G06F

Abstract:
1. A virtual machine system having a CPU and a memory in which a control program makes a plurality of operating systems (OS's) operate, 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 of a plurality of memory areas in the memory, 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 one OS of the plurality of OS's 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 a 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; a procedure of determining necessity of emulation by referring to the cause code at a time of occurrence of the protection exception; a procedure of, at a time of initializing the second data structure, resetting a use history flag which shows a use situation of the second field in the first data structure and which indicates whether a history of the second data structure exists or not; a procedure of reading a setting of the second field in the first data structure, and when operation prohibition is being set, setting the use history flag; a procedure of, at a time of occurrence of the protection exception, reading the cause code; and a procedure of, (a) when the cause code indicates the first field, determining that emulation is not required, (b) when the cause code indicates the second field and the use history flag is being reset for a condition which indicate that a history of the second data structure does not exist, determining that emulation is required, and (c) when the cause code indicates the second field and the use history flag is being set for a condition which indicates that a history of the second data structure exists, analyzing a setting of the data structure and determining necessity of the emulation based on whether the setting can generate the protection exception.