[go: up one dir, main page]

WO2016092667A1 - Computer and interrupt control method - Google Patents

Computer and interrupt control method Download PDF

Info

Publication number
WO2016092667A1
WO2016092667A1 PCT/JP2014/082833 JP2014082833W WO2016092667A1 WO 2016092667 A1 WO2016092667 A1 WO 2016092667A1 JP 2014082833 W JP2014082833 W JP 2014082833W WO 2016092667 A1 WO2016092667 A1 WO 2016092667A1
Authority
WO
WIPO (PCT)
Prior art keywords
interrupt
physical
virtual
virtual machine
priority mode
Prior art date
Application number
PCT/JP2014/082833
Other languages
French (fr)
Japanese (ja)
Inventor
貴之 今田
直也 服部
俊臣 森木
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2014/082833 priority Critical patent/WO2016092667A1/en
Publication of WO2016092667A1 publication Critical patent/WO2016092667A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present invention relates to an interrupt control technique when virtual software is used in a computer having a multi-core CPU configuration.
  • the main role of virtualization software is to manage the correspondence between physical resources and virtual machines.
  • the virtualization software constantly monitors the usage status of CPU time on the virtual machine and the communication status due to interrupts, suppresses the use of physical resources exceeding the allocated amount, or substitutes for processing I do.
  • Virtualization software is mainly used for applications whose main factors are arithmetic processing and memory access. This is because in recent years, CPU vendors have mounted dedicated support mechanisms on CPUs, mainly for the purpose of speeding up arithmetic processing and memory access.
  • the current CPU distinguishes between an operation mode in which the guest OS on the virtual machine is executed (hereinafter referred to as non-root mode) and an operation mode in which the virtualization software itself is executed (hereinafter referred to as root mode). This is the mainstream method.
  • a hardware interrupt occurs for a physical CPU core that is operating in a virtual CPU core in non-root mode, (1) transition of the physical CPU core operation mode to root mode, (2) Hardware arbitration processing by virtualization software, (3) Transition of physical CPU core operation mode to non-root mode and transmission of hardware interrupt to virtual machine, (4) Interrupt handler in guest OS A series of processing called processing is required.
  • it is particularly important to reduce the processing time from (1) to (3).
  • the recent hardware support function has a mechanism for directly transmitting a hardware interrupt to the virtual machine without changing the CPU operation mode in order to reduce (1) to (4).
  • the hardware interrupt processing in the virtual machines is accelerated, and the security of the virtualization software is ensured. For the purpose.
  • a typical example of the invention disclosed in the present application is as follows. That is, a computer on which a plurality of virtual machines generated using logically divided computer resources operate, and the computer resources include a plurality of physical operation devices, one or more physical memories, and the physical operation Including one or more physical interrupt devices that generate hardware interrupts to a device, each of the plurality of virtual machines includes a plurality of virtual arithmetic devices, virtual memories, and virtual interrupt devices, One or more physical memories generate a plurality of virtual machines, store a program that realizes a virtualization management unit that manages the plurality of virtual machines, and control the virtual machines on the plurality of virtual machines Operating the operating system, and the plurality of physical computing devices include a first operation mode for executing processing by the virtualization management unit and the operating system.
  • a virtualization support unit that switches between the second operation mode for executing the processing and interrupt virtualization for transferring the hardware interrupt issued from the one or more physical interrupt devices between the physical arithmetic devices
  • the virtualization management unit executed by the physical arithmetic device specifies the physical arithmetic device assigned to the virtual machine in the
  • the hardware interrupt for the priority mode virtual machine is received by an arithmetic unit other than the arithmetic unit assigned to the priority mode virtual machine. Therefore, it is possible to avoid the overhead of the operating system processing on the virtual machine in the priority mode, and to speed up the hardware interrupt processing. Furthermore, since all hardware interrupts are processed by the virtualization manager, the security of the virtualization software can be ensured.
  • FIG. 3 is a block diagram illustrating an example of a configuration of a physical computer according to the first embodiment.
  • FIG. 6 is an explanatory diagram illustrating an example of a physical vector number management table held by a virtualization management unit according to the first embodiment.
  • FIG. 6 is an explanatory diagram illustrating an example of a virtual vector number management table held by a VM according to the first embodiment. It is explanatory drawing which shows an example of the CPU interruption identifier management table which the virtualization management part of Example 1 hold
  • 6 is an explanatory diagram illustrating an example of a VM interrupt device management table held by a virtualization management unit according to the first embodiment.
  • FIG. 6 is an explanatory diagram illustrating an example of a VM attribute table held by a virtualization management unit according to the first embodiment.
  • FIG. FIG. 6 is an explanatory diagram illustrating an example of a physical CPU core group management table held by a virtualization management unit according to the first embodiment. It is explanatory drawing which shows an example of the high-speed IPI control data which the virtualization management part of Example 1 hold
  • 10 is a flowchart illustrating an example of a VM attribute table setting process executed by a virtualization management unit according to the first embodiment.
  • 6 is a flowchart illustrating an example of a physical CPU core group management table update process executed by a virtualization management unit according to the first embodiment.
  • 6 is a flowchart illustrating an example of an interrupt setting process for a guest OS executed by a virtualization management unit according to the first embodiment.
  • 6 is a flowchart illustrating processing executed by the virtualization management unit according to the first embodiment during virtual CPU core scheduling.
  • 6 is a flowchart illustrating an example of a startup process executed by a virtualization management unit according to the first embodiment.
  • 6 is a flowchart illustrating an example of a startup process executed by a virtualization management unit according to the first embodiment.
  • 10 is a flowchart illustrating an example of an interrupt setting process for a guest OS executed by a virtualization management unit according to the second embodiment.
  • 12 is a flowchart illustrating an example of a startup process executed by a virtualization management unit according to the second embodiment.
  • processing attributes are set for each of two virtual machines generated on one physical computer. Specifically, “guest OS processing priority mode” is set for one virtual machine, and “guest OS processing non-priority mode” is set for one virtual machine.
  • the hardware issued from the interrupt device to the physical CPU core assigned to the virtual CPU core of the virtual machine in “guest OS processing non-priority mode” Receive an interrupt. Further, the physical CPU core that has received the hardware interrupt transfers the hardware interrupt to the physical CPU core assigned to the virtual CPU core of the virtual machine in the “guest OS processing priority mode”.
  • the physical CPU core assigned to the virtual CPU core of the virtual machine in the “guest OS processing priority mode” does not transition to the root mode. Therefore, a decrease in processing performance is suppressed in the virtual machine in “guest OS processing priority mode”.
  • the physical CPU core assigned to the virtual CPU core of the virtual machine receives the hardware interrupt from the interrupt device.
  • hardware interrupts are also referred to as HW interrupts.
  • FIG. 1 is a block diagram illustrating an example of the configuration of the physical computer 10 according to the first embodiment. Hereinafter, each of the hardware configuration and the software configuration of the physical computer 10 will be described.
  • the physical computer 10 includes a CPU resource 100, a memory resource 110, and an interrupt device resource 115 as computer resources.
  • the CPU resource 100 is composed of a plurality of physical CPU cores 101 using a multiprocessor configuration or a multicore CPU.
  • Each physical CPU core 101 includes a virtualization support function unit (not shown) (for example, Intel VT-x) and an interrupt virtualization support (Posted Interrupt Processing) used when the virtualization support function unit is enabled.
  • a function unit 102 is included.
  • the interrupt virtualization support function unit 102 is described in Non-Patent Document 1.
  • the physical CPU core 101 included in the CPU resource 100 is used as a computer resource allocated to the virtual computer 140 generated by the virtualization management unit 120 such as a hypervisor.
  • the virtual machine is also referred to as VM.
  • the virtualization management unit 120 described later converts a plurality of physical CPU cores 101 included in the CPU resource 100 into two groups of a first physical CPU core group 104 and a second physical CPU core group 105. Manage separately.
  • the first physical CPU core group 104 is a group of physical CPU cores 101 assigned to the virtual CPU core 150 of the VM 140 included in the priority group 190.
  • the virtualization management unit 120 controls the physical CPU cores 101 included in the first physical CPU core group 104 so that transition to the root mode does not occur. As a result, it is possible to suppress a decrease in processing performance of the guest OS 160 running on the VM 140 included in the priority group 190.
  • the second physical CPU core group 105 is a group of physical CPU cores 101 other than the physical CPU core 101 included in the first physical CPU core group 104.
  • the physical CPU cores 101 included in the second physical CPU core group 105 are allowed to transition to the root mode.
  • the memory resource 110 includes a plurality of memories 111.
  • a first memory group 112 and a second memory group 113 are configured using a plurality of memories 111.
  • the first memory group 112 is used to allocate a memory area to the virtualization management unit 120.
  • the second memory group 113 is used to allocate a memory area to each of the plurality of VMs 140. Note that the virtualization management unit 120 can access a part or all of the memory areas of the second memory group 113.
  • the interrupt device resource 115 includes one or more interrupt devices 116 that generate an interrupt to the physical CPU core 101.
  • the interrupt device 116 may be, for example, a PCIe device for I / O processing, a timer resource associated with the physical CPU core 101, or the like.
  • the virtualization management unit 120 operates as system software.
  • the virtualization management unit 120 generates one or more VMs 140 using the computer resources of the physical computer 10 and manages the generated VMs 140. Specifically, the virtualization management unit 120 assigns one or more physical CPU cores 101 included in the CPU resource 100 to the virtual CPU core 150 and allocates a partial memory area of the second memory group 113 to the virtual memory 151.
  • the VM 140 is generated by assigning one or more interrupt devices 116 included in the interrupt device resource 115 to the virtual interrupt device 152.
  • the virtualization management unit 120 includes an interrupt handler 137, a timer scheduler 138, and a setting UI 139, and also includes a physical vector number management table 130, a CPU interrupt identifier management table 131, and a VM interrupt device management table. 132, a VM attribute table 133, a physical CPU core group management table 134, high-speed IPI control data 135, and a VMCS (Virtual Machine Control Structure) 136 are held.
  • the interrupt handler 137 is an execution code of processing for an interrupt received by the physical CPU core 101 included in the second physical CPU core group 105.
  • the timer scheduler 138 manages timer interrupts.
  • the setting UI 139 is an interface for performing various settings of the VM 140. In the first embodiment, the user sets the attribute value of the guest OS processing priority mode using the setting UI 139.
  • the physical vector number management table 130 stores information for managing interrupts of the interrupt device 116 included in the interrupt device resource 115. Details of the physical vector number management table 130 will be described later with reference to FIG.
  • the CPU interrupt identifier management table 131 stores information for managing the correspondence between the virtual CPU core 150 included in each VM 140 and the physical CPU core 101 included in the CPU resource 100. Details of the CPU interrupt identifier management table 131 will be described later with reference to FIG.
  • the VM interrupt device management table 132 stores information for managing the correspondence between physical vector numbers and virtual vector numbers managed using a virtual vector number management table 171 described later.
  • the correspondence relationship between a physical vector number and a virtual vector number includes, for example, a correspondence relationship in which one physical vector number is occupied by one virtual vector number, and a correspondence relationship in which one physical vector number is shared by a plurality of virtual vector numbers. Conceivable. Details of the VM interrupt device management table 132 will be described later with reference to FIG.
  • the VM attribute table 133 stores information for managing the control mode of the interrupt process of the guest OS 160 operating on each VM 140. Details of the VM attribute table 133 will be described later with reference to FIG.
  • the physical CPU core group management table 134 stores information for managing a group to which each physical CPU core 101 included in the CPU resource 100 belongs. Details of the physical CPU core group management table 134 will be described later with reference to FIG.
  • the high-speed IPI control data 135 stores information necessary for using the interrupt virtualization support function unit 102 included in each physical CPU core 101 included in the CPU resource 100. Details of the high-speed IPI control data 135 will be described later with reference to FIG.
  • the VMCS 136 stores information for managing the execution state of the virtual CPU core 150 included in the VM 140. Since VMCS 136 is described in Non-Patent Document 1, detailed description thereof is omitted.
  • the VM 140 includes a virtual CPU core 150, a virtual memory 151, and a virtual interrupt device 152.
  • One of the physical CPU cores 101 included in the CPU resource 100 is allocated to the virtual CPU core 150, the memory area of the second memory group 113 is allocated to the virtual memory 151, and the virtual interrupt device 152 Is assigned one of the interrupt devices 116 included in the interrupt device resource 115.
  • the virtualization management unit 120 manages a plurality of VMs 140 divided into a priority group 190 and a non-priority group 191 according to an interrupt processing operation policy (control mode of interrupt processing).
  • the attribute value indicating the guest OS processing priority mode is validated.
  • the VM 140 included in the non-priority group 191 has an invalid attribute value indicating the guest OS processing priority mode.
  • the guest OS processing priority mode indicates a control mode of interrupt processing of the guest OS 160 operating on the VM 140.
  • the VM 140 in which the attribute value indicating the guest OS processing priority mode is validated that is, the VM 140 included in the priority group 190 is also described as the priority mode VM 140.
  • the VM 140 in which the attribute value indicating the guest OS processing priority mode is invalidated that is, the VM 140 included in the non-priority group 191 is also referred to as a non-priority mode VM 140.
  • the virtualization management unit 120 manages the VM 140 in the priority mode so as to avoid a decrease in the processing performance of the guest OS 160 due to the HW interrupt 180. On the other hand, the virtualization management unit 120 manages the VM 140 in the non-priority mode so as to allow a decrease in the processing performance of the guest OS 160 due to the HW interrupt 180.
  • the physical CPU core 101 allocated to the virtual CPU core 150 included in the VM 140 in the priority mode is controlled so that the transition to the root mode does not occur.
  • the physical CPU core 101 allocated to the virtual CPU core 150 included in the VM 140 in the non-priority mode is controlled so as to be able to transition to the root mode as in the prior art, and receives the HW interrupt 180 to the VM 140 in the priority mode.
  • the physical CPU core 101 is also handled.
  • the guest OS 160 is software that operates on the VM 140 and holds a device driver 170 and a virtual vector number management table 171.
  • the device driver 170 is software for controlling the virtual interrupt device 152.
  • the guest OS 160 performs an interrupt setting 184 for the virtualization management unit 120 using the device driver 170.
  • the virtual vector number management table 171 stores information for the guest OS 160 to manage the interruption of the virtual interrupt device 152.
  • the virtual vector number management table 171 is updated in response to the interrupt setting 184. Details of the virtual vector number management table 171 will be described later with reference to FIG.
  • an interrupt scheduling setting 185 for setting an HW interrupt from the virtual interrupt device 152 of the VM 140 to the virtual CPU core 150 is generated in the virtualization management unit 120.
  • the virtualization management unit 120 determines in advance the interrupt destination of the interrupt device 116 assigned to the virtual interrupt device 152.
  • the physical CPU core 101 is set to the physical CPU core 101 included in the second physical CPU core group 105.
  • the physical CPU core 101 included in the second physical CPU core group 105 receives the HW interrupt 180 from the interrupt device 116 assigned to the VM 140 in the priority mode.
  • the physical CPU core 101 that has received the HW interrupt 180 makes a transition from the non-root mode to the root mode, and issues a physical IPI 181 to the physical CPU core 101 assigned to the virtual CPU core 150 of the VM 140 in the priority mode.
  • the received physical CPU core 101 executes the reference processing 182 of the high-speed IPI control data 135 and issues a virtual interrupt 183 directly to the virtual CPU core 150 without going through the virtualization management unit 120 based on the processing result. .
  • the physical CPU core 101 allocated to the virtual CPU core 150 of the priority mode VM 140 by the above-described processing can issue the virtual interrupt 183 to the priority mode VM 140 without performing the transition to the root mode. Can continue. Therefore, it is possible to suppress a decrease in processing performance of the guest OS 160 on the VM 140 in the priority mode.
  • the second physical CPU core group 105 receives the HW interrupt 180 from the interrupt device 116 and issues a virtual interrupt 186 accompanied by arbitration by the virtualization management unit 120 to the virtual CPU core 150.
  • the virtualization management unit 120 receives the virtual interrupt 186 for both the HW interrupt 180 for the VM 140 in the priority mode and the VM 140 in the non-priority mode, executes the arbitration process, and then performs a virtual interrupt to the VM 140. Can provide a secure virtualization environment.
  • FIG. 2 is an explanatory diagram illustrating an example of a physical vector number management table 130 held by the virtualization management unit 120 according to the first embodiment.
  • the physical vector number management table 130 includes one record for one physical vector number, and each record includes a physical vector number 210 and an interrupt device type 220.
  • the physical vector number 210 is a vector number (physical vector number) that can be managed by the physical computer 10.
  • the physical vector number is information included in the HW interrupt 180.
  • the interrupt device type 220 is a type of the interrupt device 116 registered for the physical vector number 210. When the interrupt device type 220 is blank, it indicates that no interrupt device 116 is registered for the vector number.
  • FIG. 3 is an explanatory diagram illustrating an example of the virtual vector number management table 171 held by the VM 140 according to the first embodiment.
  • the virtual vector number management table 171 includes one record for one virtual vector number, and each record includes a virtual vector number 310 and an interrupt device type 320.
  • the virtual vector number 310 is a vector number (virtual vector number) that can be managed by the VM 140.
  • the virtual vector number is information included in the virtual interrupts 183 and 186.
  • the interrupt device type 320 is a type of the virtual interrupt device 152 registered for the virtual vector number 310.
  • FIG. 4 is an explanatory diagram illustrating an example of the CPU interrupt identifier management table 131 held by the virtualization management unit 120 according to the first embodiment.
  • the CPU interrupt identifier management table 131 is a part of CPU scheduling information specialized for interrupt processing managed by the virtualization management unit 120.
  • the CPU interrupt identifier management table 131 includes one record for one VM 140. Each record includes a VM number 410, a virtual CPU core LAPIC ID 420, and a physical CPU core LAPIC ID 430.
  • the VM number 410 is an identification number for uniquely identifying the VM 140.
  • the virtual CPU core LAPIC ID 420 is an identification number of a LAPIC (Local Advanced Programmable Interrupt Controller) of the virtual CPU core 150 of the VM 140.
  • the physical CPU core LAPIC ID 430 is an identification number of the LAPIC of the physical CPU core 101 assigned to the virtual CPU core 150.
  • FIG. 5 is an explanatory diagram illustrating an example of the VM interrupt device management table 132 held by the virtualization management unit 120 according to the first embodiment.
  • the VM interrupt device management table 132 is a part of mapping information of physical vector numbers and virtual vector numbers assigned to the interrupt devices 116 and virtual interrupt devices 152 having the same interrupt device type.
  • the VM interrupt device management table 132 includes one record for one physical vector number. Each record has a physical vector number 510, a VM number 520, a virtual vector number 530, a virtual CPU core LAPIC ID 540, and an interrupt reception physical. Includes CPU core LAPIC ID550.
  • the physical vector number 510 is the same as the physical vector number 210.
  • the VM number 520 is an identification number of the VM 140 to which the physical vector number 210 is assigned, and is the same as the VM number 410.
  • the virtual vector number 530 is a virtual vector number mapped to the physical vector number, and is the same as the virtual vector number 310.
  • the virtual CPU core LAPIC ID 540 is the LAPIC identification number of the virtual CPU core 150 that is the notification destination of the HW interrupt corresponding to the virtual vector number.
  • the interrupt reception physical CPU core LAPIC ID 550 is an identification number of the LAPIC of the physical CPU core 101 that receives the HW interrupt to the virtual CPU core 150.
  • FIG. 6 is an explanatory diagram illustrating an example of the VM attribute table 133 held by the virtualization management unit 120 according to the first embodiment.
  • the VM attribute table 133 is information for managing a group of VMs 140 corresponding to the interrupt processing control mode.
  • the VM attribute table 133 includes one record for one VM 140, and each record includes a VM number 610 and a guest OS processing priority mode 620.
  • the VM number 610 is the same as the VM number 410.
  • the guest OS processing priority mode 620 is an attribute value of the interrupt processing control mode in the guest OS 160 on each VM 140, that is, the guest OS processing priority mode.
  • the guest OS processing priority mode 620 stores either “invalid” or “valid”. When the guest OS processing priority mode 620 is “invalid”, this indicates that the guest OS processing priority mode is invalid, that is, the VM 140 included in the non-priority group 191. On the other hand, when the guest OS processing priority mode 620 is “valid”, this indicates that the guest OS processing priority mode is valid, that is, the VM 140 included in the priority group 190.
  • FIG. 7 is an explanatory diagram illustrating an example of the physical CPU core group management table 134 held by the virtualization management unit 120 according to the first embodiment.
  • the physical CPU core group management table 134 is information for managing a group of physical CPU cores 101.
  • the physical CPU core group management table 134 includes one record for the LAPIC identification number of one physical CPU core 101, and each record includes a physical CPU core LAPIC ID 710 and a physical CPU core group 720.
  • the physical CPU core LAPIC ID 710 is the same as the physical CPU core LAPIC ID 330.
  • the physical CPU core group 720 is information for identifying a group to which the physical CPU core 101 belongs. In the first embodiment, the physical CPU core group 720 stores “1” indicating the first physical CPU core group 104 and “2” indicating the second physical CPU core group 105. Note that “2” is set in the physical CPU core group 720 in the initial state.
  • FIG. 8 is an explanatory diagram illustrating an example of the high-speed IPI control data 135 held by the virtualization management unit 120 according to the first embodiment.
  • the high-speed IPI control data 135 includes an information reading area 800 and an information writing area 810.
  • the information reading area 800 includes a table composed of a VM number 821, a physical CPU core LAPIC ID 822, a notification vector (Notification Vector) number 823, and a virtual vector number 824, a physical CPU core LAPIC ID 831 and a PID (Posted Interrupt Descriptor) address 832.
  • a table composed of a VM number 821, a physical CPU core LAPIC ID 822, a notification vector (Notification Vector) number 823, and a virtual vector number 824, a physical CPU core LAPIC ID 831 and a PID (Posted Interrupt Descriptor) address 832.
  • the physical IPI 181 includes a notification vector number.
  • the information writing area 810 includes a plurality of PID data 840.
  • the PID data 840 includes an ON (Outstanding Notification) bit 841 and a PIR (Posted Interrupt Requests) bitmap 842.
  • FIG. 9 is a flowchart illustrating an example of setting processing of the VM attribute table 133 executed by the virtualization management unit 120 according to the first embodiment.
  • the virtualization management unit 120 When the virtualization management unit 120 receives the setting information of the control mode of the interrupt processing of the VM 140 from the user via the setting UI 139, the virtualization management unit 120 starts processing described below.
  • the virtualization management unit 120 acquires the identification number of the VM 140 and the attribute value of the guest OS processing priority mode (control mode of the interrupt processing of the VM 140) included in the setting information input via the setting UI 139 (Step S901). .
  • the virtualization management unit 120 generates the VM attribute table 133 based on the information acquired in step S901 (step S902). For example, the virtualization management unit 120 generates records as many as the number of VMs 140 generated on the physical computer 10, sets the identification number of the VM 140 to the VM number 610 of each generated record, and the guest of each record An attribute value is set in the OS processing priority mode 620.
  • the virtualization management unit 120 updates the record of the VM attribute table 133 based on the acquired information.
  • FIG. 10 is a flowchart illustrating an example of an update process of the physical CPU core group management table 134 executed by the virtualization management unit 120 according to the first embodiment.
  • the virtualization management unit 120 starts processing described below at the start of the VM 140 activation processing or termination processing.
  • the virtualization management unit 120 manages the configuration of the virtual CPU core 150 of each VM 140 and the correspondence relationship between the physical CPU cores 101 allocated to each virtual CPU core 150 at the time of starting the processing described below. Is held.
  • the virtualization manager 120 searches the VM 140 in the priority mode with reference to the VM attribute table 133 (step S1001), and determines whether the VM 140 in the priority mode exists (step S1002).
  • the virtualization management unit 120 searches for a record in which the value of the guest OS processing priority mode 620 is “valid”. When one or more records having a value of “valid” in the guest OS processing priority mode 620 are searched, the virtualization management unit 120 determines that the VM 140 in the priority mode exists.
  • the virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and identifies the physical CPU core 101 used by the VM 140 for each VM 140 in the priority mode (step S1003). Specifically, the following processing is executed.
  • the virtualization management unit 120 selects one VM 140 record to be processed when a plurality of priority mode VM 140 records are searched in step S1001. For example, the virtualization management unit 120 selects the records of the VM 140 in ascending order of the VM number 610.
  • the virtualization management unit 120 searches for a record that matches the VM number 610 of the record for which the VM number 410 is selected.
  • the virtualization management unit 120 identifies the physical CPU core 101 used by the VM 140 corresponding to the selected record, based on the physical CPU core LAPIC ID 430 of the retrieved record.
  • the virtualization management unit 120 repeatedly executes the process described above for all the VM 140 records searched in step S1001. The above is the description of the process in step S1003.
  • the virtualization management unit 120 updates the physical CPU core group management table 134 (step S1004) and ends the process.
  • the processing in step S1004 differs depending on the processing trigger.
  • the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 710 matches the physical CPU core LAPIC ID 430 of the record searched in step S1003.
  • the virtualization management unit 120 updates the value of the physical CPU core group 720 of the retrieved record to “1”.
  • the virtualization management unit 120 searches for a record from the physical CPU core group management table 134 by the same processing. Furthermore, the virtualization management unit 120 updates the value of the physical CPU core group 720 of the retrieved record to “2”.
  • FIG. 11 is a flowchart illustrating an example of an interrupt setting process of the guest OS 160 executed by the virtualization management unit 120 according to the first embodiment.
  • the virtualization management unit 120 When the virtualization management unit 120 detects the interrupt scheduling setting 185 from the guest OS 160 or the interrupt setting 184 of the device driver 170, the virtualization management unit 120 starts processing described below.
  • the virtualization management unit 120 When the virtualization management unit 120 detects the interrupt setting 184 from the device driver 170 or the interrupt scheduling setting 185 from the guest OS 160, the virtualization management unit 120 traps the interrupt setting 184 or the interrupt scheduling setting 185 (step S1101). At this time, the virtualization management unit 120 determines the identification number of the target VM 140, the target virtual vector number, the interrupt device type, and the virtual CPU core of the interrupt destination from the trapped interrupt setting 184 or interrupt scheduling setting 185. The identification number of 150 LAPIC is acquired.
  • the virtualization management unit 120 refers to the VM attribute table 133 and determines whether or not the target VM 140 is the VM 140 in the priority mode (step S1102).
  • the virtualization management unit 120 searches for a record in which the VM number 610 matches the identification number of the target VM 140 acquired in step S1101, and the guest OS processing priority mode 620 of the searched record is “valid. Is determined. When the guest OS processing priority mode 620 of the retrieved record is “valid”, the virtualization management unit 120 determines that the target VM 140 is the VM 140 in the priority mode.
  • the virtualization management unit 120 ends the process.
  • the virtualization management unit 120 refers to the physical vector number management table 130 and acquires a physical vector number (step S1103).
  • the virtualization management unit 120 searches for a record in which the interrupt device type 220 matches the interrupt device type acquired in step S1101, and obtains a physical vector number from the physical vector number 210 of the searched record. get.
  • the virtualization management unit 120 specifies the combination of the identification number of the target VM 140, the virtual vector number, the LAPIC identification number of the interrupted virtual CPU core 150, and the physical vector number as a VM interrupt device description record (step S1104).
  • the virtualization manager 120 determines whether the interrupt mask setting of the trapped interrupt setting 184 or the interrupt scheduling setting 185 is “Yes” (step S1105). For example, the virtualization management unit 120 makes a determination based on preset interrupt mask setting information.
  • the virtualization management unit 120 adds a record to the VM interrupt device management table 132 based on the VM interrupt device description record specified in step S1104 (step S1104). S1106).
  • the virtualization management unit 120 adds one record to the VM interrupt device management table 132, and adds the physical vector number 510, VM number 520, virtual vector number 530, and virtual CPU core of the added record.
  • the value included in the VM interrupt device description record is set for each LAPIC ID 540.
  • the interrupt reception physical CPU core LAPIC ID 550 of the record added to the VM interrupt device management table 132 is blank.
  • the virtualization manager 120 adds information to the high-speed IPI control data 135 and updates the VMCS 136 of the target VM 140 (step S1107). Specifically, the following processing is executed.
  • the virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and searches for a record in which the VM number 410 matches the identification number of the VM 140 in the VM interrupt device description record.
  • the CPU core LAPIC ID 420 is searched for a line that matches the LAPIC identification number of the virtual CPU core 150 in the VM interrupt device description record.
  • the virtualization management unit 120 acquires the value of the physical CPU core LAPIC ID 430 of the searched row.
  • the virtualization manager 120 adds a record to the upper table included in the information reading area 800 of the high-speed IPI control data 135. Further, the virtualization management unit 120 sets the value included in the VM interrupt device description record in the VM number 821 and the virtual vector number 824 of the added record, and the physical CPU core LAPIC ID 822 has a physical CPU. Set the value obtained from the core LAPIC ID430. In addition, the virtualization management unit 120 sets an arbitrary unique value indicating that transfer is necessary for the notification vector number 823.
  • the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the value acquired from the physical CPU core LAPIC ID 430 and acquires the address from the PID address 832 of the target physical CPU core 101.
  • the virtualization manager 120 sets the acquired address and the value of the notification vector number 823 of the record added to the high-speed IPI control data 135 in the VMCS 136. The above is the description of the process in step S1107.
  • the virtualization management unit 120 registers the interrupt handler 137 for any physical CPU core 101 included in the second physical CPU core group 105, and updates the VM interrupt device management table 132 (step S1108). ). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
  • the virtualization management unit 120 refers to the physical CPU core group management table 134 and selects one record whose physical CPU core group 720 is “2”. That is, the physical CPU core 101 that receives an interrupt from the interrupt device 116 assigned to the VM 140 in the priority mode is selected from the physical CPU cores 101 included in the second physical CPU core group 105.
  • the virtualization management unit 120 preferentially selects a physical CPU core LAPIC ID 710 having a small value. Also, the virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and selects a physical CPU core 101 that is not assigned to the VM 140.
  • the selection method described above is an example, and the present invention is not limited to this.
  • the virtualization manager 120 registers the interrupt handler 137 in the interrupt handler register 103 of the physical CPU core 101 corresponding to the physical CPU core LAPIC ID 710 of the selected record.
  • the interrupt handler 137 is an execution code that implements a series of processes described in FIG. Further, the virtualization management unit 120 sets the value of the physical CPU core LAPIC ID 710 of the selected record in the interrupt reception physical CPU core LAPIC ID 550 of the record added to the VM interrupt device management table 132 in step S1106. .
  • the virtualization management unit 120 selects one physical CPU core 101 that receives the HW interrupt 180, but two or more physical CPU cores 101 may be selected.
  • the LAPIC identification numbers of the plurality of physical CPU cores 101 are set in the interrupt reception physical CPU core LAPIC ID 550. The above is the description of the processing in step S1108.
  • step S1105 the virtualization management unit 120 deletes the record from the VM interrupt device management table 132 based on the VM interrupt device description record specified in step S1104. (Step S1109).
  • the virtualization management unit 120 displays a record in which each value of the physical vector number 510, the VM number 520, the virtual vector number 530, and the virtual CPU core LAPIC ID 540 matches the value of the VM interrupt device description record. Search and delete searched records. At this time, the virtualization management unit 120 temporarily holds the value of the interrupt reception physical CPU core LAPIC ID 550 of the retrieved record.
  • the virtualization management unit 120 deletes information from the high-speed IPI control data 135, and updates the VMCS 136 of the target VM 140 (step S1110).
  • the virtualization management unit 120 records or records that the VM number 821 and the virtual vector number 824 of the information read area 800 match the identification number and virtual vector number of the VM 140 included in the VM interrupt device description record. Is deleted. In addition, the virtualization management unit 120 deletes the value of the PID address 832 from the VMCS 136.
  • the virtualization management unit 120 deletes the interrupt handler 137 for receiving the HW interrupt 180 for the VM 140 in the priority mode (step S1111). Thereafter, the virtualization management unit 120 ends the process.
  • the virtualization management unit 120 selects the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode based on the value of the interrupt reception physical CPU core LAPIC ID 550 of the record deleted in step S1109. Identify.
  • the virtualization manager 120 deletes the interrupt handler 137 from the interrupt handler register 103 of the specified physical CPU core 101.
  • the virtual CPU core LAPIC ID 420 in the CPU interrupt identifier management table 131 is also updated, but is omitted because it is a general process. Further, the processing order from step S1106 to step S1108 may be changed so that consistency is maintained, and the processing content may be changed. For example, in step S1106, the virtualization management unit 120 may add a record to the VM interrupt device management table 132 after selecting the physical CPU core 101 that accepts the HW interrupt 180.
  • FIG. 12 is a flowchart for describing processing executed by the virtualization management unit 120 according to the first embodiment during virtual CPU core scheduling.
  • the virtual CPU core scheduling indicates a process of changing the physical CPU core 101 assigned to the virtual CPU core 150 of each VM 140.
  • the process described below is executed after virtual CPU core scheduling.
  • the identification number of the VM 140 to be scheduled, the identification number of the LAPIC of the virtual CPU core 150 to be scheduled, and the physical CPU core 101 assigned to the virtual CPU core 150 to be scheduled before virtual CPU core scheduling The processing result obtained by combining the identification number of the LAPIC and the identification number of the LAPIC of the physical CPU core 101 assigned to the virtual CPU core 150 to be scheduled after virtual CPU core scheduling is input.
  • the physical CPU core 101 assigned to the virtual CPU core 150 before the virtual CPU core scheduling is also referred to as a released physical CPU core 101, and is assigned to the virtual CPU core 150 after the virtual CPU core scheduling.
  • the physical CPU core 101 is also referred to as an assigned physical CPU core 101.
  • the virtualization management unit 120 selects one target processing result, and executes the processing from step S1201 to step S1207 on the selected processing result. Further, when the processing from step S1201 to step S1207 is completed for the selected processing result, the virtualization management unit 120 selects another processing result and executes the same processing.
  • the virtualization management unit 120 refers to the VM attribute table 133 (step S1201), and determines whether the scheduling target VM 140 is the VM 140 in the priority mode (step S1202).
  • the virtualization management unit 120 searches for a record in which the VM number 610 matches the identification number of the VM 140 to be scheduled, and whether or not the guest OS processing priority mode 620 of the searched record is “valid”. Determine whether. When the guest OS processing priority mode 620 is “valid”, it is determined that the scheduling target VM 140 is the VM 140 in the priority mode.
  • the virtualization management unit 120 identifies the release physical CPU core 101 (step S1203).
  • the virtualization manager 120 changes the group of CPU cores to which the identified release physical CPU core 101 belongs from the first physical CPU core group 104 to the second physical CPU core group 105 (step S1204).
  • the virtualization management unit 120 specifies the LAPIC identification number of the release physical CPU core 101 based on the processing result.
  • the virtualization management unit 120 refers to the physical CPU core group management table 134 and searches for a record that matches the value of the LAPIC ID of the release physical CPU core 101 in which the physical CPU core LAPIC ID 710 is specified.
  • the virtualization manager 120 sets “2” to the physical CPU core group 720 of the retrieved record.
  • the virtualization management unit 120 sets the LAPIC identification number of the allocated physical CPU core 101 in the high-speed IPI control data 135 and updates the VMCS 136 (step S1205). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
  • the virtualization management unit 120 searches for a record in which the VM number 821 matches the identification number of the VM 140 to be scheduled. Further, the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 822 of the retrieved record matches the LAPIC identification number of the release physical CPU core 101. The virtualization manager 120 overwrites the physical CPU core LAPIC ID 822 of the retrieved row with the LAPIC identification number of the assigned physical CPU core 101.
  • the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the LAPIC of the assigned physical CPU core 101, and sets the PID address 832 of the searched record in the VMCS 136.
  • the above is the description of the processing in step S1205.
  • step S1202 If it is determined in step S1202 that the target VM 140 is not the VM 140 in the priority mode, the virtualization management unit 120 determines whether there is a record of the released physical CPU core 101 in the VM interrupt device management table 132. (Step S1206).
  • the virtualization management unit 120 refers to the VM interrupt device management table 132 and searches for a record in which the interrupt reception physical CPU core LAPIC ID 550 matches the identification number of the LAPIC of the release physical CPU core 101.
  • the virtualization management unit 120 ends the process.
  • the virtualization management unit 120 sets the interrupt handler 137 for the released physical CPU core 101 and the assigned physical CPU core 101. Also, the VM interrupt device management table 132 is updated (step S1207). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
  • the virtualization manager 120 deletes the interrupt handler 137 from the interrupt handler register 103 of the release physical CPU core 101. Also, the virtualization management unit 120 registers the deleted interrupt handler 137 in the interrupt handler register 103 of the assigned physical CPU core 101.
  • the virtualization management unit 120 deletes the LAPIC identification number of the release physical CPU core 101 from the interrupt reception physical CPU core LAPIC ID 550 of the record whose VM number 520 matches the identification number of the target VM 140, and allocates the physical CPU core 101
  • the identification number of LAPIC is set.
  • the virtualization management unit 120 also updates the physical CPU core LAPIC ID 430 of the CPU interrupt identifier management table 131 based on the processing result of the virtual CPU core scheduling. Note that the update of the CPU interrupt identifier management table 131 is a known technique, and thus the description thereof is omitted.
  • FIG. 13 is a flowchart illustrating the interrupt arbitration process executed by the virtualization management unit 120 according to the first embodiment.
  • the physical CPU core 101 belonging to the second physical CPU core group 105 receives the HW interrupt 180 from each interrupt device 116. At this time, the physical CPU core 101 transitions from the non-root mode to the root mode, and the virtualization management unit 120 executed by the physical CPU core 101 starts the following processing.
  • the virtualization manager 120 analyzes the received HW interrupt 180 and determines whether or not the HW interrupt 180 needs to be transferred based on the analysis result (step S1301). That is, it is determined whether it is necessary to transfer the HW interrupt 180 to another physical CPU core 101.
  • the virtualization management unit 120 refers to the VM interrupt device management table 132 and receives the MSI-X interrupt received by the physical vector number 510. It is determined whether there is a record that matches the physical vector number included in the file. If there is a record that satisfies the above-described condition in the VM interrupt device management table 132, the virtualization management unit 120 determines that the received HW interrupt 180 needs to be transferred.
  • the virtualization management unit 120 When the received HW interrupt 180 is a timer interrupt of the physical CPU core 101, the virtualization management unit 120 records in the VM interrupt device management table 132 a record that matches the physical vector number included in the timer interrupt. It is determined whether or not exists. If there is a record that satisfies the above-described condition, the virtualization management unit 120 further determines whether or not the VM 140 that the timer scheduler 138 determines to issue an interrupt next is the VM 140 in the priority mode. When the VM 140 is the VM 140 in the priority mode, the virtualization management unit 120 determines that the received HW interrupt 180 needs to be transferred.
  • the virtualization management unit 120 When it is determined that it is necessary to transfer the received HW interrupt 180, the virtualization management unit 120 refers to the VM interrupt device management table 132 and obtains information on the VM 140 that is the transfer destination of the received HW interrupt 180. Obtain (step S1302).
  • the virtualization management unit 120 searches for a record in which the physical vector number 510 matches the physical vector number included in the received HW interrupt 180, and the VM number 520 and virtual vector number 530 of the searched record. And the value of the virtual CPU core LAPIC ID 540 is acquired.
  • the virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and identifies the physical CPU core 101 to which the received HW interrupt 180 is transferred (step S1303).
  • the virtualization management unit 120 determines that the VM number 410 matches the value acquired from the VM number 520, and the virtual CPU core LAPIC ID 420 matches the value acquired from the virtual CPU core LAPIC ID 540. Search for. The virtualization management unit 120 acquires the value of the physical CPU core LAPIC ID 430 of the searched row.
  • the virtualization manager 120 updates the PID data 840 of the high-speed IPI control data 135 in order to set the virtual vector number in the physical IPI 181 (step S1304). Specifically, the following processing is executed.
  • the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the value of the physical CPU core LAPIC ID 430.
  • the virtualization management unit 120 reads the PID data 840 based on the value of the PID address 832 of the retrieved record.
  • the virtualization management unit 120 validates the bit corresponding to the value acquired from the virtual vector number 530 in step S1302 among the bits included in the PIR bitmap 842 of the PID data 840. For example, when the value of the virtual vector number 530 is “x”, the virtualization management unit 120 updates the value of the “x” -th bit in the PIR bitmap 842 to “1”.
  • the virtualization management unit 120 determines whether or not the ON bit 841 is enabled. When the ON bit 841 is not enabled, the virtualization management unit 120 enables the ON bit 841. For example, the virtualization management unit 120 determines whether the ON bit 841 is “1”, and updates the value of the bit to “1” when the ON bit 841 is “0”. The above is the description of the processing in step S1304.
  • the virtualization management unit 120 issues a physical IPI 181 to the physical CPU core 101 assigned to the virtual CPU core 150 of the VM 140 in the priority mode (step S1305). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
  • the virtualization management unit 120 refers to the information reading area 800, the VM number 821, the virtual vector number 824, and the physical CPU core LAPIC ID 822 are the virtual vector number 530, the virtual CPU core LAPIC ID 540, and the physical CPU core LAPIC ID 430. Search for records that match the value.
  • the virtualization management unit 120 acquires the value of the notification vector number 823 of the retrieved record.
  • the virtualization management unit 120 issues a physical IPI 181 to which the value of the notification vector number 823 is added to the physical CPU core specified in step S1303.
  • the above is the description of the processing in step S1305.
  • the physical CPU core 101 that has received the physical IPI 181 executes the following processing.
  • the physical CPU core 101 that has received the physical IPI 181 refers to the high-speed IPI control data 135 and searches for a record in which the physical CPU core LAPIC ID 831 matches the identification number of the LAPIC of the physical CPU core 101.
  • the physical CPU core 101 accesses the PID data 840 based on the value of the PID address 832 of the retrieved record, and reads the value of the PIR bitmap 842 from the PID data 840.
  • the physical CPU core 101 specifies a virtual vector number from the value of each bit of the read PIR bitmap 842. For example, when the value of the xth bit is “1”, the virtual vector number is “x”.
  • the physical CPU core 101 that has received the physical IPI 181 refers to the CPU interrupt identifier management table 131 and searches for a row in which the physical CPU core LAPIC ID 430 matches the identification number of the LAPIC of the physical CPU core 101.
  • the physical CPU core 101 that has received the physical IPI 181 issues a virtual interrupt 183 including the identified virtual vector number to the virtual CPU core 150 corresponding to the virtual CPU core LAPIC ID 420 in the retrieved row.
  • the above is the description of the processing of the physical CPU core 101 that has received the physical IPI 181.
  • step S1301 If it is determined in step S1301 that it is not necessary to transfer the received HW interrupt 180, the virtualization manager 120 executed by the physical CPU core 101 that has received the HW interrupt 180, A virtual interrupt 186 is issued to the virtual CPU core 150 of the VM 140 of the priority group (step S1306). Thereafter, the virtualization management unit 120 ends the process.
  • FIG. 14 is a flowchart illustrating an example of a startup process executed by the virtualization management unit 120 according to the first embodiment.
  • a description of processing of the general virtualization management unit 120 such as securing and initializing a storage area for storing the physical vector number management table 130 is omitted.
  • the virtualization management unit 120 acquires a memory area for storing the VM interrupt device management table 132, the VM attribute table 133, the physical CPU core group management table 134, and the high-speed IPI control data 135 from the first memory group 112. (Step S1401).
  • the virtualization management unit 120 initializes the VM interrupt device management table 132, the VM attribute table 133, the physical CPU core group management table 134, and the high-speed IPI control data 135 in the acquired memory area (step S1402). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
  • the virtualization management unit 120 generates an empty VM interrupt device management table 132.
  • the virtualization manager 120 generates records for the identification number of the maximum number of VMs 140 that can be defined by the virtualization manager 120 in the VM attribute table 133. Further, the virtualization management unit 120 sets the VM 140 identification number in ascending order to the VM number 610 of each record, and sets “invalid” to the guest OS processing priority mode 620 of each record.
  • the virtualization management unit 120 generates records for the number of physical CPU cores 101 included in the CPU resource 100 in the physical CPU core group management table 134.
  • the virtualization management unit 120 sets the LAPIC identification number of each physical CPU core 101 in the physical CPU core LAPIC ID 710 of each record, and sets “2” in the physical CPU core group 720 of each record.
  • the virtualization management unit 120 sets, for the high-speed IPI control data 135, each head address of the PID data 840 corresponding to the LAPIC identification numbers of all the physical CPU cores 101 included in the CPU resource 100 as the PID address 832. .
  • the physical CPU core 101 included in the second physical CPU core group receives the HW interrupt 180 from the interrupt device resource 115 for the VM 140 in the priority mode. Can be controlled.
  • the physical CPU core 101 that has received the HW interrupt 180 issues a physical IPI 181 to the virtual CPU core 150 assigned to the VM 140 in the priority mode, and the physical CPU core 101 that has received the physical IPI 181
  • the virtual interrupt 183 can be issued directly to the virtual CPU core 150 without going through 120.
  • the virtualization management unit 120 is always involved in both the HW interrupt 180 of the VM 140 in the priority mode and the VM 140 in the non-priority mode. Since the HW interrupt 180 is not directly transmitted to the VM 140 without involving the virtualization management unit 120, a secure virtualization environment can be provided.
  • the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode that is, the physical CPU core 101 that always operates in the root mode is set in advance for the physical computer 10.
  • the second embodiment will be described focusing on differences from the first embodiment.
  • the physical CPU core group 720 of the physical CPU core group management table 134 of the second embodiment “1”, “2”, or “occupied” is stored. “Occupied” is the physical CPU core 101 that always operates in the root mode, and is used as the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode. The physical CPU core 101 in which the physical CPU core group 720 is “occupied” is not handled as the physical CPU core 101 assigned to the VM 140.
  • the physical CPU core 101 in which the physical CPU core group 720 is “occupied” is also referred to as an interrupt-dedicated physical CPU core 101.
  • definition information related to the physical CPU core 101 dedicated to interrupts is set in the physical computer 10 in advance.
  • the definition information includes, for example, the LAPIC identification number of the physical CPU core 101 set as the interrupt-only physical CPU core 101.
  • the definition information is stored in a ROM or storage medium (not shown) of the physical computer 10.
  • the virtualization management unit 120 sets a predetermined physical CPU core 101 as an interrupt-dedicated physical CPU core 101 based on the definition information at startup.
  • FIG. 15 is a flowchart illustrating an example of an interrupt setting process of the guest OS 160 executed by the virtualization management unit 120 according to the second embodiment.
  • the virtualization management unit 120 When the virtualization management unit 120 detects the interrupt scheduling setting 185 from the guest OS 160 or the interrupt setting 184 of the device driver 170, the virtualization management unit 120 starts processing described below.
  • step S1501 to step S1506 Since the processing from step S1501 to step S1506 is the same as the processing from step S1101 to step S1106, description thereof will be omitted. Further, the processing from step S1509 to step S1511 is the same as the processing from step S1109 to step S1111, and thus the description thereof is omitted.
  • step S1507 the virtualization management unit 120 adds information to the high-speed IPI control data 135 and updates the VMCS 136 of the target VM 140 (step S1507). Specifically, the following processing is executed.
  • the virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and searches for a record in which the VM number 410 matches the identification number of the VM 140 in the VM interrupt device description record.
  • the CPU core LAPIC ID 420 is searched for a line that matches the LAPIC identification number of the virtual CPU core 150 in the VM interrupt device description record.
  • the virtualization management unit 120 acquires the value of the physical CPU core LAPIC ID 430 of the searched row.
  • the virtualization manager 120 adds a record to the upper table included in the information reading area 800 of the high-speed IPI control data 135. Further, the virtualization management unit 120 sets values included in the VM interrupt device description record in the VM number 821, the notification vector number 823, and the virtual vector number 824 of the added record, and the physical CPU core LAPIC. The value acquired from the physical CPU core LAPIC ID 430 is set in ID 822.
  • the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the value acquired from the physical CPU core LAPIC ID 430 and acquires the address from the PID address 832 of the target physical CPU core 101.
  • the virtualization management unit 120 sets the acquired address in the VMCS 136. The above is the description of the processing in step S1507.
  • step S1508 the virtualization management unit 120 registers the interrupt handler 137 for the physical CPU core 101 dedicated to interrupts, and updates the VM interrupt device management table 132 (step S1508). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
  • the virtualization management unit 120 refers to the physical CPU core group management table 134 and selects one record in which the physical CPU core group 720 is “occupied”. In the second embodiment, the interrupt-only physical CPU core 101 is selected as the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode.
  • the virtualization management unit 120 preferentially selects a physical CPU core LAPIC ID 710 having a small value.
  • the selection method described above is an example, and the present invention is not limited to this.
  • the virtualization manager 120 registers the interrupt handler 137 in the interrupt handler register 103 of the physical CPU core 101 corresponding to the physical CPU core LAPIC ID 710 of the selected record. Further, the virtualization management unit 120 sets the value of the physical CPU core LAPIC ID 710 of the selected record in the interrupt reception physical CPU core LAPIC ID 550 of the record added to the VM interrupt device management table 132 in step S1506. .
  • the above is the description of the processing in step S1508.
  • the processing executed by the virtualization management unit 120 of the second embodiment at the time of virtual CPU core scheduling is the same as that of the first embodiment, and thus the description thereof is omitted.
  • the interrupt arbitration process executed by the virtualization management unit 120 according to the second embodiment is the same as that according to the first embodiment, and a description thereof will be omitted.
  • the second embodiment is different from the first embodiment in that the physical CPU core 101 that receives the HW interrupt 180 is a physical CPU core 101 dedicated to interrupts.
  • FIG. 16 is a flowchart illustrating an example of a startup process executed by the virtualization management unit 120 according to the second embodiment.
  • a description of processing of the general virtualization management unit 120 such as securing and initializing a storage area for storing the physical vector number management table 130 is omitted.
  • step S1601 and step S1602 Since the processing of step S1601 and step S1602 is the same processing as the processing of step S1401 and step S1402, description thereof will be omitted.
  • the virtualization management unit 120 sets a specific physical CPU core 101 as the “occupied” physical CPU core 101 among the physical CPU cores 101 included in the CPU resource 100 (step S1603). Thereafter, the virtualization management unit 120 ends the process.
  • the virtualization manager 120 selects the physical CPU core 101 to be set as the “occupied” physical CPU core 101 from the physical CPU cores 101 included in the CPU resource 100. For example, a method of selecting the physical CPU core 101 based on definition information preset in the physical computer 10 can be considered. Further, the virtualization management unit 120 may receive an input from the administrator using the setting UI 139 and may select the physical CPU core 101 based on the input.
  • the virtualization management unit 120 refers to the physical CPU core group management table 134 and searches for a record that matches the identification number of the LAPIC of the physical CPU core 101 for which the physical CPU core LAPIC ID 710 is selected.
  • the virtualization manager 120 sets “occupied” to the physical CPU core group 720 of the retrieved record. The above is the description of the processing in step S1603.
  • the HW interrupt 180 from the interrupt device resource 115 for the VM 140 in the priority mode can be controlled to be received by the physical CPU core 101 dedicated to the interrupt. Therefore, the same effects as those of the first embodiment can be obtained.
  • the physical CPU core 101 dedicated to the interrupt since the physical CPU core 101 dedicated to the interrupt, not the physical CPU core 101 allocated to the VM 140 in the non-priority mode, receives the HW interrupt 180, the processing of the VM 140 in the non-priority mode is performed. It is also possible to prevent the delay.
  • control is performed in units of physical CPU cores 101. However, control may be performed in units of physical CPUs.
  • this invention is not limited to the above-mentioned Example, Various modifications are included. Further, for example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those provided with all the described configurations. Further, a part of the configuration of each embodiment can be added to, deleted from, or replaced with another configuration.
  • each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
  • the present invention can also be realized by software program codes that implement the functions of the embodiments.
  • a storage medium in which the program code is recorded is provided to the computer, and a CPU included in the computer reads the program code stored in the storage medium.
  • the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing it constitute the present invention.
  • Examples of storage media for supplying such program codes include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, A non-volatile memory card, ROM, or the like is used.
  • program code for realizing the functions described in this embodiment can be implemented by a wide range of programs or script languages such as assembler, C / C ++, Perl, Shell, PHP, Java, and the like.
  • the program code is stored in a storage means such as a hard disk or memory of a computer or a storage medium such as a CD-RW or CD-R.
  • the CPU included in the computer may read and execute the program code stored in the storage unit or the storage medium.
  • control lines and information lines indicate those that are considered necessary for the explanation, and do not necessarily indicate all the control lines and information lines on the product. All the components may be connected to each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

