Interrupt handling in a virtual machine environment
AssigneeMellanox Technologies, Ltd.
InventorMichael Kagan
Life of this patent
Estimating the term…
Abstract
A method for computing includes running a plurality of virtual machines on a computer having one or more cores and a memory. Upon occurrence of an event pertaining to a given virtual machine during a period in which the given virtual machine is unable to receive an interrupt, an interrupt message is written to a pre-assigned interrupt address in the memory. When the given virtual machine is able to receive the interrupt, after writing of the interrupt message, a context of the given virtual machine is copied from the memory to a given core on which the given virtual machine is running, and a hardware interrupt is automatically raised on the given core responsively to the interrupt message in the memory.
Claims16
A method for computing, comprising:
- running a plurality of virtual machines on a computer having one or more cores and a memory and a peripheral device that is coupled to the one or more cores;
- upon occurrence of an event originating at the peripheral device and pertaining to a given virtual machine, identifying at the peripheral device whether the given virtual machine is active or swapped out;
- raising a hardware interrupt immediately upon identifying by the peripheral device that the given virtual machine is active;
- upon identifying by the peripheral device that the given virtual machine is swapped out, writing an interrupt message from the peripheral device to a pre-assigned interrupt address in the memory;
- and
- when the given virtual machine is able to receive the interrupt, after writing of the interrupt message, copying a context of the given virtual machine from the memory to a given core on which the given virtual machine is running, and automatically raising a hardware interrupt on the given core responsively to the interrupt message in the memory.
Computing apparatus, comprising:
- one or more computing cores, configured to run a plurality of virtual machines;
- a memory, connected to the computing cores;
- and
- a peripheral device, which is connected to the cores and the memory and is configured, upon occurrence of an event originating at the peripheral device and pertaining to a given virtual machine during a period in which the given virtual machine is unable to receive the interrupt, to write an interrupt message to a pre-assigned interrupt address in the memory,
- wherein the peripheral device is configured to identify whether the given virtual machine is active or swapped out, and to decide to write the interrupt message to the memory when the given virtual machine is swapped out or to raise a hardware interrupt immediately when the given virtual machine is active, and
- wherein the cores are configured, when the given virtual machine is able to receive the interrupt, after writing of the interrupt message, to copy a context of the given virtual machine from the memory to a given core on which the given virtual machine is running, and to automatically raise the hardware interrupt on the given core responsively to the interrupt message in the memory.
Dependencies are inferred from the claim text.