Initial program loading system

Abstract: In a virtual machine system comprised of a real machine having a virtual machine control monitor including an initial program loading emulation part and a virtual machine and an outer memory connected to the real machine, a virtual machine assist mechanism is provided in the real machine for offering a control mechanism of the virtual machine by firmware. At an initial program loading stage, when an input-output substitutional generation command is generated at the initial program loading emulation part in the virtual machine control monitor, an actual data transmission is executed from the outer memory to the area of the virtual machine, as if an input-output request were generated at the virtual machine, and an input-output interruption after the execution of data transmission is transferred from the outer memory to the virtual machine assist mechanism by the control of the input-output substitutional generation command. Accordingly, an initial program loading emulation is executed independently of the initializing program of the operating system and the volume of the initial program loading emulation program is reduced.

Description: The present invention relates to an initial program loading system of a virtual machine for emulating an initial program load of an operating system (OS) under the same circumstances as prevail at the virtual machine. Generally, it is known that there are several kinds of computer architecture, as represented by the IBM architecture, and that there are several types of OS running on each machine. The "Encyclopedia of Computer Science and Technology" (Ed. J. Belzer et al., Dekker. New York, 1980, Vol. 14), discloses a virtual machine monitor for a real machine system for controlling a plurality of virtual machines. Under the control of the virtual machine monitor, each of the virtual machines work like a real machine. The virtual machine monitor intercepts access to resources. A virtual access control unit maps all virtual references into real references, and it is indicated that virtual machines are created in an IPL'd state, but no details of the method for achieving this are given. Recently, it has become common practice to operate a variety of OS on a virtual machine, and this has lead to a need to reduce an amount of program needed to emulate the initial program loading (IPL) of the OS. Usually, when emulating an IPL of the OS running on the virtual machine, IPL emulation programs prepared for each variety of OS or each architecture of the virtual machine are first transmitted to an area of the virtual machine, and the IPL emulation programs are executed in that area of the virtual machine. A dispatcher, which executes a control to give each virtual machine an execution right for a real central processing unit (CPU), transfers the control to the IPL emulation program transmitted to the virtual machine at a predetermined timing. Since the IPL emulation of the OS is executed in the ares of the virtual machine, for the current IPL emulation program, a channel command word (CCW) analysis and processing part, an input-output (I/O) execution and processing part, an IPL emulation end information part, and so on, must be included as basic parts for the emulation. The CCW analysis and processing part executes an operation of analysing the CCW to read a bootstrap on a system volume for each OS; the I/O execution and processing part generates an input/output starting (SIO) command to read data from the system volume, which is an outer memory device; and the IPL emulation end information part informs the virtual machine control monitor of an end of the IPL emulation, by an I/O interruption. Further, to cope with a malfunction during the emulation, it is also necessary to provide an abnormality processing part for executing a program interruption, machine check interruption and so on, in the emulation program, similar to a common OS. Nevertheless, if the architecture of the virtual machine is different, it is necessary to create IPL emulation programs for each architecture, since each of the IPL emulation programs is useful only for a particular virtual machine. Further, since an OS initializing program (a bootstrap) may be constructed individually for each OS, and address of the IPL emulation program and an address of the individual OS initializing program in the area of the virtual machine may be the same. To avoid this, it is necessary to confirm the operating address of the OS initializing program operation at the virtual machine, and to make the arrangement thereof. The confirmation of the address of the OS initializing program operation at the virtual machine is realized, for example, by testing the programmer by carrying out an experimental operation using the OS initializing program. Accordingly, in the prior art, a problem exists of the requirement for much effort when developing and maintaining the IPL emulation programs. An object of the present invention is to provide an initial program loading system of the virtual machine for executing the IPL emulation program independent from the OS initializing program, and able to reduce the volume of the IPL emulation program. According to an aspect of the present invention, there is provided a virtual machine initial program loading system, including: a virtual machine initial program loading (IPL) system, comprises: A central processing unit; a memory being allocated to a plurality of virtual machines; a system volume in which an operating system is stored, including a boot strap which includes a channel control word for the IPL and a channel control word for loading an IPL processing part of the operating system, the channel control words being dependent on the operating system; a virtual machine control monitor including an IPL emulation part which is common to all systems, the IPL emulation part including a channel control word for reading the channel control word for the IPL from the boot of the system volume, and for combining the channel control word for reading with the channel control word for the IPL, the virtual machine monitor generating a substitution generation command; and, a virtual machine assist mechanism which receives the substitution generation command from the virtual machine monitor, determines a memory location for the particular virtual machine from a look up table, plus an offset for the channel control words which are stored in the virtual machine, and controls the transfer of data from the system volume to the determined memory area in the virtual machine. In this way, the I/O execution for IPL emulation is instructed by the virtual machine control monitor, and thus it becomes possible to delete, for example, the IPL emulation end information part and the abnormal processing part for processing an abnormal program interruption or an abnormal machine check interruption from the program equivalent to the conventional IPL emulation program, thereby reducing the scale of the development of the program relating to the IPL emulation. The present invention will be more clearly understood from the description as set forth below, with reference to the accompanying drawings wherein: Fig. 1 shows a schematic block diagram for explaining a conventional IPL emulation; Fig. 2 is a schematic block diagram for explaining an IPL emulation according to the present invention; Fig. 3 shows a mechanism of CCW for use in an IPL emulation according to one embodiment of the the present invention; Fig. 4 is an explanatory chart of an I/O substitutional generation command according to one embodiment of the present invention; Fig. 5 is an explanatory chart of an IPL emulation according to the present invention; Fig. 6 is a flowchart for explaining the operation of the IPL emulation part according to one embodiment of the present invention. Fig. 7 is a schematic diagram for explaining a construction of virtual machine assist mechanism according to the present invention; and, Fig. 8 shows a condition of an area of a virtual machine during the IPL emulation. Before describing the preferred embodiments, an explanation will be given of the conventional IPL emulation for a virtual machine, with reference to Fig. 1. Figure 1 is a schematic block diagram explaining a conventional IPL emulation for a virtual machine. In Fig. 1, reference numeral 11 denotes a virtual machine control monitor having a dispatcher 50, reference numeral 14 denotes a first virtual machine (VM1) having an emulation program 51 containing a CCW analysis and processing part 52, an I/O execution and processing part 53 where an SIO instruction is generated, an IPL emulation end information part 54, and an abnormal state processing part 55, reference numeral 14' denotes a second virtual machine (VM2) having an IPL emulation program 51', reference numeral 60 denotes a system volume for a first operating system (OS1) which is an outer memory wherein a monitor part of each OS is stored, and reference numeral 60' denotes a system volume for a second operating system (OS2). The virtual machine control monitor 11 transmits an IPL emulation program for the OS1 and for the OS2. Usually, when emulating an IPL of the OS running at the virtual machines 14 and 14', IPL emulation programs 51 and 51' prepared for each variety of OS or each architecture of the virtual machine are transmitted to an inside area of the virtual machines 14 and 14', and the IPL emulation programs 51 and 51' are executed in the area of the virtual machine. A dispatcher 50, which executes a control to give each virtual machine an execution right for a real CPU, transfers a control to the IPL emulation program 51 and 51' transmitted to the virtual machine 14 and 14' at a predetermined timing. Since the current IPL emulation of the OS is executed in the area of the virtual machine, the IPL emulation programs 51 and 51' a CCW (channel command word) analysis and processing part 52, an I/O execution and processing part 53, an IPL emulation end information part 54, and so on must be included as basic parts of the emulation. The CCW analysis and processing part 52 executes an operation of analysing the CCW (channel command word) to read a bootstrap on the system volume 60 for each OS; the I/O execution and processing part 53 generates an input-output starting (SIO) command to read data from the system volume 60; and the IPL emulation end information part 54 informs the virtual machine control monitor 11 of an end of the IPL emulation by an interruption which occurs at the end of the I/O. Further, to cope with the occurence of an abnormal state during the emulation, it is also necessary to provide the abnormal processing part 55 to execute a program interruption, machine check interruption, and so on in the emulation program 51, similar to a common OS. Nevertheless, if the architecture of the virtual machine is different, it is necessary to create IPL emulation programs 51 and 51' for each different architecture, since each of the IPL emulation programs 51 and 51' works as one OS at each virtual machine 14 and 14' respectively. Further, since an OS initializing program (a bootstrap) may be constructed individually for each OS, a address of the IPL emulation programs 51 and 51' and the address of the individual inItializing program for OS in the area of the virtual machine may be the same. To avoid this, it is necessary to confirm an operating position of the OS initializing program for operating at the virtual machine, and to make the arrangement thereof. Accordingly, in the prior art, the problem exists of the requirement for much effort when developing and maintaining the IPL emulation programs 51 and 51'. Figure 2 shows a schematic block diagram explaining an IPL emulation according to the present invention. In Fig. 2, reference numeral 10 denotes a real machine comprising a CPU, memory, and so on; reference numeral 11 denotes a virtual machine control monitor for making an operating environment of a virtual machine and controlling the virtual machine; reference numeral 12 denotes an IPL emulation part for emulating an IPL of OS which runs on the virtual machine; reference numeral 13 denotes a virtual machine assist mechanism (VM assist mechanism) offering a control mechanism of the virtual machine by firmware; reference numeral 14 denotes a virtual machine given a virtual machine environment (other virtual machines are not shown in Fig. 2); reference numeral 15 denotes a CCW for reading a boot; reference numeral 16 denotes a system volume for storing an OS program which runs at the virtual machine 14; reference numeral 17 denotes a bootstrap existing in a specified block of the system volume 16; reference numeral 18 denotes a CCW for the IPL of the OS; reference numeral 19 denotes an OS load module which is intended to run at the virtual machine 14; reference numeral 21 denotes a number of control registers VM1 to VMn; reference numeral 22 denotes a work area for saving data; and, reference numeral denotes the dispatcher 50. In the present invention, IPL emulation programs for each OS are not prepared; instead, the IPL emulation part 12 able to operate an IPL emulation commonly for each OS is prepared. In the present invention, the IPL emulation part 12 must generate a start I/O command for the IPL instead of the virtual machine 14, whereby an I/O substitutional generation command is provided. When this I/O substitutional generation command is executed, the VM assist mechanism 13 controls the I/O as follows: the virtual machine control monitor 11 becomes a generation source of an I/O execution instruction command, and the data to be transmitted is in the area of the virtual machine 14. When the instruction for an IPL emulation is received, the IPL emulation part 12 transmits the CCW 15 for reading the boot, which is the object of the instructed system volume 16 to the area of the virtual machine 14, which is the object, to the IPL. The CCW 15 for reading the boot is previously set to combine with the CCW 18 for IPL of the bootstrap 17 which is read by the CCW 15. After that, the IPL emulation part 12 executes the substitutional generation command for executing an I/O of the CCW 15 for reading the boot. Accordingly, the CCW 18 for IPL is read into the area of the virtual machine, and further, a channel program of the CCW 18 for IPL is executed by the command chain. Furthermore, a loader for loading the OS load module 19 or a CCW for reading is read from the CCW 18 for the IPL. In the present invention, the instruction for the I/O execution is executed by the virtual machine control monitor 11, but the function of transmitting the actual data to the area of the virtual machine 14 and the function of intercepting the I/O interruption after the I/O execution by the virtual machine control monitor 11 are realized by the control of the I/O substitutional generation command offered by the VM assist mechanism 13. Accordingly, it is not necessary to run the IPL emulation program in the virtual machine and the emulation can be executed by the virtual machine control monitor 11 having the IPL emulation part 12 which is common for each OS. In this way, the execution of I/O for IPL emulation is instructed by the virtual machine control monitor 11, so that it becomes possible to delete, for example, the CCW analysis and processing part 52, I/O execution and processing part 53, the IPL emulation end information part 54 and the abnormal processing part 55 from the virtual machine 14 as shown in Fig. 1, thereby reducing the scale of the development of the program related to the IPL emulation. Figure 3 shows the construction of one embodiment of the CCW using the IPL emulation according to the present invention, Fig. 4 explains the I/O substitutional generation command according to the present invention, and Fig. 5 is an explanatory chart of the IPL emulation according to the present invention. The CCW (channel command word) using in the IPL emulation is constructed, for example, as shown in Fig. 3. The CCW 15 for reading a boot comprises a channel command BOOT-CCW1 and a channel command BOOT-CCW2. The channel command BOOT-CCW1 is used for reading the CCW 18 for an IPL of 24 byte from the bootstrap 17 of the system volume 16 as shown in Fig. 2, and a channel command BOOT-CCW2 is used for combining the channel program at an eighth byte of the read CCW 18 for the IPL. The CCW 18 for the IPL and CCW 20 for loading an IPL processing part of the OS are created by a programmer of the OS initialized program at the same time as the programmer create the initialized program. The CCW 18 for the IPL comprises a command address IPL-PSW (program status word), a channel command IPL-CCW1, and a command IPL-CCW2 as shown in Fig. 3. The command address IPL-PSW is the address where a data indicating the command execution position of the OS at first is set by the user, the channel command IPL-CCW1 is used for reading the CCW 20 for loading an IPL processing part of OS, and the command IPL-CCW2 is used for combining the channel program with the read CCW 20. The CCW 18 for the IPL is made of 24 byte, but the actual channel program is made of 16 byte and excludes the byte for the IPL-PSW. The content of the substitutional generation command when generated by the virtual machine control monitor 11 instead of by the virtual machine 14 is shown in Fig. 4. The name of the command is EXGIO and operands thereof are a command code for a command being substituted and a virtual machine identifier (VMID). These are converted into a predetermined machine language. According to this command, the VM assist mechanism 13 processes the control as if the OS running at the virtual machine 14 indicated by VMID has generated the command indicated by the command code. As shown in Fig. 5, when the virtual machine control monitor 11 generates the command EXGIO, the data transmission is executed as follows: (1) an I/O request, which is an instruction requiring an I/O, is transmitted from the virtual machine control monitor to the VM assist mechanism 13; (1)' the VM assist mechanism 13 transmits the I/O request as if this I/O request were generated at the virtual machine 14 having an identifier VM1 as a start I/O (SIO) command; (2) the VM assist mechanism 13 executes the data transmission from the system volume 16 indicated by the channel program to the area of the virtual machine 14; and (3) when this I/O operation is finished, an I/O interruption is executed by the virtual machine control monitor 11 via the VM assist mechanism 13. Fig. 6 is a flowchart explaining the operation of the IPL emulation part 12 as shown in Fig. 2. At step 601, it is determined whether or not the command for an IPL is input. If the command for the IPL is input, the control proceeds to step 602 and the IPL emulation of the OS is started, but if the command for the IPL is not input, the control waits for the command to input. The command for the IPL is input by the operator and the object device of the IPL is also indicated by the operator at the same time. After the input of the command for the IPL, a saving the area of the virtual machine wherein sixteen byte of BOOT-CCW are transmitted is executed as a preparation for the IPL emulation at step 603. The work area 22 for saving the data as shown in Fig. 2 is applied for saving the area of the virtual machine, and sixteen bytes of data from the twenty-fourth address of the area of the virtual machine are saved in the work area 22. The operation of step 603 enables the data in the area of the virtual machine 14, which would be destroyed by the emulation, to be saved. At step 604, sixteen bytes of the CCW for reading the BOOT of the indicated device are transmitted from the system volume 16 to the area of the virtual machine 14. Then, at step 605, the CCW for reading the boot is combined with the CCW for the IPL. In this operation, a position of the IPL-CCW (8th address) is set up at a CCW position of the CCW2 for reading a boot. Fig. 8 shows a table of VM (virtual machine) area, and explains an address and the contents thereof. AT step 606, a command EXGIO is generated at the virtual machine control monitor 11. In this operation, VMID is first taken out from a management data table for the head address of virtual machine shown in Fig. 7, and then the SIO command is instructed to generate the command EXGIO. As shown in Fig. 7, the management data table for the head address of virtual machine is provided for each virtual machine in the VM assist mechanism, and the position of the management data table is instructed by the VMID indicated by the command EXGIO. Namely, a main memory of the virtual machine to be used is informed that the address thereof is from 0 to m', by the command EXGIO. Further, the Vm assist mechanism 13 executes the calculation of the position of a data in the process of data transmission between the I/O devices as (Data Position) = (Address in virtual machine area)+ (virtual machine head address). The command EXGIO is executed under the condition that the command code of the operand is considered to be the code of the start I/O command which executes the CCW for reading the boot, and VMID is considered to be the identifier of a virtual machine which is the object of the IPL. In this way, the I/O of the CCW for reading the boot and the CCW for the IPL, and further the CCW combined therefrom, are executed. At step 607, it is determined whether or not the interruption occurred because the I/O end interruption is generated and received by the VM assist mechanism 13 when the I/O is finished, as explained in Fig. 5. At this step, it is also determined whether or not the received I/O interruption is from object IPL device. If the interruption from the object IPL device is received, the control proceeds to step 608 but if the interruption is not received or a received interruption is not from the object IPL device, the control proceeds waits until the interruption from the object IPL device is received. At step 608, it is determined whether or not the saved data should be restored, and the control proceeds to step 609 to restore the saved data if the saved data is determined to be restored. But if the saved data should not be restored, the control skips the step 609 and proceeds to step 610. The case in which the saved data should not be restored is that where the load module has been already written in the virtual machine area. Then at step 610, the right of the control is changed from the IPL emulation part 12 to the IPL-PSW of the virtual machine 14 by the control of the dispatcher 50. Namely, when the right of the control is changed to the virtual machine 14, the value of IPL-PSW indicated by the first eight bytes of the CCW 18 for reading the boot is input in the control register of the virtual machine indicated by VMID, and then the IPL emulation is finished. After the end of the IPL emulation, the dispatcher 50 start the virtual machine at step 611, and this routine is completed at step 612. The present invention as described above, is not concerned with the operational environment of the OS initialized program running at the virtual machine, and can realize an IPL emulation independently of the OS initialized program in the IPL emulation.

Claims: A virtual machine initial program loading (IPL) system, comprising: A central processing unit; a memory being allocated to a plurality of virtual machines (14) ; a system volume (16) in which an operating system is stored, including a boot strap (17) which includes a channel control word (18) for the IPL and a channel control word (20) for loading an IPL processing part of the operating system, the channel control words (18,20) being dependent on the operating system; a virtual machine control monitor (11) including an IPL emulation part (12) which is common to all systems, the IPL emulation part (12) including a channel control word (15) for reading the channel control word (18) for the IPL from the boot of the system volume (16), and for combining the channel control word for reading (15) with the channel control word for the IPL (18), the virtual machine monitor (11) generating a substitution generation command; and, a virtual machine assist mechanism (13) which receives the substitution generation command from the virtual machine monitor (11), determines a memory location for the particular virtual machine (14) from a look up table, plus an offset for the channel control words (15,18,20) which are stored in the virtual machine (14), and controls the transfer of data from the system volume (16) to the determined memory area in the virtual machine (14).

Inventors: UCHINO MINORU, UCHINO, MINORU
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1991
Main classification: G06F9
IPC codes: G06F9