In a computer in which a plurality of virtual machines (VMs) is operated, the plurality of VMs is managed in such a manner that the VMs are separated into a priority group constituted of VMs in a priority mode and a non-priority group constituted of VMs in a non-priority mode. A virtualization management unit sets a physical computation device except a physical computation device assigned to the VM in the priority mode as a physical computation device for receiving a hardware interrupt issued from a physical interrupt device assigned to a virtual interrupt device held by the VM in the priority mode. The virtualization management unit operated by the physical computation device that has received the hardware interrupt specifies a physical computation device assigned to the VM in the priority mode which is a transfer destination of the hardware interrupt, and transfers the hardware interrupt to the specified physical computation device. The physical computation device that has received the transferred hardware interrupt specifies the VM as a target of the hardware interrupt, and issues a virtual interrupt with respect to a virtual computation device held by the VM specified on the basis of the hardware interrupt.

Description

計算機及び割込み制御方法Computer and interrupt control method
 本発明は、マルチコアCPU構成を有する計算機で仮想化ソフトウェアを利用する場合の割込み制御技術に関する。 The present invention relates to an interrupt control technique when virtual software is used in a computer having a multi-core CPU configuration.
 近年、CPU(Central Processing Unit)、メモリ、及びI/Oデバイス等の物理資源(計算機資源)の効率な利用及び運用管理の簡素化を目的として、単一のマルチコアCPUを複数の論理的な区画に分割する仮想化ソフトウェアが一般的に使用されている。 In recent years, a single multi-core CPU has been divided into multiple logical partitions for the purpose of efficient use of physical resources (computer resources) such as CPU (Central Processing Unit), memory, and I / O devices, and simplification of operation management. Virtualization software that divides into two is generally used.
 仮想化ソフトウェアの主な役割は、物理資源と仮想計算機との対応関係を管理することである。仮想化ソフトウェアは、物理資源を管理するために、仮想計算機上でのCPU時間の利用状況及び割込みによる通信状況等を常時監視し、割当量以上の物理資源の使用を抑制し、又は処理の代替を行う。 The main role of virtualization software is to manage the correspondence between physical resources and virtual machines. In order to manage physical resources, the virtualization software constantly monitors the usage status of CPU time on the virtual machine and the communication status due to interrupts, suppresses the use of physical resources exceeding the allocated amount, or substitutes for processing I do.
 前述したような処理を全て仮想化ソフトウェアが実行する場合、大きな性能低下(オーバーヘッド)が生じる。そのため、近年、Intel社等のCPUは仮想化ソフトウェアによる物理資源の管理をサポートするための専用支援機構を備える(例えば、VT-x: Virtualization Technology for Xeon)。 When the virtualization software executes all the processes as described above, a large performance drop (overhead) occurs. Therefore, in recent years, CPUs such as Intel Corporation have a dedicated support mechanism for supporting management of physical resources by virtualization software (for example, VT-x: Virtualization Technology for Xeon).
 仮想化ソフトウェアは、主に演算処理及びメモリアクセスを主要因とするアプリケーションを対象として用いられる。これは、近年、CPUベンダが演算処理及びメモリアクセスの高速化の目的を中心に、専用支援機構をCPUへ実装してきたためである。 Virtualization software is mainly used for applications whose main factors are arithmetic processing and memory access. This is because in recent years, CPU vendors have mounted dedicated support mechanisms on CPUs, mainly for the purpose of speeding up arithmetic processing and memory access.
 今後、さらなる演算処理の高速化及び高頻度I/O処理を実現するには、仮想化ソフトウェアによって処理されるハードウェア割込みの処理時間を極力短くする必要がある。 In the future, in order to realize further speedup of arithmetic processing and high-frequency I / O processing, it is necessary to shorten the processing time of the hardware interrupt processed by the virtualization software as much as possible.
