发明名称 Enhancing interrupt handling in a virtual environment
摘要 Systems and methods for enhancing the handling of interrupts in a virtual computing environment are disclosed. A CPU is configured such that the CPU, when in a virtual machine (VM) mode, directs an interrupt to a VM. When in the VM context, a guest in the VM is run with a hypervisor interrupt descriptor table (hypervisor IDT) to determine how the interrupt should be handled. The hypervisor IDT directs an interrupt that is to be handled by the VM to an interrupt handler in a guest IDT without causing a transition to the hypervisor. If an interrupt is to be handled by the hypervisor, the hypervisor IDT causes a transition to the hypervisor.
申请公布号 US8892802(B2) 申请公布日期 2014.11.18
申请号 US201213342049 申请日期 2012.01.01
申请人 International Business Machines Corporation 发明人 Amit Nadav;Ben-Yehuda Shmuel;Gordon Abel;Har'El Nadav Yosef;Landau Alexander
分类号 G06F13/24;G06F13/32;G06F9/455;G06F9/46 主分类号 G06F13/24
代理机构 代理人 Patel Jinesh;Gilboa Eyal
主权项 1. A method for enhancing the handling of interrupts in a virtual computing environment, comprising: determining whether a CPU is running in guest mode, wherein a guest is executed over a virtual machine (VM) and the VM is supported by a hypervisor running on the CPU; responsive to determining that the CPU is running in guest mode, forwarding an interrupt to the VM over which the guest is executed; and responsive to determining that the CPU is not running in guest mode, forwarding an interrupt to the hypervisor to handle; wherein in the guest mode, the guest is executed over the VM with a hypervisor interrupt descriptor table (hypervisor IDT) mapped to the guest address space, such that the VM is able to use the hypervisor IDT to handle the interrupt, wherein, in response to the VM determining, according to the entries in the hypervisor IDT, that the interrupt is generated by a physical device assigned to the guest, the VM forwards the interrupt to the guest to be handled by an interrupt handler in a guest IDT, wherein, in response to the VM determining, according to the entries in the hypervisor IDT, that the interrupt is not generated by a physical device assigned to the guest, the VM causes the CPU to transition to the hypervisor, wherein transitioning to the hypervisor includes passing a first interrupt vector number corresponding to the hypervisor IDT, wherein, in response to the CPU transitioning to the hypervisor, the hypervisor invokes a second interrupt vector corresponding to a second guest to which the physical device is assigned, and routes the interrupt to the second guest by remapping the first interrupt vector to a corresponding vector of a second guest IDT associated with the second guest, and wherein the remapping comprises converting the first interrupt vector number to a vector number used by the second guest's interrupt handler code.
地址 Armonk NY US