特開2010-128911号公報JP 2010-128911 A
 現在のCPUでは、仮想計算機上のゲストOSが実行される動作モード(以下、non-rootモードと呼ぶ)と、仮想化ソフトウェア自身が実行される動作モード(以下、rootモードと呼ぶ)とを区別する方式が主流となっている。 The current CPU distinguishes between an operation mode in which the guest OS on the virtual machine is executed (hereinafter referred to as non-root mode) and an operation mode in which the virtualization software itself is executed (hereinafter referred to as root mode). This is the mainstream method.
 このような方式を採用するCPUでは、non-rootモードで仮想CPUコア動作中の物理CPUコアに対してハードウェア割込みが発生した場合、(1)物理CPUコア動作モードのrootモードへの遷移、(2)仮想化ソフトウェアによるハードウェア調停処理、(3)物理CPUコアの動作モードのnon-rootモードへの遷移及び仮想計算機へのハードウェア割込の伝達、(4)ゲストOSでの割込みハンドラ処理という一連の処理が必要となる。サーバ仮想化環境の割込処理時間を削減するためには、特に(1)から(3)の処理時間を削減することが重要となる。 In a CPU adopting such a method, when a hardware interrupt occurs for a physical CPU core that is operating in a virtual CPU core in non-root mode, (1) transition of the physical CPU core operation mode to root mode, (2) Hardware arbitration processing by virtualization software, (3) Transition of physical CPU core operation mode to non-root mode and transmission of hardware interrupt to virtual machine, (4) Interrupt handler in guest OS A series of processing called processing is required. In order to reduce the interrupt processing time in the server virtualization environment, it is particularly important to reduce the processing time from (1) to (3).
 また、最近のハードウェア支援機能は、(1)から(4)を削減するためにCPU動作モードの遷移を行うことなくハードウェア割込みを、直接、仮想計算機へ伝達する仕組みが備える。 Also, the recent hardware support function has a mechanism for directly transmitting a hardware interrupt to the virtual machine without changing the CPU operation mode in order to reduce (1) to (4).
 しかし、このような仕組みを利用するためには、当該CPUコアへのハードウェア割込みを当該ゲストOS上で処理させる必要がある。このような構成では、悪意のあるゲストOSによって、本来、仮想化ソフトウェアが受け取るべき割込みをマスクされる可能性がある。この場合、仮想化ソフトウェアが正常に動作できない可能性がある。 However, in order to use such a mechanism, it is necessary to process a hardware interrupt to the CPU core on the guest OS. In such a configuration, an interrupt that should originally be received by the virtualization software may be masked by a malicious guest OS. In this case, there is a possibility that the virtualization software cannot operate normally.
 本発明では、マルチコアCPU、仮想化ソフトウェア及び仮想化ソフトウェアによって管理される複数の仮想計算機を有する計算機において、仮想計算機におけるハードウェア割込の処理を高速化し、かつ、仮想化ソフトウェアのセキュリティを確保することを目的とする。 In the present invention, in a computer having a multi-core CPU, virtualization software, and a plurality of virtual machines managed by the virtualization software, the hardware interrupt processing in the virtual machines is accelerated, and the security of the virtualization software is ensured. For the purpose.
 本願において開示される発明の代表的な一例を示せば以下の通りである。すなわち、論理的に分割された計算機資源を用いて生成された複数の仮想計算機が稼働する計算機であって、前記計算機資源は、複数の物理演算装置、一つ以上の物理メモリ、及び前記物理演算装置に対してハードウェア割込を発生させる一つ以上の物理割込デバイスを含み、前記複数の仮想計算機の各々は、複数の仮想演算装置、仮想メモリ、及び仮想割込デバイスを有し、前記一つ以上の物理メモリは、前記複数の仮想計算機を生成し、前記複数の仮想計算機を管理する仮想化管理部を実現するプログラムを格納し、前記複数の仮想計算機上では、当該仮想計算機を制御するオペレーティングシステムが稼働し、前記複数の物理演算装置は、前記仮想化管理部による処理を実行する第1の動作モードと、前記オペレーティングシステムによる処理を実行する第2の動作モードとを切り替える仮想化支援部と、前記物理演算装置間で前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を転送する割込仮想化支援部と、を有し、前記仮想化管理部は、前記ハードウェア割込に起因する前記オペレーティングシステムの処理性能の低下を回避する制御モードである優先モードの仮想計算機から構成される優先グループと、前記ハードウェア割込に起因する前記オペレーティングシステムの処理性能の低下を許容する制御モードである非優先モードの仮想計算機から構成される非優先グループとに分けて前記複数の仮想計算機を管理し、前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の物理演算装置を、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置として設定し、前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部は、前記受信したハードウェア割込の転送先となる前記優先モードの仮想計算機に割り当てられる前記物理演算装置を特定し、前記特定された物理演算装置に前記受信したハードウェア割込を転送し、前記転送されたハードウェア割込を受信した物理演算装置は、前記転送されたハードウェア割込の対象となる仮想計算機を特定し、前記転送されたハードウェア割込に基づいて、前記特定された仮想計算機が有する前記仮想演算装置に対する仮想割込を発行することを特徴とする。 A typical example of the invention disclosed in the present application is as follows. That is, a computer on which a plurality of virtual machines generated using logically divided computer resources operate, and the computer resources include a plurality of physical operation devices, one or more physical memories, and the physical operation Including one or more physical interrupt devices that generate hardware interrupts to a device, each of the plurality of virtual machines includes a plurality of virtual arithmetic devices, virtual memories, and virtual interrupt devices, One or more physical memories generate a plurality of virtual machines, store a program that realizes a virtualization management unit that manages the plurality of virtual machines, and control the virtual machines on the plurality of virtual machines Operating the operating system, and the plurality of physical computing devices include a first operation mode for executing processing by the virtualization management unit and the operating system. A virtualization support unit that switches between the second operation mode for executing the processing and interrupt virtualization for transferring the hardware interrupt issued from the one or more physical interrupt devices between the physical arithmetic devices A priority group composed of virtual machines in a priority mode that is a control mode for avoiding a decrease in processing performance of the operating system due to the hardware interrupt, Managing the plurality of virtual machines in a non-priority group composed of virtual machines in non-priority mode, which is a control mode that allows a reduction in processing performance of the operating system due to the hardware interrupt, Before the virtual computer in the priority mode has a physical arithmetic device other than the physical arithmetic device assigned to the virtual computer in the priority mode Set as a physical arithmetic device that receives the hardware interrupt issued from the one or more physical interrupt devices assigned to the virtual interrupt device, and receive the hardware interrupt for the virtual machine in the priority mode The virtualization management unit executed by the physical arithmetic device specifies the physical arithmetic device assigned to the virtual machine in the priority mode as a transfer destination of the received hardware interrupt, and specifies the specified physical operation The physical processing device that transferred the received hardware interrupt to the device and received the transferred hardware interrupt specifies the virtual machine that is the target of the transferred hardware interrupt, and the transferred Issuing a virtual interrupt to the virtual arithmetic unit of the identified virtual machine based on the hardware interrupt And
 本発明によれば、優先モードの仮想計算機に対するハードウェア割込は、優先モードの仮想計算機に割り当てられる演算装置以外の演算装置が受信する。したがって、優先モードの仮想計算機上のオペレーティングシステムの処理のオーバーヘッドの発生を回避でき、また、ハードウェア割込の処理を高速化できる。さらに、全てのハードウェア割込が仮想化管理部によって処理されるため仮想化ソフトウェアのセキュリティを確保できる。 According to the present invention, the hardware interrupt for the priority mode virtual machine is received by an arithmetic unit other than the arithmetic unit assigned to the priority mode virtual machine. Therefore, it is possible to avoid the overhead of the operating system processing on the virtual machine in the priority mode, and to speed up the hardware interrupt processing. Furthermore, since all hardware interrupts are processed by the virtualization manager, the security of the virtualization software can be ensured.
 上記した以外の課題、構成及び効果は、以下の実施例の説明により明らかにされる。 Issues, configurations, and effects other than those described above will be clarified by the description of the following examples.
実施例1の物理計算機の構成の一例を説明するブロック図である。FIG. 3 is a block diagram illustrating an example of a configuration of a physical computer according to the first embodiment. 実施例1の仮想化管理部が保持する物理ベクタ番号管理テーブルの一例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of a physical vector number management table held by a virtualization management unit according to the first embodiment. 実施例1のVMが保持する仮想ベクタ番号管理テーブルの一例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of a virtual vector number management table held by a VM according to the first embodiment. 実施例1の仮想化管理部が保持するCPU割込識別子管理テーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the CPU interruption identifier management table which the virtualization management part of Example 1 hold | maintains. 実施例1の仮想化管理部が保持するVM割込デバイス管理テーブルの一例を示す説明図である。6 is an explanatory diagram illustrating an example of a VM interrupt device management table held by a virtualization management unit according to the first embodiment. FIG. 実施例1の仮想化管理部が保持するVM属性テーブルの一例を示す説明図である。6 is an explanatory diagram illustrating an example of a VM attribute table held by a virtualization management unit according to the first embodiment. FIG. 実施例1の仮想化管理部が保持する物理CPUコアグループ管理テーブルの一例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of a physical CPU core group management table held by a virtualization management unit according to the first embodiment. 実施例1の仮想化管理部が保持する高速IPI制御データの一例を示す説明図である。It is explanatory drawing which shows an example of the high-speed IPI control data which the virtualization management part of Example 1 hold | maintains. 実施例1の仮想化管理部が実行するVM属性テーブルの設定処理の一例を説明するフローチャートである。10 is a flowchart illustrating an example of a VM attribute table setting process executed by a virtualization management unit according to the first embodiment. 実施例1の仮想化管理部が実行する物理CPUコアグループ管理テーブルの更新処理の一例を説明するフローチャートである。6 is a flowchart illustrating an example of a physical CPU core group management table update process executed by a virtualization management unit according to the first embodiment. 実施例1の仮想化管理部が実行するゲストOSの割込設定処理の一例を説明するフローチャートである。6 is a flowchart illustrating an example of an interrupt setting process for a guest OS executed by a virtualization management unit according to the first embodiment. 実施例1の仮想化管理部が仮想CPUコアスケジューリング時に実行する処理を説明するフローチャートである。6 is a flowchart illustrating processing executed by the virtualization management unit according to the first embodiment during virtual CPU core scheduling. 実施例1の仮想化管理部が実行する起動処理の一例を説明するフローチャートである。6 is a flowchart illustrating an example of a startup process executed by a virtualization management unit according to the first embodiment. 実施例1の仮想化管理部が実行する起動処理の一例を説明するフローチャートである。6 is a flowchart illustrating an example of a startup process executed by a virtualization management unit according to the first embodiment. 実施例2の仮想化管理部が実行するゲストOSの割込設定処理の一例を説明するフローチャートである。10 is a flowchart illustrating an example of an interrupt setting process for a guest OS executed by a virtualization management unit according to the second embodiment. 実施例2の仮想化管理部が実行する起動処理の一例を説明するフローチャートである。12 is a flowchart illustrating an example of a startup process executed by a virtualization management unit according to the second embodiment.
 以下、実施例を添付図面に基づいて説明する。 Hereinafter, embodiments will be described with reference to the accompanying drawings.
 実施例1では、1台の物理計算機上に生成された2つの仮想計算機のそれぞれに処理の属性を設定する。具体的には1つの仮想計算機には「ゲストOS処理優先モード」を設定し、一方の仮想計算機には「ゲストOS処理非優先モード」を設定する。 In the first embodiment, processing attributes are set for each of two virtual machines generated on one physical computer. Specifically, “guest OS processing priority mode” is set for one virtual machine, and “guest OS processing non-priority mode” is set for one virtual machine.
 「ゲストOS処理優先モード」の仮想計算機に対するハードウェア割込の場合、「ゲストOS処理非優先モード」の仮想計算機が有する仮想CPUコアに割り当てられる物理CPUコアが割込デバイスから発行されたハードウェア割込みを受信する。さらに、ハードウェア割込を受け付けた物理CPUコアが、「ゲストOS処理優先モード」の仮想計算機が有する仮想CPUコアに割り当てられる物理CPUコアにハードウェア割込を転送する。 In the case of hardware interrupt for a virtual machine in “guest OS processing priority mode”, the hardware issued from the interrupt device to the physical CPU core assigned to the virtual CPU core of the virtual machine in “guest OS processing non-priority mode” Receive an interrupt. Further, the physical CPU core that has received the hardware interrupt transfers the hardware interrupt to the physical CPU core assigned to the virtual CPU core of the virtual machine in the “guest OS processing priority mode”.
 「ゲストOS処理優先モード」の仮想計算機が有する仮想CPUコアに割り当てられる物理CPUコアは、rootモードへの遷移が発生しない。そのため、「ゲストOS処理優先モード」の仮想計算機では処理性能の低下が抑止される。一方、「ゲストOS処理非優先モード」の仮想計算機に対するハードウェア割込の場合、当該仮想計算機が有する仮想CPUコアに割り当てられる物理CPUコアが割込デバイスからハードウェア割込を受信する。 The physical CPU core assigned to the virtual CPU core of the virtual machine in the “guest OS processing priority mode” does not transition to the root mode. Therefore, a decrease in processing performance is suppressed in the virtual machine in “guest OS processing priority mode”. On the other hand, in the case of hardware interrupt for a virtual machine in the “guest OS processing non-priority mode”, the physical CPU core assigned to the virtual CPU core of the virtual machine receives the hardware interrupt from the interrupt device.
 以下の説明では、ハードウェア割込をHW割込とも記載する。 In the following explanation, hardware interrupts are also referred to as HW interrupts.
 図1は、実施例1の物理計算機10の構成の一例を説明するブロック図である。以下、物理計算機10のハードウェア構成及びソフトウェア構成のそれぞれについて説明する。 FIG. 1 is a block diagram illustrating an example of the configuration of the physical computer 10 according to the first embodiment. Hereinafter, each of the hardware configuration and the software configuration of the physical computer 10 will be described.
 (ハードウェア構成)
 まず、図1を用いて物理計算機10のハードウェア構成について説明する。
(Hardware configuration)
First, the hardware configuration of the physical computer 10 will be described with reference to FIG.
 物理計算機10は、計算機リソースとして、CPUリソース100、メモリリソース110、及び割込デバイスリソース115を有する。 The physical computer 10 includes a CPU resource 100, a memory resource 110, and an interrupt device resource 115 as computer resources.
 CPUリソース100は、マルチプロセッサ構成又はマルチコアCPUを利用して複数の物理CPUコア101から構成される。各物理CPUコア101は、図示しない仮想化支援機能部(例えば、Intel VT-x等)、及び仮想化支援機能部が有効されている場合に使用される割込仮想化支援(Posted Interrupt Processing)機能部102を有する。割込仮想化支援機能部102については、非特許文献1に記載されている。 The CPU resource 100 is composed of a plurality of physical CPU cores 101 using a multiprocessor configuration or a multicore CPU. Each physical CPU core 101 includes a virtualization support function unit (not shown) (for example, Intel VT-x) and an interrupt virtualization support (Posted Interrupt Processing) used when the virtualization support function unit is enabled. A function unit 102 is included. The interrupt virtualization support function unit 102 is described in Non-Patent Document 1.
 CPUリソース100に含まれる物理CPUコア101は、ハイパバイザ等の仮想化管理部120によって生成される仮想計算機140に割り当てられる計算機リソースとして利用される。以下の説明では、仮想計算機をVMとも記載する。 The physical CPU core 101 included in the CPU resource 100 is used as a computer resource allocated to the virtual computer 140 generated by the virtualization management unit 120 such as a hypervisor. In the following description, the virtual machine is also referred to as VM.
 実施例1では、後述する仮想化管理部120が、CPUリソース100に含まれる複数の物理CPUコア101を、第1の物理CPUコアグループ104及び第2の物理CPUコアグループ105の2つのグループに分けて管理する。 In the first embodiment, the virtualization management unit 120 described later converts a plurality of physical CPU cores 101 included in the CPU resource 100 into two groups of a first physical CPU core group 104 and a second physical CPU core group 105. Manage separately.
 第1の物理CPUコアグループ104は、優先グループ190に含まれるVM140の仮想CPUコア150に割り当てられる物理CPUコア101のグループである。後述するように、仮想化管理部120は、第1の物理CPUコアグループ104に含まれる物理CPUコア101を、rootモードへの遷移が発生しないように制御する。これによって、優先グループ190に含まれるVM140上で稼働するゲストOS160の処理性能の低下を抑止できる。 The first physical CPU core group 104 is a group of physical CPU cores 101 assigned to the virtual CPU core 150 of the VM 140 included in the priority group 190. As will be described later, the virtualization management unit 120 controls the physical CPU cores 101 included in the first physical CPU core group 104 so that transition to the root mode does not occur. As a result, it is possible to suppress a decrease in processing performance of the guest OS 160 running on the VM 140 included in the priority group 190.
 一方、第2の物理CPUコアグループ105は、第1の物理CPUコアグループ104に含まれる物理CPUコア101以外の物理CPUコア101のグループである。第2の物理CPUコアグループ105に含まれる物理CPUコア101は、rootモードへの遷移が許容される。 On the other hand, the second physical CPU core group 105 is a group of physical CPU cores 101 other than the physical CPU core 101 included in the first physical CPU core group 104. The physical CPU cores 101 included in the second physical CPU core group 105 are allowed to transition to the root mode.
 メモリリソース110は、複数のメモリ111から構成される。実施例1では、複数のメモリ111を用いて、第1のメモリグループ112及び第2のメモリグループ113が構成される。第1のメモリグループ112は、仮想化管理部120にメモリ領域を割り当てられるために用いられる。第2のメモリグループ113は、複数のVM140の各々にメモリ領域を割り当てるために用いられる。なお、仮想化管理部120は、第2のメモリグループ113の一部又は全てのメモリ領域にアクセスできるものとする。 The memory resource 110 includes a plurality of memories 111. In the first embodiment, a first memory group 112 and a second memory group 113 are configured using a plurality of memories 111. The first memory group 112 is used to allocate a memory area to the virtualization management unit 120. The second memory group 113 is used to allocate a memory area to each of the plurality of VMs 140. Note that the virtualization management unit 120 can access a part or all of the memory areas of the second memory group 113.
 割込デバイスリソース115は、物理CPUコア101に対して割込みを発生させる1つ以上の割込デバイス116から構成される。割込デバイス116は、例えば、I/O処理用のPCIeデバイス、及び物理CPUコア101に付随するタイマリソース等が考えられる。 The interrupt device resource 115 includes one or more interrupt devices 116 that generate an interrupt to the physical CPU core 101. The interrupt device 116 may be, for example, a PCIe device for I / O processing, a timer resource associated with the physical CPU core 101, or the like.
 (ソフトウェア構成)
 次に、図1を用いて物理計算機10のソフトウェア構成について説明する。
(Software configuration)
Next, the software configuration of the physical computer 10 will be described with reference to FIG.
 物理計算機10では、仮想化管理部120がシステムソフトウェアとして稼働する。仮想化管理部120は、物理計算機10が有する計算機リソースを用いて、1つ以上のVM140を生成し、また、生成されたVM140を管理する。具体的には、仮想化管理部120は、CPUリソース100に含まれる1つ以上の物理CPUコア101を仮想CPUコア150に割り当て、第2のメモリグループ113の一部のメモリ領域を仮想メモリ151に割り当て、また、仮想割込デバイス152に割込デバイスリソース115に含まれる1つ以上の割込デバイス116を割り当てることによって、VM140を生成する。 In the physical computer 10, the virtualization management unit 120 operates as system software. The virtualization management unit 120 generates one or more VMs 140 using the computer resources of the physical computer 10 and manages the generated VMs 140. Specifically, the virtualization management unit 120 assigns one or more physical CPU cores 101 included in the CPU resource 100 to the virtual CPU core 150 and allocates a partial memory area of the second memory group 113 to the virtual memory 151. In addition, the VM 140 is generated by assigning one or more interrupt devices 116 included in the interrupt device resource 115 to the virtual interrupt device 152.
 実施例1の仮想化管理部120は、割込ハンドラ137、タイマスケジューラ138、及び設定UI139を有し、また、物理ベクタ番号管理テーブル130、CPU割込識別子管理テーブル131、VM割込デバイス管理テーブル132、VM属性テーブル133、物理CPUコアグループ管理テーブル134、高速IPI制御データ135、VMCS(Virtual Machine Control Structure)136を保持する。 The virtualization management unit 120 according to the first embodiment includes an interrupt handler 137, a timer scheduler 138, and a setting UI 139, and also includes a physical vector number management table 130, a CPU interrupt identifier management table 131, and a VM interrupt device management table. 132, a VM attribute table 133, a physical CPU core group management table 134, high-speed IPI control data 135, and a VMCS (Virtual Machine Control Structure) 136 are held.
 割込ハンドラ137は、第2の物理CPUコアグループ105に含まれる物理CPUコア101が受信した割込みに対する処理の実行コードである。タイマスケジューラ138は、タイマ割込みを管理する。設定UI139は、VM140の各種設定を行うためのインタフェースである。実施例1では、ユーザが設定UI139を用いて、ゲストOS処理優先モードの属性値を設定する。 The interrupt handler 137 is an execution code of processing for an interrupt received by the physical CPU core 101 included in the second physical CPU core group 105. The timer scheduler 138 manages timer interrupts. The setting UI 139 is an interface for performing various settings of the VM 140. In the first embodiment, the user sets the attribute value of the guest OS processing priority mode using the setting UI 139.
 物理ベクタ番号管理テーブル130は、割込デバイスリソース115に含まれる割込デバイス116の割込みを管理するための情報を格納する。物理ベクタ番号管理テーブル130の詳細は、図2を用いて後述する。CPU割込識別子管理テーブル131は、各VM140が有する仮想CPUコア150とCPUリソース100に含まれる物理CPUコア101との対応関係を管理するための情報を格納する。CPU割込識別子管理テーブル131の詳細は、図4を用いて後述する。 The physical vector number management table 130 stores information for managing interrupts of the interrupt device 116 included in the interrupt device resource 115. Details of the physical vector number management table 130 will be described later with reference to FIG. The CPU interrupt identifier management table 131 stores information for managing the correspondence between the virtual CPU core 150 included in each VM 140 and the physical CPU core 101 included in the CPU resource 100. Details of the CPU interrupt identifier management table 131 will be described later with reference to FIG.
 VM割込デバイス管理テーブル132は、物理ベクタ番号と、後述する仮想ベクタ番号管理テーブル171を用いて管理される仮想ベクタ番号との対応関係を管理するための情報を格納する。物理ベクタ番号と仮想ベクタ番号との対応関係は、例えば、1つの物理ベクタ番号を1つの仮想ベクタ番号が占有する対応関係、及び1つの物理ベクタ番号を複数の仮想ベクタ番号が共有する対応関係が考えられる。VM割込デバイス管理テーブル132の詳細は、図5を用いて後述する。 The VM interrupt device management table 132 stores information for managing the correspondence between physical vector numbers and virtual vector numbers managed using a virtual vector number management table 171 described later. The correspondence relationship between a physical vector number and a virtual vector number includes, for example, a correspondence relationship in which one physical vector number is occupied by one virtual vector number, and a correspondence relationship in which one physical vector number is shared by a plurality of virtual vector numbers. Conceivable. Details of the VM interrupt device management table 132 will be described later with reference to FIG.
 VM属性テーブル133は、各VM140上で稼働するゲストOS160の割込処理の制御モードを管理するための情報を格納する。VM属性テーブル133の詳細は、図6を用いて後述する。物理CPUコアグループ管理テーブル134は、CPUリソース100に含まれる各物理CPUコア101が所属するグループを管理するための情報を格納する。物理CPUコアグループ管理テーブル134の詳細は、図7を用いて後述する。 The VM attribute table 133 stores information for managing the control mode of the interrupt process of the guest OS 160 operating on each VM 140. Details of the VM attribute table 133 will be described later with reference to FIG. The physical CPU core group management table 134 stores information for managing a group to which each physical CPU core 101 included in the CPU resource 100 belongs. Details of the physical CPU core group management table 134 will be described later with reference to FIG.
 高速IPI制御データ135は、CPUリソース100に含まれる各物理CPUコア101が有する割込仮想化支援機能部102を利用するために必要な情報を格納する。高速IPI制御データ135の詳細は、図8を用いて後述する。 The high-speed IPI control data 135 stores information necessary for using the interrupt virtualization support function unit 102 included in each physical CPU core 101 included in the CPU resource 100. Details of the high-speed IPI control data 135 will be described later with reference to FIG.
 VMCS136は、VM140が有する仮想CPUコア150の実行ステートを管理するための情報を格納する。なお、VMCS136については、非特許文献1に記載されているため、詳細な説明は省略する。 The VMCS 136 stores information for managing the execution state of the virtual CPU core 150 included in the VM 140. Since VMCS 136 is described in Non-Patent Document 1, detailed description thereof is omitted.
 VM140は、仮想CPUコア150、仮想メモリ151、及び仮想割込デバイス152から構成される。仮想CPUコア150には、CPUリソース100に含まれるいずれかの物理CPUコア101が割り当てられ、仮想メモリ151には、第2のメモリグループ113のメモリ領域が割り当てられ、また、仮想割込デバイス152には、割込デバイスリソース115に含まれるいずれかの割込デバイス116が割り当てられる。 The VM 140 includes a virtual CPU core 150, a virtual memory 151, and a virtual interrupt device 152. One of the physical CPU cores 101 included in the CPU resource 100 is allocated to the virtual CPU core 150, the memory area of the second memory group 113 is allocated to the virtual memory 151, and the virtual interrupt device 152 Is assigned one of the interrupt devices 116 included in the interrupt device resource 115.
 実施例1の仮想化管理部120は、割込処理の動作方針(割込み処理の制御モード)に応じて、優先グループ190及び非優先グループ191の二つに分けて複数のVM140を管理する。 The virtualization management unit 120 according to the first embodiment manages a plurality of VMs 140 divided into a priority group 190 and a non-priority group 191 according to an interrupt processing operation policy (control mode of interrupt processing).
 優先グループ190に含まれるVM140は、ゲストOS処理優先モードを示す属性値が有効化されている。一方、非優先グループ191に含まれるVM140は、ゲストOS処理優先モードを示す属性値が無効化されている。ここで、ゲストOS処理優先モードとは、当該VM140上で稼働するゲストOS160の割込処理の制御モードを示す。 In the VM 140 included in the priority group 190, the attribute value indicating the guest OS processing priority mode is validated. On the other hand, the VM 140 included in the non-priority group 191 has an invalid attribute value indicating the guest OS processing priority mode. Here, the guest OS processing priority mode indicates a control mode of interrupt processing of the guest OS 160 operating on the VM 140.
 以下の説明では、ゲストOS処理優先モードを示す属性値が有効化されたVM140、すなわち、優先グループ190に含まれるVM140を優先モードのVM140とも記載する。また、ゲストOS処理優先モードを示す属性値が無効化されたVM140、すなわち、非優先グループ191に含まれるVM140を非優先モードのVM140とも記載する。 In the following description, the VM 140 in which the attribute value indicating the guest OS processing priority mode is validated, that is, the VM 140 included in the priority group 190 is also described as the priority mode VM 140. Further, the VM 140 in which the attribute value indicating the guest OS processing priority mode is invalidated, that is, the VM 140 included in the non-priority group 191 is also referred to as a non-priority mode VM 140.
 仮想化管理部120は、優先モードのVM140に対して、HW割込180に起因するゲストOS160の処理性能の低下を回避するように管理する。一方、仮想化管理部120は、非優先モードのVM140に対して、HW割込180に起因するゲストOS160の処理性能の低下を許容するように管理する。 The virtualization management unit 120 manages the VM 140 in the priority mode so as to avoid a decrease in the processing performance of the guest OS 160 due to the HW interrupt 180. On the other hand, the virtualization management unit 120 manages the VM 140 in the non-priority mode so as to allow a decrease in the processing performance of the guest OS 160 due to the HW interrupt 180.
 具体的には、優先モードのVM140が有する仮想CPUコア150に割り当てられる物理CPUコア101は、rootモードへの遷移が発生しないように制御される。非優先モードのVM140が有する仮想CPUコア150に割り当てられる物理CPUコア101は、従来と同様にrootモードへの遷移できるように制御され、また、優先モードのVM140へのHW割込180を受信する物理CPUコア101としても扱われる。 Specifically, the physical CPU core 101 allocated to the virtual CPU core 150 included in the VM 140 in the priority mode is controlled so that the transition to the root mode does not occur. The physical CPU core 101 allocated to the virtual CPU core 150 included in the VM 140 in the non-priority mode is controlled so as to be able to transition to the root mode as in the prior art, and receives the HW interrupt 180 to the VM 140 in the priority mode. The physical CPU core 101 is also handled.
 ゲストOS160は、VM140上にて動作するソフトウェアであり、デバイスドライバ170及び仮想ベクタ番号管理テーブル171を保持する。 The guest OS 160 is software that operates on the VM 140 and holds a device driver 170 and a virtual vector number management table 171.
 デバイスドライバ170は、仮想割込デバイス152を制御するためのソフトウェアである。ゲストOS160は、デバイスドライバ170を用いて仮想化管理部120に対して割込設定184を行う。 The device driver 170 is software for controlling the virtual interrupt device 152. The guest OS 160 performs an interrupt setting 184 for the virtualization management unit 120 using the device driver 170.
 仮想ベクタ番号管理テーブル171は、ゲストOS160が仮想割込デバイス152の割込みを管理するための情報を格納する。仮想ベクタ番号管理テーブル171は、割込設定184を契機に更新される。仮想ベクタ番号管理テーブル171の詳細は、図3を用いて後述する。 The virtual vector number management table 171 stores information for the guest OS 160 to manage the interruption of the virtual interrupt device 152. The virtual vector number management table 171 is updated in response to the interrupt setting 184. Details of the virtual vector number management table 171 will be described later with reference to FIG.
 ゲストOS160の起動時には、VM140の仮想割込デバイス152からの仮想CPUコア150に対するHW割込を設定するための割込スケジューリング設定185が仮想化管理部120に対して発生する。 When the guest OS 160 is activated, an interrupt scheduling setting 185 for setting an HW interrupt from the virtual interrupt device 152 of the VM 140 to the virtual CPU core 150 is generated in the virtualization management unit 120.
 ここで、実施例1における優先モードのVM140における割込処理の概要について説明する。 Here, an overview of interrupt processing in the VM 140 in the priority mode in the first embodiment will be described.
 仮想化管理部120は、予め、優先モードのVM140の仮想CPUコア150に対する仮想割込デバイス152からのHW割込において、当該仮想割込デバイス152に割り当てられた割込デバイス116の割込先の物理CPUコア101を、第2の物理CPUコアグループ105に含まれる物理CPUコア101に設定する。 In the HW interrupt from the virtual interrupt device 152 to the virtual CPU core 150 of the VM 140 in the priority mode, the virtualization management unit 120 determines in advance the interrupt destination of the interrupt device 116 assigned to the virtual interrupt device 152. The physical CPU core 101 is set to the physical CPU core 101 included in the second physical CPU core group 105.
 まず、第2の物理CPUコアグループ105に含まれる物理CPUコア101が、優先モードのVM140に割り当てられた割込デバイス116からのHW割込180を受け付ける。HW割込180を受け付けた物理CPUコア101は、non-rootモードからrootモードに遷移し、優先モードのVM140の仮想CPUコア150に割り当てられた物理CPUコア101に対して物理IPI181を発行する。 First, the physical CPU core 101 included in the second physical CPU core group 105 receives the HW interrupt 180 from the interrupt device 116 assigned to the VM 140 in the priority mode. The physical CPU core 101 that has received the HW interrupt 180 makes a transition from the non-root mode to the root mode, and issues a physical IPI 181 to the physical CPU core 101 assigned to the virtual CPU core 150 of the VM 140 in the priority mode.
 受信した物理CPUコア101は、高速IPI制御データ135の参照処理182を実行し、処理結果に基づいて仮想化管理部120を介することなく仮想CPUコア150に、直接、仮想割込183を発行する。 The received physical CPU core 101 executes the reference processing 182 of the high-speed IPI control data 135 and issues a virtual interrupt 183 directly to the virtual CPU core 150 without going through the virtualization management unit 120 based on the processing result. .
 前述の処理によって、優先モードのVM140の仮想CPUコア150に割り当てられた物理CPUコア101は、rootモードへの遷移を行うことなく、優先モードのVM140に仮想割込183を発行できるため、ゲストOS160の処理を継続できる。したがって、優先モードのVM140上のゲストOS160の処理性能の低下を抑止できる。 The physical CPU core 101 allocated to the virtual CPU core 150 of the priority mode VM 140 by the above-described processing can issue the virtual interrupt 183 to the priority mode VM 140 without performing the transition to the root mode. Can continue. Therefore, it is possible to suppress a decrease in processing performance of the guest OS 160 on the VM 140 in the priority mode.
 一方、非優先グループ191に所属するVM140の割込処理については、以下の処理が実行される。第2の物理CPUコアグループ105が、割込デバイス116からのHW割込180を受信し、仮想化管理部120による調停を伴う仮想割込186を仮想CPUコア150に発行する。 On the other hand, for the interrupt processing of the VM 140 belonging to the non-priority group 191, the following processing is executed. The second physical CPU core group 105 receives the HW interrupt 180 from the interrupt device 116 and issues a virtual interrupt 186 accompanied by arbitration by the virtualization management unit 120 to the virtual CPU core 150.
 実施例1では、仮想化管理部120が、優先モードのVM140及び非優先モードのVM140に対するHW割込180のいずれについても、仮想割込186を受信し、調停処理を実行した後にVM140に仮想割込を通知するため、セキュアな仮想化環境を提供できる。 In the first embodiment, the virtualization management unit 120 receives the virtual interrupt 186 for both the HW interrupt 180 for the VM 140 in the priority mode and the VM 140 in the non-priority mode, executes the arbitration process, and then performs a virtual interrupt to the VM 140. Can provide a secure virtualization environment.
 次に、図2から図8を用いて各種情報の詳細について説明する。 Next, details of various information will be described with reference to FIGS.
 図2は、実施例1の仮想化管理部120が保持する物理ベクタ番号管理テーブル130の一例を示す説明図である。 FIG. 2 is an explanatory diagram illustrating an example of a physical vector number management table 130 held by the virtualization management unit 120 according to the first embodiment.
 物理ベクタ番号管理テーブル130は1つの物理ベクタ番号に対して1つのレコードを含み、各レコードは物理ベクタ番号210及び割込デバイスタイプ220を含む。 The physical vector number management table 130 includes one record for one physical vector number, and each record includes a physical vector number 210 and an interrupt device type 220.
 物理ベクタ番号210は、物理計算機10が管理可能なベクタ番号(物理ベクタ番号)である。物理ベクタ番号は、HW割込180に含められる情報である。割込デバイスタイプ220は、物理ベクタ番号210に対して登録された割込デバイス116の種別である。なお、割込デバイスタイプ220が空欄の場合、ベクタ番号に対して割込デバイス116が登録されていないことを示す。 The physical vector number 210 is a vector number (physical vector number) that can be managed by the physical computer 10. The physical vector number is information included in the HW interrupt 180. The interrupt device type 220 is a type of the interrupt device 116 registered for the physical vector number 210. When the interrupt device type 220 is blank, it indicates that no interrupt device 116 is registered for the vector number.
 図3は、実施例1のVM140が保持する仮想ベクタ番号管理テーブル171の一例を示す説明図である。 FIG. 3 is an explanatory diagram illustrating an example of the virtual vector number management table 171 held by the VM 140 according to the first embodiment.
 仮想ベクタ番号管理テーブル171は1つの仮想ベクタ番号に対して1つのレコードを含み、各レコードは仮想ベクタ番号310及び割込デバイスタイプ320を含む。 The virtual vector number management table 171 includes one record for one virtual vector number, and each record includes a virtual vector number 310 and an interrupt device type 320.
 仮想ベクタ番号310は、VM140が管理可能なベクタ番号(仮想ベクタ番号)である。仮想ベクタ番号は、仮想割込183、186に含められる情報である。割込デバイスタイプ320は、仮想ベクタ番号310に対して登録された仮想割込デバイス152の種別である。 The virtual vector number 310 is a vector number (virtual vector number) that can be managed by the VM 140. The virtual vector number is information included in the virtual interrupts 183 and 186. The interrupt device type 320 is a type of the virtual interrupt device 152 registered for the virtual vector number 310.
 図4は、実施例1の仮想化管理部120が保持するCPU割込識別子管理テーブル131の一例を示す説明図である。 FIG. 4 is an explanatory diagram illustrating an example of the CPU interrupt identifier management table 131 held by the virtualization management unit 120 according to the first embodiment.
 CPU割込識別子管理テーブル131は、仮想化管理部120が管理する割込処理に特化したCPUスケジューリング情報の一部である。CPU割込識別子管理テーブル131は1つのVM140に対して1つのレコードを含み、各レコードはVM番号410、仮想CPUコア LAPIC ID420、及び物理CPUコア LAPIC ID430を含む。 The CPU interrupt identifier management table 131 is a part of CPU scheduling information specialized for interrupt processing managed by the virtualization management unit 120. The CPU interrupt identifier management table 131 includes one record for one VM 140. Each record includes a VM number 410, a virtual CPU core LAPIC ID 420, and a physical CPU core LAPIC ID 430.
 VM番号410は、VM140を一意に識別するための識別番号である。仮想CPUコア LAPIC ID420は、VM140が有する仮想CPUコア150のLAPIC(Local Advanced Programmable Interrupt Controller)の識別番号である。物理CPUコア LAPIC ID430は、仮想CPUコア150に割り当てられる物理CPUコア101のLAPICの識別番号である。 The VM number 410 is an identification number for uniquely identifying the VM 140. The virtual CPU core LAPIC ID 420 is an identification number of a LAPIC (Local Advanced Programmable Interrupt Controller) of the virtual CPU core 150 of the VM 140. The physical CPU core LAPIC ID 430 is an identification number of the LAPIC of the physical CPU core 101 assigned to the virtual CPU core 150.
 図5は、実施例1の仮想化管理部120が保持するVM割込デバイス管理テーブル132の一例を示す説明図である。 FIG. 5 is an explanatory diagram illustrating an example of the VM interrupt device management table 132 held by the virtualization management unit 120 according to the first embodiment.
 VM割込デバイス管理テーブル132は、割込デバイスタイプが同一である割込デバイス116及び仮想割込デバイス152のそれぞれに割り当てられた物理ベクタ番号及び仮想ベクタ番号のマッピング情報の一部である。VM割込デバイス管理テーブル132は1つの物理ベクタ番号に対して1つのレコードを含み、各レコードは物理ベクタ番号510、VM番号520、仮想ベクタ番号530、仮想CPUコア LAPIC ID540、及び割込受信物理CPUコア LAPIC ID550を含む。 The VM interrupt device management table 132 is a part of mapping information of physical vector numbers and virtual vector numbers assigned to the interrupt devices 116 and virtual interrupt devices 152 having the same interrupt device type. The VM interrupt device management table 132 includes one record for one physical vector number. Each record has a physical vector number 510, a VM number 520, a virtual vector number 530, a virtual CPU core LAPIC ID 540, and an interrupt reception physical. Includes CPU core LAPIC ID550.
 物理ベクタ番号510は、物理ベクタ番号210と同一のものである。VM番号520は、物理ベクタ番号210が割り当てられるVM140の識別番号であり、VM番号410と同一のものである。仮想ベクタ番号530は、物理ベクタ番号にマッピングされた仮想ベクタ番号であり、仮想ベクタ番号310と同一のものである。 The physical vector number 510 is the same as the physical vector number 210. The VM number 520 is an identification number of the VM 140 to which the physical vector number 210 is assigned, and is the same as the VM number 410. The virtual vector number 530 is a virtual vector number mapped to the physical vector number, and is the same as the virtual vector number 310.
 仮想CPUコア LAPIC ID540は、仮想ベクタ番号に対応するHW割込の通知先となる仮想CPUコア150のLAPICの識別番号である。割込受信物理CPUコア LAPIC ID550は、仮想CPUコア150へのHW割込を受信する物理CPUコア101のLAPICの識別番号である。 The virtual CPU core LAPIC ID 540 is the LAPIC identification number of the virtual CPU core 150 that is the notification destination of the HW interrupt corresponding to the virtual vector number. The interrupt reception physical CPU core LAPIC ID 550 is an identification number of the LAPIC of the physical CPU core 101 that receives the HW interrupt to the virtual CPU core 150.
 図6は、実施例1の仮想化管理部120が保持するVM属性テーブル133の一例を示す説明図である。 FIG. 6 is an explanatory diagram illustrating an example of the VM attribute table 133 held by the virtualization management unit 120 according to the first embodiment.
 VM属性テーブル133は、割込処理の制御モードに応じたVM140のグループを管理する情報である。VM属性テーブル133は1つのVM140に対して1つのレコードを含み、各レコードはVM番号610及びゲストOS処理優先モード620を含む。 The VM attribute table 133 is information for managing a group of VMs 140 corresponding to the interrupt processing control mode. The VM attribute table 133 includes one record for one VM 140, and each record includes a VM number 610 and a guest OS processing priority mode 620.
 VM番号610は、VM番号410と同一のものである。ゲストOS処理優先モード620は、各VM140上のゲストOS160における割込処理の制御モード、すなわち、ゲストOS処理優先モードの属性値である。ゲストOS処理優先モード620には「無効」及び「有効」のいずれかが格納される。ゲストOS処理優先モード620が「無効」の場合、ゲストOS処理優先モードが無効であること、すなわち、非優先グループ191に含まれるVM140であることを示す。一方、ゲストOS処理優先モード620が「有効」の場合、ゲストOS処理優先モードが有効であること、すなわち、優先グループ190に含まれるVM140であることを示す。 The VM number 610 is the same as the VM number 410. The guest OS processing priority mode 620 is an attribute value of the interrupt processing control mode in the guest OS 160 on each VM 140, that is, the guest OS processing priority mode. The guest OS processing priority mode 620 stores either “invalid” or “valid”. When the guest OS processing priority mode 620 is “invalid”, this indicates that the guest OS processing priority mode is invalid, that is, the VM 140 included in the non-priority group 191. On the other hand, when the guest OS processing priority mode 620 is “valid”, this indicates that the guest OS processing priority mode is valid, that is, the VM 140 included in the priority group 190.
 図7は、実施例1の仮想化管理部120が保持する物理CPUコアグループ管理テーブル134の一例を示す説明図である。 FIG. 7 is an explanatory diagram illustrating an example of the physical CPU core group management table 134 held by the virtualization management unit 120 according to the first embodiment.
 物理CPUコアグループ管理テーブル134は、物理CPUコア101のグループを管理する情報である。物理CPUコアグループ管理テーブル134は1つの物理CPUコア101のLAPICの識別番号に対して1つのレコードを含み、各レコードは物理CPUコア LAPIC ID710及び物理CPUコアグループ720を含む。 The physical CPU core group management table 134 is information for managing a group of physical CPU cores 101. The physical CPU core group management table 134 includes one record for the LAPIC identification number of one physical CPU core 101, and each record includes a physical CPU core LAPIC ID 710 and a physical CPU core group 720.
 物理CPUコア LAPIC ID710は、物理CPUコア LAPIC ID330と同一のものである。物理CPUコアグループ720は、物理CPUコア101が所属するグループを識別するための情報である。実施例1では、物理CPUコアグループ720には、第1の物理CPUコアグループ104を示す「1」、及び第2の物理CPUコアグループ105を示す「2」のいずれかが格納される。なお、初期状態では、物理CPUコアグループ720には「2」が設定されているものとする。 The physical CPU core LAPIC ID 710 is the same as the physical CPU core LAPIC ID 330. The physical CPU core group 720 is information for identifying a group to which the physical CPU core 101 belongs. In the first embodiment, the physical CPU core group 720 stores “1” indicating the first physical CPU core group 104 and “2” indicating the second physical CPU core group 105. Note that “2” is set in the physical CPU core group 720 in the initial state.
 図8は、実施例1の仮想化管理部120が保持する高速IPI制御データ135の一例を示す説明図である。 FIG. 8 is an explanatory diagram illustrating an example of the high-speed IPI control data 135 held by the virtualization management unit 120 according to the first embodiment.
 高速IPI制御データ135は、情報読出領域800及び情報書込領域810を含む。 The high-speed IPI control data 135 includes an information reading area 800 and an information writing area 810.
 情報読出領域800は、VM番号821、物理CPUコア LAPIC ID822、通知ベクタ(Notification Vector)番号823、及び仮想ベクタ番号824から構成されるテーブル、物理CPUコア LAPIC ID831及びPID(Posted Interrupt Descriptor)アドレス832から構成されるテーブルを含む。通知ベクタ番号823及びPIDアドレス832は、VMCS136に含まれる値である。また、物理IPI181には通知ベクタ番号が含まれる。 The information reading area 800 includes a table composed of a VM number 821, a physical CPU core LAPIC ID 822, a notification vector (Notification Vector) number 823, and a virtual vector number 824, a physical CPU core LAPIC ID 831 and a PID (Posted Interrupt Descriptor) address 832. Contains a table consisting of The notification vector number 823 and the PID address 832 are values included in the VMCS 136. The physical IPI 181 includes a notification vector number.
 情報書込領域810は、複数のPIDデータ840を含む。PIDデータ840は、ON(Outstanding Notification)ビット841、及びPIR(Posted Interruption Requests)ビットマップ842を含む。 The information writing area 810 includes a plurality of PID data 840. The PID data 840 includes an ON (Outstanding Notification) bit 841 and a PIR (Posted Interrupt Requests) bitmap 842.
 次に、図9から図14を用いて実施例1の物理計算機10における処理について説明する。 Next, processing in the physical computer 10 according to the first embodiment will be described with reference to FIGS.
 (ユーザがVMの割込処理の制御モードを設定する場合の処理)
 図9は、実施例1の仮想化管理部120が実行するVM属性テーブル133の設定処理の一例を説明するフローチャートである。
(Process when the user sets the control mode of VM interrupt processing)
FIG. 9 is a flowchart illustrating an example of setting processing of the VM attribute table 133 executed by the virtualization management unit 120 according to the first embodiment.
 仮想化管理部120は、設定UI139を介してユーザからVM140の割込処理の制御モードの設定情報を受け付けると以下で説明する処理を開始する。 When the virtualization management unit 120 receives the setting information of the control mode of the interrupt processing of the VM 140 from the user via the setting UI 139, the virtualization management unit 120 starts processing described below.
 仮想化管理部120は、設定UI139を介して入力された設定情報に含まれるVM140の識別番号及びゲストOS処理優先モード(VM140の割込処理の制御モード)の属性値を取得する(ステップS901)。 The virtualization management unit 120 acquires the identification number of the VM 140 and the attribute value of the guest OS processing priority mode (control mode of the interrupt processing of the VM 140) included in the setting information input via the setting UI 139 (Step S901). .
 仮想化管理部120は、ステップS901において取得された情報に基づいて、VM属性テーブル133を生成する(ステップS902)。例えば、仮想化管理部120は、物理計算機10上に生成されたVM140の数だけレコードを生成し、生成された各レコードのVM番号610にVM140の識別番号を設定し、また、各レコードのゲストOS処理優先モード620に属性値を設定する。 The virtualization management unit 120 generates the VM attribute table 133 based on the information acquired in step S901 (step S902). For example, the virtualization management unit 120 generates records as many as the number of VMs 140 generated on the physical computer 10, sets the identification number of the VM 140 to the VM number 610 of each generated record, and the guest of each record An attribute value is set in the OS processing priority mode 620.
 なお、すでに、VM属性テーブル133が生成されている場合、仮想化管理部120は、取得された情報に基づいて、VM属性テーブル133のレコードを更新する。 When the VM attribute table 133 has already been generated, the virtualization management unit 120 updates the record of the VM attribute table 133 based on the acquired information.
 (VM140の起動処理及び終了処理の開始時に実行される処理)
 図10は、実施例1の仮想化管理部120が実行する物理CPUコアグループ管理テーブル134の更新処理の一例を説明するフローチャートである。
(Processes executed at the start of the startup process and termination process of the VM 140)
FIG. 10 is a flowchart illustrating an example of an update process of the physical CPU core group management table 134 executed by the virtualization management unit 120 according to the first embodiment.
 仮想化管理部120は、VM140の起動処理又は終了処理の開始時に以下で説明する処理を開始する。なお、仮想化管理部120は、以下で説明する処理を開始する時点において、各VM140の仮想CPUコア150の構成、及び各仮想CPUコア150に割り当てる物理CPUコア101の対応関係等を管理する情報を保持しているものとする。 The virtualization management unit 120 starts processing described below at the start of the VM 140 activation processing or termination processing. The virtualization management unit 120 manages the configuration of the virtual CPU core 150 of each VM 140 and the correspondence relationship between the physical CPU cores 101 allocated to each virtual CPU core 150 at the time of starting the processing described below. Is held.
 仮想化管理部120は、VM属性テーブル133を参照して優先モードのVM140を検索し(ステップS1001)、優先モードのVM140が存在するか否かを判定する(ステップS1002)。 The virtualization manager 120 searches the VM 140 in the priority mode with reference to the VM attribute table 133 (step S1001), and determines whether the VM 140 in the priority mode exists (step S1002).
 具体的には、仮想化管理部120は、ゲストOS処理優先モード620の値が「有効」であるレコードを検索する。ゲストOS処理優先モード620の値が「有効」であるレコードが1つ以上検索された場合、仮想化管理部120は、優先モードのVM140が存在すると判定する。 Specifically, the virtualization management unit 120 searches for a record in which the value of the guest OS processing priority mode 620 is “valid”. When one or more records having a value of “valid” in the guest OS processing priority mode 620 are searched, the virtualization management unit 120 determines that the VM 140 in the priority mode exists.
 仮想化管理部120は、CPU割込識別子管理テーブル131を参照して、優先モードのVM140のそれぞれについて、当該VM140が使用する物理CPUコア101を特定する(ステップS1003)。具体的には、以下のような処理が実行される。 The virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and identifies the physical CPU core 101 used by the VM 140 for each VM 140 in the priority mode (step S1003). Specifically, the following processing is executed.
 仮想化管理部120は、ステップS1001において優先モードのVM140のレコードが複数検索された場合、処理対象のVM140のレコードを一つ選択する。例えば、仮想化管理部120は、VM番号610が小さい順にVM140のレコードを選択する。 The virtualization management unit 120 selects one VM 140 record to be processed when a plurality of priority mode VM 140 records are searched in step S1001. For example, the virtualization management unit 120 selects the records of the VM 140 in ascending order of the VM number 610.
 仮想化管理部120は、VM番号410が選択されたレコードのVM番号610と一致するレコードを検索する。仮想化管理部120は、検索されたレコードの物理CPUコア LAPIC ID430に基づいて、選択されたレコードに対応するVM140が使用する物理CPUコア101を特定する。 The virtualization management unit 120 searches for a record that matches the VM number 610 of the record for which the VM number 410 is selected. The virtualization management unit 120 identifies the physical CPU core 101 used by the VM 140 corresponding to the selected record, based on the physical CPU core LAPIC ID 430 of the retrieved record.
 仮想化管理部120は、ステップS1001において検索された全てのVM140のレコードについて前述した処理を繰り返し実行する。以上がステップS1003の処理の説明である。 The virtualization management unit 120 repeatedly executes the process described above for all the VM 140 records searched in step S1001. The above is the description of the process in step S1003.
 仮想化管理部120は、物理CPUコアグループ管理テーブル134を更新し(ステップS1004)、処理を終了する。ステップS1004の処理は、処理の契機によって内容が異なる。 The virtualization management unit 120 updates the physical CPU core group management table 134 (step S1004) and ends the process. The processing in step S1004 differs depending on the processing trigger.
 VM140の起動処理が処理の契機である場合、仮想化管理部120は、物理CPUコア LAPIC ID710がステップS1003において検索されたレコードの物理CPUコア LAPIC ID430と一致するレコードを検索する。仮想化管理部120は、検索されたレコードの物理CPUコアグループ720の値を「1」に更新する。 When the activation process of the VM 140 is a processing trigger, the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 710 matches the physical CPU core LAPIC ID 430 of the record searched in step S1003. The virtualization management unit 120 updates the value of the physical CPU core group 720 of the retrieved record to “1”.
 VM140の終了処理が処理の契機である場合、仮想化管理部120は、同様の処理によって物理CPUコアグループ管理テーブル134からレコードを検索する。さらに、仮想化管理部120は、検索されたレコードの物理CPUコアグループ720の値を「2」に更新する。 When the VM 140 end process is a trigger for processing, the virtualization management unit 120 searches for a record from the physical CPU core group management table 134 by the same processing. Furthermore, the virtualization management unit 120 updates the value of the physical CPU core group 720 of the retrieved record to “2”.
 (ゲストOSの割込み設定時の仮想化管理部の処理)
 図11は、実施例1の仮想化管理部120が実行するゲストOS160の割込設定処理の一例を説明するフローチャートである。
(Processing of the virtualization management unit when setting the guest OS interrupt)
FIG. 11 is a flowchart illustrating an example of an interrupt setting process of the guest OS 160 executed by the virtualization management unit 120 according to the first embodiment.
 仮想化管理部120は、ゲストOS160からの割込スケジューリング設定185、又は、デバイスドライバ170の割込設定184を検知した場合に、以下で説明する処理を開始する。 When the virtualization management unit 120 detects the interrupt scheduling setting 185 from the guest OS 160 or the interrupt setting 184 of the device driver 170, the virtualization management unit 120 starts processing described below.
 仮想化管理部120は、デバイスドライバ170からの割込設定184又はゲストOS160からの割込スケジューリング設定185を検知した場合、割込設定184又は割込スケジューリング設定185をトラップする(ステップS1101)。このとき、仮想化管理部120は、トラップした割込設定184又は割込スケジューリング設定185から、対象のVM140の識別番号、対象の仮想ベクタ番号、割込デバイスタイプ、及び割込先の仮想CPUコア150のLAPICの識別番号等を取得する。 When the virtualization management unit 120 detects the interrupt setting 184 from the device driver 170 or the interrupt scheduling setting 185 from the guest OS 160, the virtualization management unit 120 traps the interrupt setting 184 or the interrupt scheduling setting 185 (step S1101). At this time, the virtualization management unit 120 determines the identification number of the target VM 140, the target virtual vector number, the interrupt device type, and the virtual CPU core of the interrupt destination from the trapped interrupt setting 184 or interrupt scheduling setting 185. The identification number of 150 LAPIC is acquired.
 仮想化管理部120は、VM属性テーブル133を参照して、対象のVM140が優先モードのVM140であるか否かを判定する(ステップS1102)。 The virtualization management unit 120 refers to the VM attribute table 133 and determines whether or not the target VM 140 is the VM 140 in the priority mode (step S1102).
 具体的には、仮想化管理部120は、VM番号610がステップS1101において取得された対象のVM140の識別番号と一致するレコードを検索し、検索されたレコードのゲストOS処理優先モード620が「有効」であるか否かを判定する。検索されたレコードのゲストOS処理優先モード620が「有効」である場合、仮想化管理部120は、対象のVM140が優先モードのVM140であると判定する。 Specifically, the virtualization management unit 120 searches for a record in which the VM number 610 matches the identification number of the target VM 140 acquired in step S1101, and the guest OS processing priority mode 620 of the searched record is “valid. Is determined. When the guest OS processing priority mode 620 of the retrieved record is “valid”, the virtualization management unit 120 determines that the target VM 140 is the VM 140 in the priority mode.
 対象のVM140が優先モードのVM140でないと判定された場合、仮想化管理部120は、処理を終了する。 When it is determined that the target VM 140 is not the VM 140 in the priority mode, the virtualization management unit 120 ends the process.
 対象のVM140が優先モードのVM140であると判定された場合、仮想化管理部120は、物理ベクタ番号管理テーブル130を参照して、物理ベクタ番号を取得する(ステップS1103)。 When it is determined that the target VM 140 is the VM 140 in the priority mode, the virtualization management unit 120 refers to the physical vector number management table 130 and acquires a physical vector number (step S1103).
 具体的には、仮想化管理部120は、割込デバイスタイプ220がステップS1101において取得された割込デバイスタイプと一致するレコードを検索し、検索されたレコードの物理ベクタ番号210から物理ベクタ番号を取得する。 Specifically, the virtualization management unit 120 searches for a record in which the interrupt device type 220 matches the interrupt device type acquired in step S1101, and obtains a physical vector number from the physical vector number 210 of the searched record. get.
 仮想化管理部120は、対象のVM140の識別番号、仮想ベクタ番号、割込先の仮想CPUコア150のLAPICの識別番号、及び物理ベクタ番号の組合せをVM割込デバイス記述レコードとして特定する(ステップS1104)。 The virtualization management unit 120 specifies the combination of the identification number of the target VM 140, the virtual vector number, the LAPIC identification number of the interrupted virtual CPU core 150, and the physical vector number as a VM interrupt device description record (step S1104).
 仮想化管理部120は、トラップした割込設定184又は割込スケジューリング設定185の割込マスクの設定が「あり」であるか否かを判定する(ステップS1105)。例えば、仮想化管理部120は、予め設定された割込マスクの設定情報に基づいて判定する。 The virtualization manager 120 determines whether the interrupt mask setting of the trapped interrupt setting 184 or the interrupt scheduling setting 185 is “Yes” (step S1105). For example, the virtualization management unit 120 makes a determination based on preset interrupt mask setting information.
 割込マスクの設定が「なし」である場合、仮想化管理部120は、ステップS1104において特定されたVM割込デバイス記述レコードに基づいて、VM割込デバイス管理テーブル132にレコードを追加する(ステップS1106)。 If the interrupt mask setting is “none”, the virtualization management unit 120 adds a record to the VM interrupt device management table 132 based on the VM interrupt device description record specified in step S1104 (step S1104). S1106).
 具体的には、仮想化管理部120は、VM割込デバイス管理テーブル132に一つのレコードを追加し、追加されたレコードの物理ベクタ番号510、VM番号520、仮想ベクタ番号530、及び仮想CPUコア LAPIC ID540のそれぞれに、VM割込デバイス記述レコードに含まれる値を設定する。なお、この時点では、VM割込デバイス管理テーブル132に追加されたレコードの割込受信物理CPUコア LAPIC ID550は空欄の状態である。 Specifically, the virtualization management unit 120 adds one record to the VM interrupt device management table 132, and adds the physical vector number 510, VM number 520, virtual vector number 530, and virtual CPU core of the added record. The value included in the VM interrupt device description record is set for each LAPIC ID 540. At this time, the interrupt reception physical CPU core LAPIC ID 550 of the record added to the VM interrupt device management table 132 is blank.
 仮想化管理部120は、高速IPI制御データ135に情報を追加し、また、対象のVM140のVMCS136を更新する(ステップS1107)。具体的には、以下のような処理が実行される。 The virtualization manager 120 adds information to the high-speed IPI control data 135 and updates the VMCS 136 of the target VM 140 (step S1107). Specifically, the following processing is executed.
 仮想化管理部120は、CPU割込識別子管理テーブル131を参照し、VM番号410が、VM割込デバイス記述レコードのVM140の識別番号と一致するレコードを検索し、さらに、検索されたレコードの仮想CPUコア LAPIC ID420がVM割込デバイス記述レコードの仮想CPUコア150のLAPICの識別番号と一致する行を検索する。仮想化管理部120は、検索された行の物理CPUコア LAPIC ID430の値を取得する。 The virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and searches for a record in which the VM number 410 matches the identification number of the VM 140 in the VM interrupt device description record. The CPU core LAPIC ID 420 is searched for a line that matches the LAPIC identification number of the virtual CPU core 150 in the VM interrupt device description record. The virtualization management unit 120 acquires the value of the physical CPU core LAPIC ID 430 of the searched row.
 仮想化管理部120は、高速IPI制御データ135の情報読出領域800に含まれる上側のテーブルにレコードを追加する。さらに、仮想化管理部120は、追加されたレコードのVM番号821及び仮想ベクタ番号824には、VM割込デバイス記述レコードに含まれる値を設定し、また、物理CPUコア LAPIC ID822には物理CPUコア LAPIC ID430から取得された値を設定する。また、仮想化管理部120は、通知ベクタ番号823に転送が必要であることを示す任意の固有値を設定する。 The virtualization manager 120 adds a record to the upper table included in the information reading area 800 of the high-speed IPI control data 135. Further, the virtualization management unit 120 sets the value included in the VM interrupt device description record in the VM number 821 and the virtual vector number 824 of the added record, and the physical CPU core LAPIC ID 822 has a physical CPU. Set the value obtained from the core LAPIC ID430. In addition, the virtualization management unit 120 sets an arbitrary unique value indicating that transfer is necessary for the notification vector number 823.
 また、仮想化管理部120は、物理CPUコア LAPIC ID831が物理CPUコア LAPIC ID430から取得された値と一致するレコードを検索し、対象の物理CPUコア101のPIDアドレス832からアドレスを取得する。仮想化管理部120は、取得されたアドレス、及び高速IPI制御データ135に追加したレコードの通知ベクタ番号823の値をVMCS136に設定する。以上がステップS1107の処理の説明である。 Also, the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the value acquired from the physical CPU core LAPIC ID 430 and acquires the address from the PID address 832 of the target physical CPU core 101. The virtualization manager 120 sets the acquired address and the value of the notification vector number 823 of the record added to the high-speed IPI control data 135 in the VMCS 136. The above is the description of the process in step S1107.
 仮想化管理部120は、第2の物理CPUコアグループ105に含まれる任意の物理CPUコア101に対して割込ハンドラ137を登録し、また、VM割込デバイス管理テーブル132を更新する(ステップS1108)。その後、仮想化管理部120は、処理を終了する。具体的には以下のような処理が実行される。 The virtualization management unit 120 registers the interrupt handler 137 for any physical CPU core 101 included in the second physical CPU core group 105, and updates the VM interrupt device management table 132 (step S1108). ). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
 仮想化管理部120は、物理CPUコアグループ管理テーブル134を参照して、物理CPUコアグループ720が「2」であるレコードを一つ選択する。すなわち、第2の物理CPUコアグループ105に含まれる物理CPUコア101の中から、優先モードのVM140に割り当てられた割込デバイス116からの割込みを受信する物理CPUコア101が選択される。 The virtualization management unit 120 refers to the physical CPU core group management table 134 and selects one record whose physical CPU core group 720 is “2”. That is, the physical CPU core 101 that receives an interrupt from the interrupt device 116 assigned to the VM 140 in the priority mode is selected from the physical CPU cores 101 included in the second physical CPU core group 105.
 前述した物理CPUコア101を選択する方法は様々考えられる。例えば、仮想化管理部120は、物理CPUコア LAPIC ID710の値が小さいものを優先的に選択する。また、仮想化管理部120は、CPU割込識別子管理テーブル131を参照して、VM140に割り当てられていない物理CPUコア101を選択する。なお、前述した選択方法は一例であってこれに限定されない。 There are various methods for selecting the physical CPU core 101 described above. For example, the virtualization management unit 120 preferentially selects a physical CPU core LAPIC ID 710 having a small value. Also, the virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and selects a physical CPU core 101 that is not assigned to the VM 140. The selection method described above is an example, and the present invention is not limited to this.
 仮想化管理部120は、選択されたレコードの物理CPUコア LAPIC ID710に対応する物理CPUコア101の割込ハンドラレジスタ103に割込ハンドラ137を登録する。なお、割込ハンドラ137は、図13において説明する一連の処理を実現する実行コードである。また、仮想化管理部120は、ステップS1106においてVM割込デバイス管理テーブル132に追加されたレコードの割込受信物理CPUコア LAPIC ID550に、選択されたレコードの物理CPUコア LAPIC ID710の値を設定する。 The virtualization manager 120 registers the interrupt handler 137 in the interrupt handler register 103 of the physical CPU core 101 corresponding to the physical CPU core LAPIC ID 710 of the selected record. The interrupt handler 137 is an execution code that implements a series of processes described in FIG. Further, the virtualization management unit 120 sets the value of the physical CPU core LAPIC ID 710 of the selected record in the interrupt reception physical CPU core LAPIC ID 550 of the record added to the VM interrupt device management table 132 in step S1106. .
 なお、実施例1では、仮想化管理部120は、HW割込180を受信する物理CPUコア101を1つ選択していたが、2つ以上選択してもよい。この場合、割込受信物理CPUコア LAPIC ID550には、複数の物理CPUコア101のLAPICの識別番号が設定される。以上がステップS1108の処理の説明である。 In the first embodiment, the virtualization management unit 120 selects one physical CPU core 101 that receives the HW interrupt 180, but two or more physical CPU cores 101 may be selected. In this case, the LAPIC identification numbers of the plurality of physical CPU cores 101 are set in the interrupt reception physical CPU core LAPIC ID 550. The above is the description of the processing in step S1108.
 ステップS1105において割込マスクの設定が「あり」である場合、仮想化管理部120は、ステップS1104において特定されたVM割込デバイス記述レコードに基づいて、VM割込デバイス管理テーブル132からレコードを削除する(ステップS1109)。 If the interrupt mask setting is “Yes” in step S1105, the virtualization management unit 120 deletes the record from the VM interrupt device management table 132 based on the VM interrupt device description record specified in step S1104. (Step S1109).
 具体的には、仮想化管理部120は、物理ベクタ番号510、VM番号520、仮想ベクタ番号530、及び仮想CPUコア LAPIC ID540のそれぞれの値がVM割込デバイス記述レコードの値と一致するレコードを検索し、検索されたレコードを削除する。このとき、仮想化管理部120は、検索されたレコードの割込受信物理CPUコア LAPIC ID550の値を一時的に保持する。 Specifically, the virtualization management unit 120 displays a record in which each value of the physical vector number 510, the VM number 520, the virtual vector number 530, and the virtual CPU core LAPIC ID 540 matches the value of the VM interrupt device description record. Search and delete searched records. At this time, the virtualization management unit 120 temporarily holds the value of the interrupt reception physical CPU core LAPIC ID 550 of the retrieved record.
 仮想化管理部120は、高速IPI制御データ135から情報を削除し、また、対象のVM140のVMCS136を更新する(ステップS1110)。 The virtualization management unit 120 deletes information from the high-speed IPI control data 135, and updates the VMCS 136 of the target VM 140 (step S1110).
 具体的には、仮想化管理部120は、情報読出領域800のVM番号821及び仮想ベクタ番号824が、VM割込デバイス記述レコードに含まれるVM140の識別番号及び仮想ベクタ番号に一致するレコード又は行を削除する。また、仮想化管理部120は、VMCS136からPIDアドレス832の値を削除する。 Specifically, the virtualization management unit 120 records or records that the VM number 821 and the virtual vector number 824 of the information read area 800 match the identification number and virtual vector number of the VM 140 included in the VM interrupt device description record. Is deleted. In addition, the virtualization management unit 120 deletes the value of the PID address 832 from the VMCS 136.
 仮想化管理部120は、優先モードのVM140に対するHW割込180を受信するための割込ハンドラ137を削除する(ステップS1111)。その後、仮想化管理部120は、処理を終了する。 The virtualization management unit 120 deletes the interrupt handler 137 for receiving the HW interrupt 180 for the VM 140 in the priority mode (step S1111). Thereafter, the virtualization management unit 120 ends the process.
 具体的には、仮想化管理部120は、ステップS1109において削除したレコードの割込受信物理CPUコア LAPIC ID550の値に基づいて、優先モードのVM140に対するHW割込180を受信する物理CPUコア101を特定する。仮想化管理部120は、特定された物理CPUコア101の割込ハンドラレジスタ103から割込ハンドラ137を削除する。 Specifically, the virtualization management unit 120 selects the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode based on the value of the interrupt reception physical CPU core LAPIC ID 550 of the record deleted in step S1109. Identify. The virtualization manager 120 deletes the interrupt handler 137 from the interrupt handler register 103 of the specified physical CPU core 101.
 なお、本処理では、CPU割込識別子管理テーブル131の仮想CPUコア LAPIC ID420も更新されるが、一般的な処理であるため省略する。また、ステップS1106からステップS1108までの処理は、整合性が保たれるように処理の順番を変更してもよし、また、処理内容を変更してもよい。例えば、ステップS1106において、仮想化管理部120は、HW割込180を受け付ける物理CPUコア101を選択した後に、VM割込デバイス管理テーブル132にレコードを追加してもよい。 In this process, the virtual CPU core LAPIC ID 420 in the CPU interrupt identifier management table 131 is also updated, but is omitted because it is a general process. Further, the processing order from step S1106 to step S1108 may be changed so that consistency is maintained, and the processing content may be changed. For example, in step S1106, the virtualization management unit 120 may add a record to the VM interrupt device management table 132 after selecting the physical CPU core 101 that accepts the HW interrupt 180.
 (仮想化管理部による仮想CPUコアスケジューリング時の処理)
 図12は、実施例1の仮想化管理部120が仮想CPUコアスケジューリング時に実行する処理を説明するフローチャートである。
(Processing during virtual CPU core scheduling by the virtualization manager)
FIG. 12 is a flowchart for describing processing executed by the virtualization management unit 120 according to the first embodiment during virtual CPU core scheduling.
 ここで、仮想CPUコアスケジューリングとは、各VM140の仮想CPUコア150に割り当てられる物理CPUコア101を変更する処理を示す。以下で説明する処理は、仮想CPUコアスケジューリング後に実行される。なお、処理の開始時に、スケジューリング対象のVM140の識別番号、スケジューリング対象の仮想CPUコア150のLAPICの識別番号、仮想CPUコアスケジューリング前にスケジューリング対象の仮想CPUコア150に割り当てられていた物理CPUコア101のLAPICの識別番号、及び仮想CPUコアスケジューリング後にスケジューリング対象の仮想CPUコア150に割り当てられる物理CPUコア101のLAPICの識別番号を組み合わせた処理結果が入力される。 Here, the virtual CPU core scheduling indicates a process of changing the physical CPU core 101 assigned to the virtual CPU core 150 of each VM 140. The process described below is executed after virtual CPU core scheduling. At the start of the process, the identification number of the VM 140 to be scheduled, the identification number of the LAPIC of the virtual CPU core 150 to be scheduled, and the physical CPU core 101 assigned to the virtual CPU core 150 to be scheduled before virtual CPU core scheduling The processing result obtained by combining the identification number of the LAPIC and the identification number of the LAPIC of the physical CPU core 101 assigned to the virtual CPU core 150 to be scheduled after virtual CPU core scheduling is input.
 なお、以下の説明では、仮想CPUコアスケジューリング前に仮想CPUコア150に割り当てられていた物理CPUコア101を解除物理CPUコア101とも記載し、また、仮想CPUコアスケジューリング後に仮想CPUコア150に割り当てられる物理CPUコア101を割当物理CPUコア101とも記載する。 In the following description, the physical CPU core 101 assigned to the virtual CPU core 150 before the virtual CPU core scheduling is also referred to as a released physical CPU core 101, and is assigned to the virtual CPU core 150 after the virtual CPU core scheduling. The physical CPU core 101 is also referred to as an assigned physical CPU core 101.
 複数の処理結果が入力された場合、仮想化管理部120は、対象の処理結果を一つ選択し、選択された処理結果に対してステップS1201からステップS1207の処理を実行する。また、仮想化管理部120は、選択された処理結果についてステップS1201からステップS1207までの処理が完了した場合、他の処理結果を選択し、同様の処理を実行する。 When a plurality of processing results are input, the virtualization management unit 120 selects one target processing result, and executes the processing from step S1201 to step S1207 on the selected processing result. Further, when the processing from step S1201 to step S1207 is completed for the selected processing result, the virtualization management unit 120 selects another processing result and executes the same processing.
 仮想化管理部120は、VM属性テーブル133を参照し(ステップS1201)、スケジューリング対象のVM140が優先モードのVM140であるか否かを判定する(ステップS1202)。 The virtualization management unit 120 refers to the VM attribute table 133 (step S1201), and determines whether the scheduling target VM 140 is the VM 140 in the priority mode (step S1202).
 具体的には、仮想化管理部120は、VM番号610がスケジューリング対象のVM140の識別番号と一致するレコードを検索し、検索されたレコードのゲストOS処理優先モード620が「有効」であるか否かを判定する。ゲストOS処理優先モード620が「有効」である場合、スケジューリング対象のVM140が優先モードのVM140であると判定される。 Specifically, the virtualization management unit 120 searches for a record in which the VM number 610 matches the identification number of the VM 140 to be scheduled, and whether or not the guest OS processing priority mode 620 of the searched record is “valid”. Determine whether. When the guest OS processing priority mode 620 is “valid”, it is determined that the scheduling target VM 140 is the VM 140 in the priority mode.
 スケジューリング対象のVM140が優先モードのVM140であると判定された場合、仮想化管理部120は、解除物理CPUコア101を特定する(ステップS1203)。仮想化管理部120は、特定された解除物理CPUコア101が所属するCPUコアのグループを第1の物理CPUコアグループ104から第2の物理CPUコアグループ105に変更する(ステップS1204)。 When it is determined that the scheduling target VM 140 is the VM 140 in the priority mode, the virtualization management unit 120 identifies the release physical CPU core 101 (step S1203). The virtualization manager 120 changes the group of CPU cores to which the identified release physical CPU core 101 belongs from the first physical CPU core group 104 to the second physical CPU core group 105 (step S1204).
 具体的には、仮想化管理部120は、処理結果に基づいて、解除物理CPUコア101のLAPICの識別番号を特定する。仮想化管理部120は、物理CPUコアグループ管理テーブル134を参照し、物理CPUコア LAPIC ID710が特定された解除物理CPUコア101のLAPIC IDの値と一致するレコードを検索する。仮想化管理部120は、検索されたレコードの物理CPUコアグループ720に「2」を設定する。 Specifically, the virtualization management unit 120 specifies the LAPIC identification number of the release physical CPU core 101 based on the processing result. The virtualization management unit 120 refers to the physical CPU core group management table 134 and searches for a record that matches the value of the LAPIC ID of the release physical CPU core 101 in which the physical CPU core LAPIC ID 710 is specified. The virtualization manager 120 sets “2” to the physical CPU core group 720 of the retrieved record.
 仮想化管理部120は、割当物理CPUコア101のLAPICの識別番号を高速IPI制御データ135に設定し、また、VMCS136を更新する(ステップS1205)。その後、仮想化管理部120は、処理を終了する。具体的には、以下のような処理が実行される。 The virtualization management unit 120 sets the LAPIC identification number of the allocated physical CPU core 101 in the high-speed IPI control data 135 and updates the VMCS 136 (step S1205). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
 仮想化管理部120は、VM番号821がスケジューリング対象のVM140の識別番号と一致するレコードを検索する。また、仮想化管理部120は、検索されたレコードの物理CPUコア LAPIC ID822が解除物理CPUコア101のLAPICの識別番号に一致するレコードを検索する。仮想化管理部120は、検索された行の物理CPUコア LAPIC ID822に、割当物理CPUコア101のLAPICの識別番号を上書きする。 The virtualization management unit 120 searches for a record in which the VM number 821 matches the identification number of the VM 140 to be scheduled. Further, the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 822 of the retrieved record matches the LAPIC identification number of the release physical CPU core 101. The virtualization manager 120 overwrites the physical CPU core LAPIC ID 822 of the retrieved row with the LAPIC identification number of the assigned physical CPU core 101.
 また、仮想化管理部120は、物理CPUコア LAPIC ID831が、割当物理CPUコア101のLAPICに一致するレコードを検索し、検索されたレコードのPIDアドレス832をVMCS136に設定する。以上がステップS1205の処理の説明である。 Also, the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the LAPIC of the assigned physical CPU core 101, and sets the PID address 832 of the searched record in the VMCS 136. The above is the description of the processing in step S1205.
 ステップS1202において、対象のVM140が優先モードのVM140でないと判定された場合、仮想化管理部120は、VM割込デバイス管理テーブル132に解除物理CPUコア101のレコードが存在するか否かを判定する(ステップS1206)。 If it is determined in step S1202 that the target VM 140 is not the VM 140 in the priority mode, the virtualization management unit 120 determines whether there is a record of the released physical CPU core 101 in the VM interrupt device management table 132. (Step S1206).
 具体的には、仮想化管理部120は、VM割込デバイス管理テーブル132を参照し、割込受信物理CPUコア LAPIC ID550が解除物理CPUコア101のLAPICの識別番号と一致するレコードを検索する。 Specifically, the virtualization management unit 120 refers to the VM interrupt device management table 132 and searches for a record in which the interrupt reception physical CPU core LAPIC ID 550 matches the identification number of the LAPIC of the release physical CPU core 101.
 VM割込デバイス管理テーブル132に解除物理CPUコア101のレコードが存在すると判定された場合、仮想化管理部120は、処理を終了する。 When it is determined that the record of the released physical CPU core 101 exists in the VM interrupt device management table 132, the virtualization management unit 120 ends the process.
 VM割込デバイス管理テーブル132に解除物理CPUコア101のレコードが存在すると判定された場合、仮想化管理部120は、解除物理CPUコア101及び割当物理CPUコア101に対する割込ハンドラ137の設定を行い、また、VM割込デバイス管理テーブル132を更新する(ステップS1207)。その後、仮想化管理部120は、処理を終了する。具体的には以下のような処理が実行される。 When it is determined that there is a record of the released physical CPU core 101 in the VM interrupt device management table 132, the virtualization management unit 120 sets the interrupt handler 137 for the released physical CPU core 101 and the assigned physical CPU core 101. Also, the VM interrupt device management table 132 is updated (step S1207). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
 仮想化管理部120は、解除物理CPUコア101の割込ハンドラレジスタ103から割込ハンドラ137を削除する。また、仮想化管理部120は、割当物理CPUコア101の割込ハンドラレジスタ103に削除された割込ハンドラ137を登録する。 The virtualization manager 120 deletes the interrupt handler 137 from the interrupt handler register 103 of the release physical CPU core 101. Also, the virtualization management unit 120 registers the deleted interrupt handler 137 in the interrupt handler register 103 of the assigned physical CPU core 101.
 仮想化管理部120は、VM番号520が対象のVM140の識別番号と一致するレコードの割込受信物理CPUコア LAPIC ID550から解除物理CPUコア101のLAPICの識別番号を削除し、割当物理CPUコア101のLAPICの識別番号を設定する。 The virtualization management unit 120 deletes the LAPIC identification number of the release physical CPU core 101 from the interrupt reception physical CPU core LAPIC ID 550 of the record whose VM number 520 matches the identification number of the target VM 140, and allocates the physical CPU core 101 The identification number of LAPIC is set.
 また、仮想化管理部120は、仮想CPUコアスケジューリングの処理結果に基づいて、CPU割込識別子管理テーブル131の物理CPUコア LAPIC ID430も更新する。なお、CPU割込識別子管理テーブル131の更新は公知の技術であるため説明を省略する。 Further, the virtualization management unit 120 also updates the physical CPU core LAPIC ID 430 of the CPU interrupt identifier management table 131 based on the processing result of the virtual CPU core scheduling. Note that the update of the CPU interrupt identifier management table 131 is a known technique, and thus the description thereof is omitted.
 (HW割込が発生した場合の仮想化管理部の処理)
 図13は、実施例1の仮想化管理部120が実行する割込調停処理を説明するフローチャートである。
(Processing of the virtualization manager when a HW interrupt occurs)
FIG. 13 is a flowchart illustrating the interrupt arbitration process executed by the virtualization management unit 120 according to the first embodiment.
 実施例1では、各割込デバイス116からのHW割込180は第2の物理CPUコアグループ105に所属する物理CPUコア101が受信する。このとき、物理CPUコア101はnon-rootモードからrootモードに遷移し、当該物理CPUコア101によって実行される仮想化管理部120が以下の処理を開始する。 In the first embodiment, the physical CPU core 101 belonging to the second physical CPU core group 105 receives the HW interrupt 180 from each interrupt device 116. At this time, the physical CPU core 101 transitions from the non-root mode to the root mode, and the virtualization management unit 120 executed by the physical CPU core 101 starts the following processing.
 仮想化管理部120は、受信したHW割込180を解析し、解析結果に基づいて当該HW割込180を転送する必要があるか否かを判定する(ステップS1301)。すなわち、他の物理CPUコア101にHW割込180を転送する必要があるか否かが判定される。 The virtualization manager 120 analyzes the received HW interrupt 180 and determines whether or not the HW interrupt 180 needs to be transferred based on the analysis result (step S1301). That is, it is determined whether it is necessary to transfer the HW interrupt 180 to another physical CPU core 101.
 例えば、受信したHW割込180がPCIeに基づくMSI-X割込である場合、仮想化管理部120は、VM割込デバイス管理テーブル132を参照し、物理ベクタ番号510が受信したMSI-X割込に含まれる物理ベクタ番号と一致するレコードが存在するか否かを判定する。VM割込デバイス管理テーブル132に前述した条件を満たすレコードが存在する場合、仮想化管理部120は、受信したHW割込180を転送する必要があると判定する。 For example, when the received HW interrupt 180 is an MSI-X interrupt based on PCIe, the virtualization management unit 120 refers to the VM interrupt device management table 132 and receives the MSI-X interrupt received by the physical vector number 510. It is determined whether there is a record that matches the physical vector number included in the file. If there is a record that satisfies the above-described condition in the VM interrupt device management table 132, the virtualization management unit 120 determines that the received HW interrupt 180 needs to be transferred.
 また、受信したHW割込180が物理CPUコア101のタイマ割込である場合、仮想化管理部120は、VM割込デバイス管理テーブル132に当該タイマ割込に含まれる物理ベクタ番号と一致するレコードが存在するか否かを判定する。前述した条件を満たすレコードが存在する場合、仮想化管理部120は、さらに、タイマスケジューラ138が次に割込を出すべきと判定したVM140が優先モードのVM140であるか否かを判定する。VM140が優先モードのVM140である場合、仮想化管理部120は、受信したHW割込180を転送する必要があると判定する。 When the received HW interrupt 180 is a timer interrupt of the physical CPU core 101, the virtualization management unit 120 records in the VM interrupt device management table 132 a record that matches the physical vector number included in the timer interrupt. It is determined whether or not exists. If there is a record that satisfies the above-described condition, the virtualization management unit 120 further determines whether or not the VM 140 that the timer scheduler 138 determines to issue an interrupt next is the VM 140 in the priority mode. When the VM 140 is the VM 140 in the priority mode, the virtualization management unit 120 determines that the received HW interrupt 180 needs to be transferred.
 受信したHW割込180を転送する必要があると判定された場合、仮想化管理部120は、VM割込デバイス管理テーブル132を参照し、受信したHW割込180の転送先のVM140の情報を取得する(ステップS1302)。 When it is determined that it is necessary to transfer the received HW interrupt 180, the virtualization management unit 120 refers to the VM interrupt device management table 132 and obtains information on the VM 140 that is the transfer destination of the received HW interrupt 180. Obtain (step S1302).
 具体的には、仮想化管理部120は、物理ベクタ番号510が受信したHW割込180に含まれる物理ベクタ番号と一致するレコードを検索し、検索されたレコードのVM番号520、仮想ベクタ番号530、及び仮想CPUコア LAPIC ID540の値を取得する。 Specifically, the virtualization management unit 120 searches for a record in which the physical vector number 510 matches the physical vector number included in the received HW interrupt 180, and the VM number 520 and virtual vector number 530 of the searched record. And the value of the virtual CPU core LAPIC ID 540 is acquired.
 仮想化管理部120は、CPU割込識別子管理テーブル131を参照し、受信したHW割込180を転送する物理CPUコア101を特定する(ステップS1303)。 The virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and identifies the physical CPU core 101 to which the received HW interrupt 180 is transferred (step S1303).
 具体的には、仮想化管理部120は、VM番号410がVM番号520から取得された値と一致し、かつ、仮想CPUコア LAPIC ID420が仮想CPUコア LAPIC ID540から取得された値と一致する行を検索する。仮想化管理部120は、検索された行の物理CPUコア LAPIC ID430の値を取得する。 Specifically, the virtualization management unit 120 determines that the VM number 410 matches the value acquired from the VM number 520, and the virtual CPU core LAPIC ID 420 matches the value acquired from the virtual CPU core LAPIC ID 540. Search for. The virtualization management unit 120 acquires the value of the physical CPU core LAPIC ID 430 of the searched row.
 仮想化管理部120は、物理IPI181に仮想ベクタ番号を設定するために、高速IPI制御データ135のPIDデータ840を更新する(ステップS1304)。具体的には、以下のような処理が実行される。 The virtualization manager 120 updates the PID data 840 of the high-speed IPI control data 135 in order to set the virtual vector number in the physical IPI 181 (step S1304). Specifically, the following processing is executed.
 仮想化管理部120は、物理CPUコア LAPIC ID831が物理CPUコア LAPIC ID430の値と一致するレコードを検索する。仮想化管理部120は、検索されたレコードのPIDアドレス832の値に基づいて、PIDデータ840を読み出す。 The virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the value of the physical CPU core LAPIC ID 430. The virtualization management unit 120 reads the PID data 840 based on the value of the PID address 832 of the retrieved record.
 仮想化管理部120は、PIDデータ840のPIRビットマップ842に含まれるビットのうち、ステップS1302において仮想ベクタ番号530から取得された値に対応するビットを有効化する。例えば、仮想ベクタ番号530の値が「x」の場合、仮想化管理部120は、PIRビットマップ842における「x」番目のビットの値を「1」に更新する。 The virtualization management unit 120 validates the bit corresponding to the value acquired from the virtual vector number 530 in step S1302 among the bits included in the PIR bitmap 842 of the PID data 840. For example, when the value of the virtual vector number 530 is “x”, the virtualization management unit 120 updates the value of the “x” -th bit in the PIR bitmap 842 to “1”.
 また、仮想化管理部120は、ONビット841が有効化されているか否かを判定する。ONビット841が有効化されていない場合、仮想化管理部120は、ONビット841を有効化する。例えば、仮想化管理部120は、ONビット841が「1」であるか否かを判定し、ONビット841が「0」の場合には当該ビットの値を「1」に更新する。以上がステップS1304の処理の説明である。 Further, the virtualization management unit 120 determines whether or not the ON bit 841 is enabled. When the ON bit 841 is not enabled, the virtualization management unit 120 enables the ON bit 841. For example, the virtualization management unit 120 determines whether the ON bit 841 is “1”, and updates the value of the bit to “1” when the ON bit 841 is “0”. The above is the description of the processing in step S1304.
 仮想化管理部120は、優先モードのVM140の仮想CPUコア150に割り当てられた物理CPUコア101への物理IPI181を発行する(ステップS1305)。その後、仮想化管理部120は、処理を終了する。具体的には、以下のような処理が実行される。 The virtualization management unit 120 issues a physical IPI 181 to the physical CPU core 101 assigned to the virtual CPU core 150 of the VM 140 in the priority mode (step S1305). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
 仮想化管理部120は、情報読出領域800を参照し、VM番号821、仮想ベクタ番号824、及び物理CPUコア LAPIC ID822が、仮想ベクタ番号530、仮想CPUコア LAPIC ID540、及び物理CPUコア LAPIC ID430の値と一致するレコードを検索する。仮想化管理部120は、検索されたレコードの通知ベクタ番号823の値を取得する。 The virtualization management unit 120 refers to the information reading area 800, the VM number 821, the virtual vector number 824, and the physical CPU core LAPIC ID 822 are the virtual vector number 530, the virtual CPU core LAPIC ID 540, and the physical CPU core LAPIC ID 430. Search for records that match the value. The virtualization management unit 120 acquires the value of the notification vector number 823 of the retrieved record.
 仮想化管理部120は、ステップS1303において特定された物理CPUコアに対して、通知ベクタ番号823の値が付加された物理IPI181を発行する。以上がステップS1305の処理の説明である。 The virtualization management unit 120 issues a physical IPI 181 to which the value of the notification vector number 823 is added to the physical CPU core specified in step S1303. The above is the description of the processing in step S1305.
 なお、物理IPI181を受信した物理CPUコア101は、以下のような処理を実行する。 The physical CPU core 101 that has received the physical IPI 181 executes the following processing.
 まず、物理IPI181を受信した物理CPUコア101は、高速IPI制御データ135を参照し、物理CPUコア LAPIC ID831が当該物理CPUコア101のLAPICの識別番号と一致するレコードを検索する。物理CPUコア101は、検索されたレコードのPIDアドレス832の値に基づいて、PIDデータ840へアクセスし、PIDデータ840からPIRビットマップ842の値を読み出す。物理CPUコア101は、読み出されたPIRビットマップ842の各ビットの値から仮想ベクタ番号を特定する。例えば、xビット目のビットの値が「1」の場合、仮想ベクタ番号は「x」となる。 First, the physical CPU core 101 that has received the physical IPI 181 refers to the high-speed IPI control data 135 and searches for a record in which the physical CPU core LAPIC ID 831 matches the identification number of the LAPIC of the physical CPU core 101. The physical CPU core 101 accesses the PID data 840 based on the value of the PID address 832 of the retrieved record, and reads the value of the PIR bitmap 842 from the PID data 840. The physical CPU core 101 specifies a virtual vector number from the value of each bit of the read PIR bitmap 842. For example, when the value of the xth bit is “1”, the virtual vector number is “x”.
 物理IPI181を受信した物理CPUコア101は、CPU割込識別子管理テーブル131を参照して、物理CPUコア LAPIC ID430が当該物理CPUコア101のLAPICの識別番号と一致する行を検索する。物理IPI181を受信した物理CPUコア101は、検索された行の仮想CPUコア LAPIC ID420に対応する仮想CPUコア150に対して、特定された仮想ベクタ番号を含む仮想割込183を発行する。以上が、物理IPI181を受信した物理CPUコア101の処理の説明である。 The physical CPU core 101 that has received the physical IPI 181 refers to the CPU interrupt identifier management table 131 and searches for a row in which the physical CPU core LAPIC ID 430 matches the identification number of the LAPIC of the physical CPU core 101. The physical CPU core 101 that has received the physical IPI 181 issues a virtual interrupt 183 including the identified virtual vector number to the virtual CPU core 150 corresponding to the virtual CPU core LAPIC ID 420 in the retrieved row. The above is the description of the processing of the physical CPU core 101 that has received the physical IPI 181.
 ステップS1301において、受信したHW割込180を転送する必要がないと判定された場合、HW割込180を受信した物理CPUコア101によって実行される仮想化管理部120は、通常と同様に、非優先グループのVM140の仮想CPUコア150に仮想割込186を発行する(ステップS1306)。その後、仮想化管理部120は、処理を終了する。 If it is determined in step S1301 that it is not necessary to transfer the received HW interrupt 180, the virtualization manager 120 executed by the physical CPU core 101 that has received the HW interrupt 180, A virtual interrupt 186 is issued to the virtual CPU core 150 of the VM 140 of the priority group (step S1306). Thereafter, the virtualization management unit 120 ends the process.
 (仮想化管理部120の起動時の処理)
 図14は、実施例1の仮想化管理部120が実行する起動処理の一例を説明するフローチャートである。なお、以下の説明では、物理ベクタ番号管理テーブル130を格納する記憶領域の確保及び初期化等の一般的な仮想化管理部120の処理の説明は省略する。
(Processing when the virtualization management unit 120 is activated)
FIG. 14 is a flowchart illustrating an example of a startup process executed by the virtualization management unit 120 according to the first embodiment. In the following description, a description of processing of the general virtualization management unit 120 such as securing and initializing a storage area for storing the physical vector number management table 130 is omitted.
 仮想化管理部120は、VM割込デバイス管理テーブル132、VM属性テーブル133、物理CPUコアグループ管理テーブル134、高速IPI制御データ135を格納するためのメモリ領域を第1のメモリグループ112から取得する(ステップS1401)。 The virtualization management unit 120 acquires a memory area for storing the VM interrupt device management table 132, the VM attribute table 133, the physical CPU core group management table 134, and the high-speed IPI control data 135 from the first memory group 112. (Step S1401).
 仮想化管理部120は、取得されたメモリ領域において、VM割込デバイス管理テーブル132、VM属性テーブル133、物理CPUコアグループ管理テーブル134、高速IPI制御データ135を初期化する(ステップS1402)。その後、仮想化管理部120は、処理を終了する。具体的には、以下のような処理が実行される。 The virtualization management unit 120 initializes the VM interrupt device management table 132, the VM attribute table 133, the physical CPU core group management table 134, and the high-speed IPI control data 135 in the acquired memory area (step S1402). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
 仮想化管理部120は、空のVM割込デバイス管理テーブル132を生成する。仮想化管理部120は、VM属性テーブル133に、仮想化管理部120が定義可能な最大数のVM140の識別番号分のレコードを生成する。さらに、仮想化管理部120は、各レコードのVM番号610にVM140の識別番号を昇順に設定し、また、各レコードのゲストOS処理優先モード620に「無効」を設定する。 The virtualization management unit 120 generates an empty VM interrupt device management table 132. The virtualization manager 120 generates records for the identification number of the maximum number of VMs 140 that can be defined by the virtualization manager 120 in the VM attribute table 133. Further, the virtualization management unit 120 sets the VM 140 identification number in ascending order to the VM number 610 of each record, and sets “invalid” to the guest OS processing priority mode 620 of each record.
 仮想化管理部120は、物理CPUコアグループ管理テーブル134に、CPUリソース100に含まれる物理CPUコア101の数分のレコードを生成する。仮想化管理部120は、各レコードの物理CPUコア LAPIC ID710に各物理CPUコア101のLAPICの識別番号を設定し、また、各レコードの物理CPUコアグループ720に「2」を設定する。 The virtualization management unit 120 generates records for the number of physical CPU cores 101 included in the CPU resource 100 in the physical CPU core group management table 134. The virtualization management unit 120 sets the LAPIC identification number of each physical CPU core 101 in the physical CPU core LAPIC ID 710 of each record, and sets “2” in the physical CPU core group 720 of each record.
 仮想化管理部120は、高速IPI制御データ135に対して、CPUリソース100に含まれる全ての物理CPUコア101のLAPICの識別番号に対応するPIDデータ840の各先頭アドレスをPIDアドレス832に設定する。 The virtualization management unit 120 sets, for the high-speed IPI control data 135, each head address of the PID data 840 corresponding to the LAPIC identification numbers of all the physical CPU cores 101 included in the CPU resource 100 as the PID address 832. .
 (まとめ)
 以上で説明したように、実施例1によれば、優先モードのVM140に対する割込デバイスリソース115からのHW割込180は、第2の物理CPUコアグループに含まれる物理CPUコア101が受信するように制御できる。また、HW割込180を受信した物理CPUコア101は、優先モードのVM140に割り当てられる仮想CPUコア150に対して物理IPI181を発行し、物理IPI181を受信した物理CPUコア101は、仮想化管理部120を介することなく、直接、仮想CPUコア150に対して仮想割込183を発行できる。
(Summary)
As described above, according to the first embodiment, the physical CPU core 101 included in the second physical CPU core group receives the HW interrupt 180 from the interrupt device resource 115 for the VM 140 in the priority mode. Can be controlled. The physical CPU core 101 that has received the HW interrupt 180 issues a physical IPI 181 to the virtual CPU core 150 assigned to the VM 140 in the priority mode, and the physical CPU core 101 that has received the physical IPI 181 The virtual interrupt 183 can be issued directly to the virtual CPU core 150 without going through 120.
 したがって、優先モードのVM140及び非優先モードのVM140のいずれのHW割込180についても、必ず仮想化管理部120が関与する。仮想化管理部120が関与することなくVM140に、直接、HW割込180が伝達されないため、セキュアな仮想化環境を提供できる。 Therefore, the virtualization management unit 120 is always involved in both the HW interrupt 180 of the VM 140 in the priority mode and the VM 140 in the non-priority mode. Since the HW interrupt 180 is not directly transmitted to the VM 140 without involving the virtualization management unit 120, a secure virtualization environment can be provided.
 また、優先モードのVM140に割り当てられる物理CPUコア101は、non-rootモードからrootモードへの遷移が発生しないため、セキュアな仮想化環境の下でHW割込180に対する優先モードのVM140の処理性能を向上することができる。 In addition, since the physical CPU core 101 allocated to the priority mode VM 140 does not transition from the non-root mode to the root mode, the processing performance of the priority mode VM 140 for the HW interrupt 180 in a secure virtualization environment Can be improved.
 実施例2では、予め、物理計算機10に対して、優先モードのVM140に対するHW割込180を受信する物理CPUコア101、すなわち、常にrootモードで稼働する物理CPUコア101を設定する。以下、実施例1との差異を中心に実施例2について説明する。 In the second embodiment, the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode, that is, the physical CPU core 101 that always operates in the root mode is set in advance for the physical computer 10. Hereinafter, the second embodiment will be described focusing on differences from the first embodiment.
 (ハードウェア構成及びソフトウェア構成)
 実施例2の物理計算機10のハードウェア構成及びソフトウェア構成は、実施例1のものと同一であるため説明を省略する。また、実施例2の各種情報は、物理CPUコアグループ管理テーブル134を除き、実施例1のものと同一であるため説明を省略する。
(Hardware configuration and software configuration)
Since the hardware configuration and software configuration of the physical computer 10 of the second embodiment are the same as those of the first embodiment, description thereof is omitted. Various information of the second embodiment is the same as that of the first embodiment except for the physical CPU core group management table 134, and the description thereof will be omitted.
 実施例2の物理CPUコアグループ管理テーブル134の物理CPUコアグループ720には、「1」、「2」又は「占有」のいずれかが格納される。「占有」は、常にrootモードで稼働する物理CPUコア101であり、また、優先モードのVM140に対するHW割込180を受信する物理CPUコア101として用いられる。物理CPUコアグループ720が「占有」である物理CPUコア101は、VM140に割り当てられる物理CPUコア101としては扱われない。 In the physical CPU core group 720 of the physical CPU core group management table 134 of the second embodiment, “1”, “2”, or “occupied” is stored. “Occupied” is the physical CPU core 101 that always operates in the root mode, and is used as the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode. The physical CPU core 101 in which the physical CPU core group 720 is “occupied” is not handled as the physical CPU core 101 assigned to the VM 140.
 以下の説明では、物理CPUコアグループ720が「占有」である物理CPUコア101を割込専用の物理CPUコア101とも記載する。 In the following description, the physical CPU core 101 in which the physical CPU core group 720 is “occupied” is also referred to as an interrupt-dedicated physical CPU core 101.
 また、実施例2では、予め、物理計算機10に割込専用の物理CPUコア101に関する定義情報を設定する。当該定義情報には、例えば、割込専用の物理CPUコア101として設定する物理CPUコア101のLAPICの識別番号等が含まれる。また、定義情報は、物理計算機10の図示しないROM又は記憶媒体等に格納される。 In the second embodiment, definition information related to the physical CPU core 101 dedicated to interrupts is set in the physical computer 10 in advance. The definition information includes, for example, the LAPIC identification number of the physical CPU core 101 set as the interrupt-only physical CPU core 101. The definition information is stored in a ROM or storage medium (not shown) of the physical computer 10.
 実施例2の仮想化管理部120は、起動時に、当該定義情報に基づいて所定の物理CPUコア101を割込専用の物理CPUコア101として設定する。 The virtualization management unit 120 according to the second embodiment sets a predetermined physical CPU core 101 as an interrupt-dedicated physical CPU core 101 based on the definition information at startup.
 (ユーザがVMの割込処理の制御モードを設定する場合の処理)
 実施例2の仮想化管理部120が実行するVM属性テーブル133の設定処理は、実施例1のものと同一であるため説明を省略する。
(Process when the user sets the control mode of VM interrupt processing)
Since the setting process of the VM attribute table 133 executed by the virtualization management unit 120 of the second embodiment is the same as that of the first embodiment, the description thereof is omitted.
 (VM140の起動処理及び終了処理の開始時に実行される処理)
 実施例2の仮想化管理部120が実行する物理CPUコアグループ管理テーブル134の更新処理は、実施例1のものと同一であるため説明を省略する。
(Processes executed at the start of the startup process and termination process of the VM 140)
Since the update processing of the physical CPU core group management table 134 executed by the virtualization management unit 120 of the second embodiment is the same as that of the first embodiment, description thereof is omitted.
 (ゲストOSの割込設定時の仮想化管理部の処理)
 図15は、実施例2の仮想化管理部120が実行するゲストOS160の割込設定処理の一例を説明するフローチャートである。
(Processing of the virtualization manager when setting a guest OS interrupt)
FIG. 15 is a flowchart illustrating an example of an interrupt setting process of the guest OS 160 executed by the virtualization management unit 120 according to the second embodiment.
 仮想化管理部120は、ゲストOS160からの割込スケジューリング設定185、又は、デバイスドライバ170の割込設定184を検知した場合に、以下で説明する処理を開始する。 When the virtualization management unit 120 detects the interrupt scheduling setting 185 from the guest OS 160 or the interrupt setting 184 of the device driver 170, the virtualization management unit 120 starts processing described below.
 ステップS1501からステップS1506までの処理は、ステップS1101からステップS1106までの処理と同一であるため説明を省略する。また、ステップS1509からステップS1511までの処理は、ステップS1109からステップS1111までの処理と同一であるため説明を省略する。 Since the processing from step S1501 to step S1506 is the same as the processing from step S1101 to step S1106, description thereof will be omitted. Further, the processing from step S1509 to step S1511 is the same as the processing from step S1109 to step S1111, and thus the description thereof is omitted.
 ステップS1507では、仮想化管理部120は、高速IPI制御データ135に情報を追加し、また、対象のVM140のVMCS136を更新する(ステップS1507)。具体的には、以下のような処理が実行される。 In step S1507, the virtualization management unit 120 adds information to the high-speed IPI control data 135 and updates the VMCS 136 of the target VM 140 (step S1507). Specifically, the following processing is executed.
 仮想化管理部120は、CPU割込識別子管理テーブル131を参照し、VM番号410が、VM割込デバイス記述レコードのVM140の識別番号と一致するレコードを検索し、さらに、検索されたレコードの仮想CPUコア LAPIC ID420がVM割込デバイス記述レコードの仮想CPUコア150のLAPICの識別番号と一致する行を検索する。仮想化管理部120は、検索された行の物理CPUコア LAPIC ID430の値を取得する。 The virtualization management unit 120 refers to the CPU interrupt identifier management table 131 and searches for a record in which the VM number 410 matches the identification number of the VM 140 in the VM interrupt device description record. The CPU core LAPIC ID 420 is searched for a line that matches the LAPIC identification number of the virtual CPU core 150 in the VM interrupt device description record. The virtualization management unit 120 acquires the value of the physical CPU core LAPIC ID 430 of the searched row.
 仮想化管理部120は、高速IPI制御データ135の情報読出領域800に含まれる上側のテーブルにレコードを追加する。さらに、仮想化管理部120は、追加されたレコードのVM番号821、通知ベクタ番号823及び仮想ベクタ番号824には、VM割込デバイス記述レコードに含まれる値を設定し、また、物理CPUコア LAPIC ID822には物理CPUコア LAPIC ID430から取得された値を設定する。 The virtualization manager 120 adds a record to the upper table included in the information reading area 800 of the high-speed IPI control data 135. Further, the virtualization management unit 120 sets values included in the VM interrupt device description record in the VM number 821, the notification vector number 823, and the virtual vector number 824 of the added record, and the physical CPU core LAPIC. The value acquired from the physical CPU core LAPIC ID 430 is set in ID 822.
 また、仮想化管理部120は、物理CPUコア LAPIC ID831が物理CPUコア LAPIC ID430から取得された値と一致するレコードを検索し、対象の物理CPUコア101のPIDアドレス832からアドレスを取得する。仮想化管理部120は、取得されたアドレスをVMCS136に設定する。以上がステップS1507の処理の説明である。 Also, the virtualization management unit 120 searches for a record in which the physical CPU core LAPIC ID 831 matches the value acquired from the physical CPU core LAPIC ID 430 and acquires the address from the PID address 832 of the target physical CPU core 101. The virtualization management unit 120 sets the acquired address in the VMCS 136. The above is the description of the processing in step S1507.
 ステップS1508において、仮想化管理部120は、割込専用の物理CPUコア101に対して割込ハンドラ137を登録し、また、VM割込デバイス管理テーブル132を更新する(ステップS1508)。その後、仮想化管理部120は、処理を終了する。具体的には以下のような処理が実行される。 In step S1508, the virtualization management unit 120 registers the interrupt handler 137 for the physical CPU core 101 dedicated to interrupts, and updates the VM interrupt device management table 132 (step S1508). Thereafter, the virtualization management unit 120 ends the process. Specifically, the following processing is executed.
 仮想化管理部120は、物理CPUコアグループ管理テーブル134を参照して、物理CPUコアグループ720が「占有」であるレコードを一つ選択する。実施例2では、割込専用の物理CPUコア101が優先モードのVM140に対するHW割込180を受信する物理CPUコア101として選択される。 The virtualization management unit 120 refers to the physical CPU core group management table 134 and selects one record in which the physical CPU core group 720 is “occupied”. In the second embodiment, the interrupt-only physical CPU core 101 is selected as the physical CPU core 101 that receives the HW interrupt 180 for the VM 140 in the priority mode.
 前述した物理CPUコア101を選択する方法は様々考えられる。例えば、仮想化管理部120は、物理CPUコア LAPIC ID710の値が小さいものを優先的に選択する。なお、前述した選択方法は一例であってこれに限定されない。 There are various methods for selecting the physical CPU core 101 described above. For example, the virtualization management unit 120 preferentially selects a physical CPU core LAPIC ID 710 having a small value. The selection method described above is an example, and the present invention is not limited to this.
 仮想化管理部120は、選択されたレコードの物理CPUコア LAPIC ID710に対応する物理CPUコア101の割込ハンドラレジスタ103に割込ハンドラ137を登録する。また、仮想化管理部120は、ステップS1506においてVM割込デバイス管理テーブル132に追加されたレコードの割込受信物理CPUコア LAPIC ID550に、選択されたレコードの物理CPUコア LAPIC ID710の値を設定する。以上がステップS1508の処理の説明である。 The virtualization manager 120 registers the interrupt handler 137 in the interrupt handler register 103 of the physical CPU core 101 corresponding to the physical CPU core LAPIC ID 710 of the selected record. Further, the virtualization management unit 120 sets the value of the physical CPU core LAPIC ID 710 of the selected record in the interrupt reception physical CPU core LAPIC ID 550 of the record added to the VM interrupt device management table 132 in step S1506. . The above is the description of the processing in step S1508.
 (仮想化管理部による仮想CPUコアスケジューリング時の処理)
 実施例2の仮想化管理部120が仮想CPUコアスケジューリング時に実行する処理は、実施例1のものと同一であるため説明を省略する。
(Processing during virtual CPU core scheduling by the virtualization manager)
The processing executed by the virtualization management unit 120 of the second embodiment at the time of virtual CPU core scheduling is the same as that of the first embodiment, and thus the description thereof is omitted.
 (HW割込が発生した場合における仮想化管理部120の処理)
 実施例2の仮想化管理部120が実行する割込調停処理は、実施例1のものと同一であるため説明を省略する。なお、実施例2では、HW割込180を受信する物理CPUコア101が割込専用の物理CPUコア101である点が実施例1と異なる。
(Processing of the virtualization management unit 120 when a HW interrupt occurs)
The interrupt arbitration process executed by the virtualization management unit 120 according to the second embodiment is the same as that according to the first embodiment, and a description thereof will be omitted. The second embodiment is different from the first embodiment in that the physical CPU core 101 that receives the HW interrupt 180 is a physical CPU core 101 dedicated to interrupts.
 (仮想化管理部120の起動時の処理)
 図16は、実施例2の仮想化管理部120が実行する起動処理の一例を説明するフローチャートである。なお、以下の説明では、物理ベクタ番号管理テーブル130を格納する記憶領域の確保及び初期化等の一般的な仮想化管理部120の処理の説明は省略する。
(Processing when the virtualization management unit 120 is activated)
FIG. 16 is a flowchart illustrating an example of a startup process executed by the virtualization management unit 120 according to the second embodiment. In the following description, a description of processing of the general virtualization management unit 120 such as securing and initializing a storage area for storing the physical vector number management table 130 is omitted.
 ステップS1601及びステップS1602の処理は、ステップS1401及びステップS1402の処理と同一の処理であるため説明を省略する。 Since the processing of step S1601 and step S1602 is the same processing as the processing of step S1401 and step S1402, description thereof will be omitted.
 仮想化管理部120は、CPUリソース100に含まれる物理CPUコア101の中から、特定の物理CPUコア101を「占有」の物理CPUコア101として設定する(ステップS1603)。その後、仮想化管理部120は処理を終了する。 The virtualization management unit 120 sets a specific physical CPU core 101 as the “occupied” physical CPU core 101 among the physical CPU cores 101 included in the CPU resource 100 (step S1603). Thereafter, the virtualization management unit 120 ends the process.
 仮想化管理部120は、CPUリソース100に含まれる物理CPUコア101の中から「占有」の物理CPUコア101として設定する物理CPUコア101を選択する。例えば、物理計算機10に予め設定された定義情報に基づいて物理CPUコア101を選択する方法が考えられる。また、仮想化管理部120は、設定UI139を用いて管理者からの入力を受け付け、当該入力に基づいて物理CPUコア101を選択してもよい。 The virtualization manager 120 selects the physical CPU core 101 to be set as the “occupied” physical CPU core 101 from the physical CPU cores 101 included in the CPU resource 100. For example, a method of selecting the physical CPU core 101 based on definition information preset in the physical computer 10 can be considered. Further, the virtualization management unit 120 may receive an input from the administrator using the setting UI 139 and may select the physical CPU core 101 based on the input.
 仮想化管理部120は、物理CPUコアグループ管理テーブル134を参照し、物理CPUコア LAPIC ID710が選択された物理CPUコア101のLAPICの識別番号と一致するレコードを検索する。仮想化管理部120は、検索されたレコードの物理CPUコアグループ720に「占有」を設定する。以上が、ステップS1603の処理の説明である。 The virtualization management unit 120 refers to the physical CPU core group management table 134 and searches for a record that matches the identification number of the LAPIC of the physical CPU core 101 for which the physical CPU core LAPIC ID 710 is selected. The virtualization manager 120 sets “occupied” to the physical CPU core group 720 of the retrieved record. The above is the description of the processing in step S1603.
 (まとめ)
 以上で説明したように、実施例2によれば、優先モードのVM140に対する割込デバイスリソース115からのHW割込180は、割込専用の物理CPUコア101が受信するように制御できる。したがって、実施例1と同様の効果を奏することができる。
(Summary)
As described above, according to the second embodiment, the HW interrupt 180 from the interrupt device resource 115 for the VM 140 in the priority mode can be controlled to be received by the physical CPU core 101 dedicated to the interrupt. Therefore, the same effects as those of the first embodiment can be obtained.
 また、実施例2によれば、非優先モードのVM140に割り当てられる物理CPUコア101ではなく、割込専用の物理CPUコア101が、HW割込180を受信するため、非優先モードのVM140の処理の遅延を防止することもできる。 Further, according to the second embodiment, since the physical CPU core 101 dedicated to the interrupt, not the physical CPU core 101 allocated to the VM 140 in the non-priority mode, receives the HW interrupt 180, the processing of the VM 140 in the non-priority mode is performed. It is also possible to prevent the delay.
 なお、実施例1及び実施例2では、物理CPUコア101単位の制御を行っていたが物理CPU単位で制御を行ってもよい。 In the first and second embodiments, control is performed in units of physical CPU cores 101. However, control may be performed in units of physical CPUs.
 なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。また、例えば、上記した実施例は本発明を分かりやすく説明するために構成を詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、各実施例の構成の一部について、他の構成に追加、削除、置換することが可能である。 In addition, this invention is not limited to the above-mentioned Example, Various modifications are included. Further, for example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those provided with all the described configurations. Further, a part of the configuration of each embodiment can be added to, deleted from, or replaced with another configuration.
 また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、本発明は、実施例の機能を実現するソフトウェアのプログラムコードによっても実現できる。この場合、プログラムコードを記録した記憶媒体をコンピュータに提供し、そのコンピュータが備えるCPUが記憶媒体に格納されたプログラムコードを読み出す。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することになり、そのプログラムコード自体、及びそれを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、CD-ROM、DVD-ROM、ハードディスク、SSD(Solid State Drive)、光ディスク、光磁気ディスク、CD-R、磁気テープ、不揮発性のメモリカード、ROMなどが用いられる。 In addition, each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. The present invention can also be realized by software program codes that implement the functions of the embodiments. In this case, a storage medium in which the program code is recorded is provided to the computer, and a CPU included in the computer reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing it constitute the present invention. Examples of storage media for supplying such program codes include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, A non-volatile memory card, ROM, or the like is used.
 また、本実施例に記載の機能を実現するプログラムコードは、例えば、アセンブラ、C/C++、perl、Shell、PHP、Java等の広範囲のプログラム又はスクリプト言語で実装できる。 Further, the program code for realizing the functions described in this embodiment can be implemented by a wide range of programs or script languages such as assembler, C / C ++, Perl, Shell, PHP, Java, and the like.
 さらに、実施例の機能を実現するソフトウェアのプログラムコードを、ネットワークを介して配信することによって、それをコンピュータのハードディスクやメモリ等の記憶手段又はCD-RW、CD-R等の記憶媒体に格納し、コンピュータが備えるCPUが当該記憶手段や当該記憶媒体に格納されたプログラムコードを読み出して実行するようにしてもよい。 Furthermore, by distributing the program code of the software that realizes the functions of the embodiments via a network, the program code is stored in a storage means such as a hard disk or memory of a computer or a storage medium such as a CD-RW or CD-R. The CPU included in the computer may read and execute the program code stored in the storage unit or the storage medium.
 上述の実施例において、制御線や情報線は、説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。全ての構成が相互に接続されていてもよい。 In the above-described embodiments, the control lines and information lines indicate those that are considered necessary for the explanation, and do not necessarily indicate all the control lines and information lines on the product. All the components may be connected to each other.

Claims (14)

  1.  論理的に分割された計算機資源を用いて生成された複数の仮想計算機が稼働する計算機であって、
     前記計算機資源は、複数の物理演算装置、一つ以上の物理メモリ、及び前記物理演算装置に対してハードウェア割込を発生させる一つ以上の物理割込デバイスを含み、
     前記複数の仮想計算機の各々は、複数の仮想演算装置、仮想メモリ、及び仮想割込デバイスを有し、
     前記一つ以上の物理メモリは、前記複数の仮想計算機を生成し、前記複数の仮想計算機を管理する仮想化管理部を実現するプログラムを格納し、
     前記複数の仮想計算機上では、当該仮想計算機を制御するオペレーティングシステムが稼働し、
     前記複数の物理演算装置は、
     前記仮想化管理部による処理を実行する第1の動作モードと、前記オペレーティングシステムによる処理を実行する第2の動作モードとを切り替える仮想化支援部と、
     前記物理演算装置間で前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を転送する割込仮想化支援部と、を有し、
     前記仮想化管理部は、
     前記ハードウェア割込に起因する前記オペレーティングシステムの処理性能の低下を回避する制御モードである優先モードの仮想計算機から構成される優先グループと、前記ハードウェア割込に起因する前記オペレーティングシステムの処理性能の低下を許容する制御モードである非優先モードの仮想計算機から構成される非優先グループとに分けて前記複数の仮想計算機を管理し、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の物理演算装置を、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置として設定し、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部は、
     前記受信したハードウェア割込の転送先となる前記優先モードの仮想計算機に割り当てられる前記物理演算装置を特定し、
     前記特定された物理演算装置に前記受信したハードウェア割込を転送し、
     前記転送されたハードウェア割込を受信した物理演算装置は、
     前記転送されたハードウェア割込の対象となる仮想計算機を特定し、
     前記転送されたハードウェア割込に基づいて、前記特定された仮想計算機が有する前記仮想演算装置に対する仮想割込を発行することを特徴とする計算機。
    A computer on which a plurality of virtual machines generated using logically divided computer resources operate,
    The computer resource includes a plurality of physical arithmetic devices, one or more physical memories, and one or more physical interrupt devices that generate hardware interrupts to the physical arithmetic devices,
    Each of the plurality of virtual machines has a plurality of virtual arithmetic devices, a virtual memory, and a virtual interrupt device,
    The one or more physical memories store a program for generating a plurality of virtual machines and realizing a virtualization manager that manages the plurality of virtual machines;
    On the plurality of virtual machines, an operating system that controls the virtual machines runs,
    The plurality of physical arithmetic devices are:
    A virtualization support unit that switches between a first operation mode for executing processing by the virtualization management unit and a second operation mode for executing processing by the operating system;
    An interrupt virtualization support unit that transfers the hardware interrupt issued from the one or more physical interrupt devices between the physical arithmetic devices,
    The virtualization management unit
    A priority group composed of virtual machines in a priority mode which is a control mode for avoiding a decrease in the processing performance of the operating system due to the hardware interrupt, and the processing performance of the operating system due to the hardware interrupt Managing the plurality of virtual machines in a non-priority group composed of virtual machines in non-priority mode, which is a control mode that allows a decrease in
    A physical computing device other than the physical computing device assigned to the priority mode virtual machine is issued from the one or more physical interrupt devices assigned to the virtual interrupt device of the priority mode virtual machine. Set as a physical computing device to receive the hardware interrupt,
    The virtualization management unit executed by the physical arithmetic device that has received the hardware interrupt for the virtual machine in the priority mode,
    Identify the physical computing device assigned to the virtual machine in the priority mode as the transfer destination of the received hardware interrupt;
    Transferring the received hardware interrupt to the identified physical processor;
    The physical processing device that has received the transferred hardware interrupt is:
    Identify the virtual machine that is the target of the transferred hardware interrupt,
    A computer that issues a virtual interrupt to the virtual arithmetic unit included in the identified virtual computer based on the transferred hardware interrupt.
  2.  請求項1に記載の計算機であって、
     前記仮想化管理部は、
     前記ハードウェア割込に使用する物理ベクタ番号を管理する物理ベクタ番号管理情報を保持し、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を制御するための仮想計算機割込デバイス管理情報を保持し、
     前記オペレーティングシステムは、前記仮想割込に使用する仮想ベクタ番号を管理する仮想ベクタ番号管理情報を保持し、
     前記仮想化管理部は、
     第1のオペレーティングシステムから前記仮想割込デバイスにおける割込みの設定要求を検出し、
     前記第1のオペレーティングシステムが稼働する前記仮想計算機が、前記優先モードの仮想計算機であるか否かを判定し、
     前記第1のオペレーティングシステムが稼働する前記仮想計算機が、前記優先モードの仮想計算機であると判定された場合、前記割込みの設定要求に含まれる前記仮想割込デバイスの種別に基づいて前記物理ベクタ番号管理情報を参照して、当該仮想割込デバイスに対応する前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込に含める前記物理ベクタ番号を取得し、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の前記複数の物理演算装置の中から、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置を一つ選択し、
     前記第1のオペレーティングシステムが稼働する仮想計算機の識別番号、前記検出された割込みの設定要求に含まれる前記仮想ベクタ番号、前記第1のオペレーティングシステムが稼働する仮想計算機が有する前記仮想演算装置の識別情報、前記取得された物理ベクタ番号、及び前記選択された物理演算装置の識別情報を対応付けたレコードを前記仮想計算機割込デバイス管理情報に追加し、
     前記選択された物理演算装置に、前記優先モードの仮想計算機に対する前記ハードウェア割込を処理する割込ハンドラを設定することを特徴とする計算機。
    The computer according to claim 1,
    The virtualization management unit
    Holds physical vector number management information for managing the physical vector number used for the hardware interrupt,
    Holding virtual machine interrupt device management information for controlling the hardware interrupt for the virtual machine in the priority mode,
    The operating system holds virtual vector number management information for managing a virtual vector number used for the virtual interrupt,
    The virtualization management unit
    Detecting an interrupt setting request in the virtual interrupt device from the first operating system;
    Determining whether the virtual machine on which the first operating system runs is a virtual machine in the priority mode;
    When it is determined that the virtual machine on which the first operating system is operating is the virtual machine in the priority mode, the physical vector number based on the type of the virtual interrupt device included in the interrupt setting request With reference to management information, obtain the physical vector number to be included in the hardware interrupt issued from the one or more physical interrupt devices corresponding to the virtual interrupt device,
    The one or more physical interrupts assigned to the virtual interrupt device of the priority mode virtual machine among the plurality of physical operation units other than the physical operation unit assigned to the priority mode virtual machine Select one physical processor that receives the hardware interrupt issued by the device,
    An identification number of a virtual machine on which the first operating system operates, an identification number of the virtual vector included in the detected interrupt setting request, and an identification of the virtual processing unit included in the virtual machine on which the first operating system operates Adding a record in which the information, the acquired physical vector number, and the identification information of the selected physical arithmetic device are associated with the virtual machine interrupt device management information,
    A computer, wherein an interrupt handler for processing the hardware interrupt for the virtual machine in the priority mode is set in the selected physical arithmetic device.
  3.  請求項2に記載の計算機であって、
     前記仮想化管理部は、
     前記仮想計算機が有する前記仮想演算装置と、前記仮想演算装置に割り当てられる前記物理演算装置との対応関係を管理する演算装置割込識別子管理情報を保持し、
     前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部は、
     前記受信したハードウェア割込を解析して、前記解析の結果に基づいて前記受信したハードウェア割込を転送する必要があるか否かを判定し、
     前記受信したハードウェア割込を転送する必要があると判定された場合、前記受信したハードウェア割込に含まれる前記物理ベクタ番号に基づいて前記仮想計算機割込デバイス管理情報を参照して、前記優先モードの仮想計算機の識別情報、前記仮想ベクタ番号、前記仮想演算装置の識別情報を前記受信したハードウェア割込を送信する前記優先モードの仮想計算機の情報として取得し、
     前記仮想計算機割込デバイス管理情報から取得された前記優先モードの仮想計算機の情報に基づいて前記演算装置割込識別子管理情報を参照して、前記受信したハードウェア割込を転送する前記物理演算装置を特定することを特徴とする計算機。
    The computer according to claim 2,
    The virtualization management unit
    Holds arithmetic unit interrupt identifier management information for managing the correspondence between the virtual arithmetic unit possessed by the virtual machine and the physical arithmetic unit assigned to the virtual arithmetic unit,
    The virtualization management unit executed by the physical arithmetic device that has received the hardware interrupt issued from the one or more physical interrupt devices,
    Analyzing the received hardware interrupt to determine whether the received hardware interrupt needs to be transferred based on the result of the analysis;
    If it is determined that it is necessary to transfer the received hardware interrupt, the virtual machine interrupt device management information is referred to based on the physical vector number included in the received hardware interrupt, The priority mode virtual machine identification information, the virtual vector number, and the virtual computing device identification information are acquired as information on the virtual machine in the priority mode for transmitting the received hardware interrupt,
    The physical arithmetic device that transfers the received hardware interrupt with reference to the arithmetic device interrupt identifier management information based on the virtual machine information of the priority mode acquired from the virtual machine interrupt device management information A computer characterized by specifying.
  4.  請求項3に記載の計算機であって、
     前記仮想化管理部は、前記物理演算装置間の前記ハードウェア割込の転送に用いられる制御データを保持し、
     前記制御データは、前記複数の物理演算装置毎に前記仮想計算機に対する前記仮想割込に含める前記仮想ベクタ番号を特定するためのビットマップを含み、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部は、
     前記制御データを参照して、前記特定された物理演算装置に対応する前記ビットマップにアクセスし、
     前記アクセスされたビットマップに含まれるビットのうち、前記優先モードの仮想計算機の情報として取得された前記仮想ベクタ番号に対応するビットを有効化し、
     前記転送されたハードウェア割込を受信した物理演算装置は、
     前記制御データを参照して、前記転送されたハードウェア割込を受信した物理演算装置に対応するビットマップにアクセスし、
     前記アクセスされたビットマップに基づいて、前記優先モードの仮想計算機に対する前記仮想割込に含める前記仮想ベクタ番号を取得し、
     前記転送されたハードウェア割込に基づいて、前記取得された仮想ベクタ番号を含む前記仮想割込を前記優先モードの仮想計算機に対して発行することを特徴とする計算機。
    The computer according to claim 3, wherein
    The virtualization manager holds control data used for transferring the hardware interrupt between the physical arithmetic devices,
    The control data includes a bitmap for specifying the virtual vector number to be included in the virtual interrupt for the virtual machine for each of the plurality of physical arithmetic devices,
    The virtualization management unit executed by the physical arithmetic device that has received the hardware interrupt for the virtual machine in the priority mode,
    With reference to the control data, the bitmap corresponding to the identified physical arithmetic device is accessed,
    Among the bits included in the accessed bitmap, enable the bit corresponding to the virtual vector number acquired as the virtual machine information of the priority mode,
    The physical processing device that has received the transferred hardware interrupt is:
    With reference to the control data, access the bitmap corresponding to the physical arithmetic unit that received the transferred hardware interrupt,
    Based on the accessed bitmap, obtain the virtual vector number to be included in the virtual interrupt for the virtual machine in the priority mode,
    A computer that issues the virtual interrupt including the acquired virtual vector number to the virtual machine in the priority mode based on the transferred hardware interrupt.
  5.  請求項3に記載の計算機であって、
     前記仮想化管理部は、
     前記複数の仮想計算機の各々を前記優先グループ又は前記非優先グループのいずれに含めるかを設定するためのインタフェースを含み、
     前記インタフェースを介して入力された情報に基づいて決定された前記複数の仮想計算機の各々が所属するグループを管理するグループ管理情報を生成することを特徴とする計算機。
    The computer according to claim 3, wherein
    The virtualization management unit
    An interface for setting whether to include each of the plurality of virtual machines in the priority group or the non-priority group;
    A computer that generates group management information for managing a group to which each of the plurality of virtual computers, which is determined based on information input through the interface, belongs.
  6.  請求項5に記載の計算機であって、
     前記仮想化管理部は、
     前記グループ管理情報を参照して、前記優先モードの仮想計算機に割り当てられる前記物理演算装置を特定し、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置を第1の演算装置グループとして管理し、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の前記物理演算装置を第2の演算装置グループとして管理することを特徴とする計算機。
    The computer according to claim 5, wherein
    The virtualization management unit
    Referring to the group management information, identify the physical computing device assigned to the priority mode virtual machine,
    Managing the physical arithmetic unit assigned to the virtual machine in the priority mode as a first arithmetic unit group;
    A computer that manages the physical arithmetic devices other than the physical arithmetic device allocated to the virtual computer in the priority mode as a second arithmetic device group.
  7.  請求項6に記載の計算機であって、
     前記仮想化管理部は、
     前記複数の物理演算装置のうち、任意の物理演算装置を前記優先モードの仮想計算機に対する前記ハードウェア割込を受信するための割込専用の物理演算装置として設定し、
     前記割込専用の物理演算装置以外の前記複数の物理演算装置を前記仮想計算機に割り当て、
     前記割込専用の物理演算装置を、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置として選択することを特徴とする計算機。
    The computer according to claim 6, wherein
    The virtualization management unit
    Of the plurality of physical arithmetic devices, set any physical arithmetic device as a dedicated physical arithmetic device for receiving the hardware interrupt for the virtual machine in the priority mode,
    Assigning the plurality of physical arithmetic units other than the dedicated physical arithmetic unit to the virtual machine,
    A physical operation that receives the hardware interrupt issued from the one or more physical interrupt devices assigned to the virtual interrupt device of the priority mode virtual machine, the physical operation device dedicated to the interrupt. A computer characterized by selecting as a device.
  8.  論理的に分割された計算機資源を用いて生成された複数の仮想計算機が稼働する計算機における割込み制御方法であって、
     前記計算機資源は、複数の物理演算装置、一つ以上の物理メモリ、及び前記物理演算装置に対してハードウェア割込を発生させる一つ以上の物理割込デバイスを含み、
     前記複数の仮想計算機の各々は、複数の仮想演算装置、仮想メモリ、及び仮想割込デバイスを有し、
     前記一つ以上の物理メモリは、前記複数の仮想計算機を生成し、前記複数の仮想計算機を管理する仮想化管理部を実現するプログラムを格納し、
     前記複数の仮想計算機上では、当該仮想計算機を制御するオペレーティングシステムが稼働し、
     前記複数の物理演算装置は、
     前記仮想化管理部による処理を実行する第1の動作モードと、前記オペレーティングシステムによる処理を実行する第2の動作モードとを切り替える仮想化支援部と、
     物理演算装置間で前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を転送する割込仮想化支援部と、を有し、
     前記仮想化管理部は、前記ハードウェア割込に起因する前記オペレーティングシステムの処理性能の低下を回避する制御モードである優先モードの仮想計算機から構成される優先グループと、前記ハードウェア割込に起因する前記オペレーティングシステムの処理性能の低下を許容する制御モードである非優先モードの仮想計算機から構成される非優先グループとに分けて前記複数の仮想計算機を管理し、
     前記割込み制御方法は、
     前記仮想化管理部が、前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の物理演算装置を、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置として設定する第1のステップと、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記受信したハードウェア割込の転送先となる前記優先モードの仮想計算機に割り当てられる前記物理演算装置を特定する第2のステップと、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記特定された物理演算装置に前記受信したハードウェア割込を転送する第3のステップと、
     前記転送されたハードウェア割込を受信した物理演算装置が、前記転送されたハードウェア割込の対象となる仮想計算機を特定する第4のステップと、
     前記転送されたハードウェア割込を受信した物理演算装置が、前記転送されたハードウェア割込に基づいて、前記特定された仮想計算機が有する前記仮想演算装置に対する仮想割込を発行する第5のステップと、を含むことを特徴とする割込み制御方法。
    An interrupt control method in a computer in which a plurality of virtual machines generated using logically divided computer resources are operated,
    The computer resource includes a plurality of physical arithmetic devices, one or more physical memories, and one or more physical interrupt devices that generate hardware interrupts to the physical arithmetic devices,
    Each of the plurality of virtual machines has a plurality of virtual arithmetic devices, a virtual memory, and a virtual interrupt device,
    The one or more physical memories store a program for generating a plurality of virtual machines and realizing a virtualization manager that manages the plurality of virtual machines;
    On the plurality of virtual machines, an operating system that controls the virtual machines runs,
    The plurality of physical arithmetic devices are:
    A virtualization support unit that switches between a first operation mode for executing processing by the virtualization management unit and a second operation mode for executing processing by the operating system;
    An interrupt virtualization support unit that transfers the hardware interrupt issued from the one or more physical interrupt devices between the physical arithmetic devices,
    The virtualization management unit includes a priority group composed of virtual machines in a priority mode that is a control mode for avoiding a decrease in processing performance of the operating system due to the hardware interrupt, and the hardware interrupt. Managing the plurality of virtual machines divided into non-priority groups composed of virtual machines in non-priority mode, which is a control mode that allows a reduction in processing performance of the operating system,
    The interrupt control method is:
    The one or more physical units assigned to the virtual interrupt device of the priority mode virtual machine, wherein the virtualization management unit has a physical calculation unit other than the physical calculation unit assigned to the priority mode virtual machine. A first step of setting as a physical arithmetic device that receives the hardware interrupt issued from the interrupt device;
    The virtualization management unit executed by the physical arithmetic unit that has received the hardware interrupt for the priority mode virtual machine is assigned to the priority mode virtual machine to which the received hardware interrupt is transferred. A second step of identifying the physical arithmetic unit;
    A virtualization management unit executed by the physical arithmetic device that has received the hardware interrupt for the virtual machine in the priority mode transfers the received hardware interrupt to the identified physical arithmetic device. Steps,
    A fourth step in which a physical processing device that has received the transferred hardware interrupt specifies a virtual machine that is a target of the transferred hardware interrupt; and
    The physical processing device that has received the transferred hardware interrupt issues a virtual interrupt to the virtual processing device of the identified virtual machine based on the transferred hardware interrupt. And an interrupt control method comprising the steps of:
  9.  請求項8に記載の割込み制御方法であって、
     前記仮想化管理部は、
     前記ハードウェア割込に使用する物理ベクタ番号を管理する物理ベクタ番号管理情報を保持し、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を制御するための仮想計算機割込デバイス管理情報を保持し、
     前記オペレーティングシステムは、前記仮想割込に使用する仮想ベクタ番号を管理する仮想ベクタ番号管理情報を保持し、
     前記第1のステップは、
     第1のオペレーティングシステムから前記仮想割込デバイスにおける割込みの設定要求を検出するステップと、
     前記第1のオペレーティングシステムが稼働する前記仮想計算機が、前記優先モードの仮想計算機であるか否かを判定するステップと、
     前記第1のオペレーティングシステムが稼働する前記仮想計算機が、前記優先モードの仮想計算機であると判定された場合、前記割込みの設定要求に含まれる前記仮想割込デバイスの種別に基づいて前記物理ベクタ番号管理情報を参照して、当該仮想割込デバイスに対応する前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込に含める前記物理ベクタ番号を取得するステップと、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の前記複数の物理演算装置の中から、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置を一つ選択するステップと、
     前記第1のオペレーティングシステムが稼働する仮想計算機の識別番号、前記検出された割込みの設定要求に含まれる前記仮想ベクタ番号、前記第1のオペレーティングシステムが稼働する仮想計算機が有する前記仮想演算装置の識別情報、前記取得された物理ベクタ番号、及び前記選択された物理演算装置の識別情報を対応付けたレコードを前記仮想計算機割込デバイス管理情報に追加するステップと、
     前記選択された物理演算装置に、前記優先モードの仮想計算機に対する前記ハードウェア割込を処理する割込ハンドラを設定するステップと、を含むことを特徴とする割込み制御方法。
    The interrupt control method according to claim 8,
    The virtualization management unit
    Holds physical vector number management information for managing the physical vector number used for the hardware interrupt,
    Holding virtual machine interrupt device management information for controlling the hardware interrupt for the virtual machine in the priority mode,
    The operating system holds virtual vector number management information for managing a virtual vector number used for the virtual interrupt,
    The first step includes
    Detecting an interrupt setting request in the virtual interrupt device from a first operating system;
    Determining whether the virtual machine running the first operating system is a virtual machine in the priority mode;
    When it is determined that the virtual machine on which the first operating system is operating is the virtual machine in the priority mode, the physical vector number based on the type of the virtual interrupt device included in the interrupt setting request Referring to management information, obtaining the physical vector number to be included in the hardware interrupt issued from the one or more physical interrupt devices corresponding to the virtual interrupt device;
    The one or more physical interrupts assigned to the virtual interrupt device of the priority mode virtual machine among the plurality of physical operation units other than the physical operation unit assigned to the priority mode virtual machine Selecting one physical processor that receives the hardware interrupt issued by the device;
    An identification number of a virtual machine on which the first operating system operates, an identification number of the virtual vector included in the detected interrupt setting request, and an identification of the virtual processing unit included in the virtual machine on which the first operating system operates Adding a record associating information, the acquired physical vector number, and identification information of the selected physical arithmetic unit to the virtual machine interrupt device management information;
    And setting an interrupt handler for processing the hardware interrupt to the virtual machine in the priority mode in the selected physical arithmetic device.
  10.  請求項9に記載の割込み制御方法であって、
     前記仮想化管理部は、
     前記仮想計算機が有する前記仮想演算装置と、前記仮想演算装置に割り当てられる前記物理演算装置との対応関係を管理する演算装置割込識別子管理情報を保持し、
     前記第2のステップは、
     前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記受信したハードウェア割込を解析して、前記解析の結果に基づいて前記受信したハードウェア割込を転送する必要があるか否かを判定するステップと、
     前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記受信したハードウェア割込を転送する必要があると判定された場合、前記受信したハードウェア割込に含まれる前記物理ベクタ番号に基づいて前記仮想計算機割込デバイス管理情報を参照して、前記優先モードの仮想計算機の識別情報、前記仮想ベクタ番号、前記仮想演算装置の識別情報を前記受信したハードウェア割込を送信する前記優先モードの仮想計算機の情報として取得するステップと、
     前記一つ以上の物理割込デバイスから発行された前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記仮想計算機割込デバイス管理情報から取得された前記優先モードの仮想計算機の情報に基づいて前記演算装置割込識別子管理情報を参照して、前記受信したハードウェア割込を転送する前記物理演算装置を特定するステップと、を含むことを特徴とする割込み制御方法。
    The interrupt control method according to claim 9,
    The virtualization management unit
    Holds arithmetic unit interrupt identifier management information for managing the correspondence between the virtual arithmetic unit possessed by the virtual machine and the physical arithmetic unit assigned to the virtual arithmetic unit,
    The second step includes
    The virtualization management unit executed by the physical arithmetic unit that has received the hardware interrupt issued from the one or more physical interrupt devices analyzes the received hardware interrupt, and Determining whether it is necessary to transfer the received hardware interrupt based on a result; and
    It is determined that the virtualization management unit executed by the physical arithmetic unit that has received the hardware interrupt issued from the one or more physical interrupt devices needs to transfer the received hardware interrupt. The virtual machine interrupt device management information based on the physical vector number included in the received hardware interrupt, the virtual machine identification information of the priority mode, the virtual vector number, Obtaining identification information of a virtual processing device as information on the virtual machine in the priority mode for transmitting the received hardware interrupt;
    The virtualization mode executed by the physical arithmetic unit that has received the hardware interrupt issued from the one or more physical interrupt devices is the priority mode acquired from the virtual machine interrupt device management information. And referring to the arithmetic device interrupt identifier management information based on the virtual computer information of the virtual machine, and specifying the physical arithmetic device to which the received hardware interrupt is transferred. Method.
  11.  請求項10に記載の割込み制御方法であって、
     前記仮想化管理部は、前記物理演算装置間の前記ハードウェア割込の転送に用いられる制御データを保持し、
     前記制御データは、前記複数の物理演算装置毎に前記仮想計算機に対する前記仮想割込に含める前記仮想ベクタ番号を特定するためのビットマップを含み、
     前記第2のステップは、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記制御データを参照して、前記特定された物理演算装置に対応する前記ビットマップにアクセスするステップと、
     前記優先モードの仮想計算機に対する前記ハードウェア割込を受信した前記物理演算装置によって実行される仮想化管理部が、前記アクセスされたビットマップに含まれるビットのうち、前記優先モードの仮想計算機の情報として取得された前記仮想ベクタ番号に対応するビットを有効化するステップと、を含み、
     前記第4のステップは、
     前記制御データを参照して、前記転送されたハードウェア割込を受信した物理演算装置に対応するビットマップにアクセスするステップと、
     前記アクセスされたビットマップに基づいて、前記優先モードの仮想計算機に対する前記仮想割込に含める前記仮想ベクタ番号を取得するステップと、を含み、
     前記第5のステップは、前記転送されたハードウェア割込に基づいて、前記取得された仮想ベクタ番号を含む前記仮想割込を前記優先モードの仮想計算機に対して発行するステップを含むことを特徴とする割込み制御方法。
    The interrupt control method according to claim 10,
    The virtualization manager holds control data used for transferring the hardware interrupt between the physical arithmetic devices,
    The control data includes a bitmap for specifying the virtual vector number to be included in the virtual interrupt for the virtual machine for each of the plurality of physical arithmetic devices,
    The second step includes
    The virtualization management unit executed by the physical arithmetic unit that has received the hardware interrupt for the virtual machine in the priority mode refers to the control data, and the bitmap corresponding to the specified physical arithmetic unit Step to access
    The virtualization management unit executed by the physical arithmetic unit that has received the hardware interrupt for the priority mode virtual machine has information on the priority mode virtual machine among the bits included in the accessed bitmap. Enabling a bit corresponding to the virtual vector number obtained as
    The fourth step includes
    Referring to the control data, accessing a bitmap corresponding to a physical processing unit that has received the transferred hardware interrupt; and
    Obtaining the virtual vector number to be included in the virtual interrupt for the virtual machine in the priority mode based on the accessed bitmap;
    The fifth step includes a step of issuing the virtual interrupt including the acquired virtual vector number to the virtual machine in the priority mode based on the transferred hardware interrupt. Interrupt control method.
  12.  請求項10に記載の割込み制御方法であって、
     前記仮想化管理部は、
     前記複数の仮想計算機の各々を前記優先グループ又は前記非優先グループのいずれに含めるかを設定するためのインタフェースを含み、
     前記割込み制御方法は、前記仮想化管理部が前記インタフェースを介して入力された情報に基づいて決定された前記複数の仮想計算機の各々が所属するグループを管理するグループ管理情報を生成するステップを含むことを特徴とする割込み制御方法。
    The interrupt control method according to claim 10,
    The virtualization management unit
    An interface for setting whether to include each of the plurality of virtual machines in the priority group or the non-priority group;
    The interrupt control method includes a step of generating group management information for managing a group to which each of the plurality of virtual machines belongs determined by the virtualization management unit based on information input through the interface. An interrupt control method characterized by the above.
  13.  請求項12に記載の割込み制御方法であって、
     前記仮想化管理部は、
     前記グループ管理情報を参照して、前記優先モードの仮想計算機に割り当てられる前記物理演算装置を特定し、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置を第1の演算装置グループとして管理し、
     前記優先モードの仮想計算機に割り当てられる前記物理演算装置以外の前記物理演算装置を第2の演算装置グループとして管理することを特徴とする割込み制御方法。
    The interrupt control method according to claim 12,
    The virtualization management unit
    Referring to the group management information, identify the physical computing device assigned to the priority mode virtual machine,
    Managing the physical arithmetic unit assigned to the virtual machine in the priority mode as a first arithmetic unit group;
    An interrupt control method characterized by managing the physical arithmetic devices other than the physical arithmetic devices assigned to the virtual machine in the priority mode as a second arithmetic device group.
  14.  請求項13に記載の割込み制御方法であって、
     前記仮想化管理部が、前記複数の物理演算装置のうち、任意の物理演算装置を前記優先モードの仮想計算機に対する前記ハードウェア割込を受信するための割込専用の物理演算装置として設定するステップと、
     前記仮想化管理部が、前記割込専用の物理演算装置以外の前記複数の物理演算装置を前記仮想計算機に割り当てるステップと、を含み、
     前記第1のステップは、前記割込専用の物理演算装置を、前記優先モードの仮想計算機が有する前記仮想割込デバイスに割り当てられた前記一つ以上の物理割込デバイスから発行される前記ハードウェア割込を受信する物理演算装置として選択するステップを含むことを特徴とする割込み制御方法。
    An interrupt control method according to claim 13,
    The virtualization management unit sets an arbitrary physical arithmetic device among the plurality of physical arithmetic devices as an interrupt-dedicated physical arithmetic device for receiving the hardware interrupt for the virtual machine in the priority mode. When,
    The virtualization management unit includes allocating the plurality of physical arithmetic devices other than the interrupt-dedicated physical arithmetic device to the virtual machine, and
    In the first step, the hardware is issued from the one or more physical interrupt devices assigned to the virtual interrupt device of the priority mode virtual machine with the interrupt dedicated physical processing unit. An interrupt control method comprising a step of selecting as a physical arithmetic device that receives an interrupt.
PCT/JP2014/082833 2014-12-11 2014-12-11 Computer and interrupt control method WO2016092667A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/082833 WO2016092667A1 (en) 2014-12-11 2014-12-11 Computer and interrupt control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/082833 WO2016092667A1 (en) 2014-12-11 2014-12-11 Computer and interrupt control method

Publications (1)

Publication Number Publication Date
WO2016092667A1 true WO2016092667A1 (en) 2016-06-16

Family

ID=56106915

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/082833 WO2016092667A1 (en) 2014-12-11 2014-12-11 Computer and interrupt control method

Country Status (1)

Country Link
WO (1) WO2016092667A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023066079A1 (en) * 2021-10-20 2023-04-27 北京字节跳动网络技术有限公司 Virtual machine resource allocation method and apparatus, medium and device
JP2023532077A (en) * 2020-06-29 2023-07-26 ホアウェイ・テクノロジーズ・カンパニー・リミテッド System and interrupt handling method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008065713A (en) * 2006-09-08 2008-03-21 Canon Inc Multiprocessor system and interrupt control method
JP2010128911A (en) * 2008-11-28 2010-06-10 Hitachi Ltd Control method of virtual computer, control program for virtual computer and computer device
JP2011118578A (en) * 2009-12-02 2011-06-16 Renesas Electronics Corp Information processing apparatus
JP2013519169A (en) * 2010-02-05 2013-05-23 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Interrupt virtualization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008065713A (en) * 2006-09-08 2008-03-21 Canon Inc Multiprocessor system and interrupt control method
JP2010128911A (en) * 2008-11-28 2010-06-10 Hitachi Ltd Control method of virtual computer, control program for virtual computer and computer device
JP2011118578A (en) * 2009-12-02 2011-06-16 Renesas Electronics Corp Information processing apparatus
JP2013519169A (en) * 2010-02-05 2013-05-23 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド Interrupt virtualization

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023532077A (en) * 2020-06-29 2023-07-26 ホアウェイ・テクノロジーズ・カンパニー・リミテッド System and interrupt handling method
JP7615474B2 (en) 2020-06-29 2025-01-17 ホアウェイ・テクノロジーズ・カンパニー・リミテッド Computing device and method for handling interrupts - Patents.com
WO2023066079A1 (en) * 2021-10-20 2023-04-27 北京字节跳动网络技术有限公司 Virtual machine resource allocation method and apparatus, medium and device

Similar Documents

Publication Publication Date Title
US10255005B2 (en) Systems and methods of disk storage allocation for virtual machines
JP7280508B2 (en) Information processing device, information processing method, and virtual machine connection management program
US10193963B2 (en) Container virtual machines for hadoop
JP3882930B2 (en) Managing virtual machines to use shared resources
RU2530345C2 (en) Scheduler instances in process
JP5607732B2 (en) Resource allocation in virtualized environments
US10248460B2 (en) Storage management computer
US20130247056A1 (en) Virtual machine control method and virtual machine
US11150951B2 (en) Releasable resource based preemptive scheduling
US10606516B2 (en) Systems and methods for I/O prioritization in NVMe-compliant storage devices
JP2016167143A (en) Information processing system and control method of information processing system
KR20110019729A (en) Scheduling Collections in the Scheduler
US20150237140A1 (en) Data storage systems and methods
WO2015114745A1 (en) Computer and computer i/o control method
JPWO2012066640A1 (en) Computer system, migration method and management server
JP2013205880A (en) Control device, control method, program, and decentralized processing system
US9542112B2 (en) Secure cross-process memory sharing
JP7104289B2 (en) Asynchronous updates of metadata tracks in response to cache hits generated via synchronous ingress and egress, systems, computer programs and storage controls
JP7197794B2 (en) Information processing device and execution control program
US8291426B2 (en) Memory allocators corresponding to processor resources
JPWO2014155555A1 (en) Management system and management program
US9582214B2 (en) Data access method and data access apparatus for managing initialization of storage areas
WO2016056060A1 (en) Computer and vector setting method
US10579419B2 (en) Data analysis in storage system
JP5867238B2 (en) Auto scaling method, auto scaling program and computer node

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14907965

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14907965

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP