Virtualizing interrupt priority and delivery
First Claim
1. A processor for virtualizing interrupt prioritization and delivery comprising:
- an instruction hardware to receive a plurality of instructions, including a first instruction to transfer the processor from a root mode to a non-root mode for executing guest software in a virtual machine, wherein the processor is to return to the root mode upon the detection of any of a plurality of virtual machine exit events;
an execution hardware to execute the first instruction, the execution of the first instruction to include determining a first virtual processor-priority value by computing the maximum of a highest priority virtual interrupt in-service field of a virtual machine control structure and a virtual task-priority register value, and storing the first virtual processor-priority value in a virtual copy of a processor-priority field, where the virtual copy of the processor-priority field is a virtual resource corresponding to a physical resource associated with an interrupt controller;
the execution hardware to determine;
in non-root mode, whether a virtual interrupt is to be delivered by comparing a highest priority virtual interrupt-requested field of the virtual machine control structure and the first processor-priority value, and to deliver the virtual interrupt in response to determining that the highest priority virtual interrupt-requested field is greater than the first virtual processor-priority value, or to hold the virtual interrupt pending in response to determining that the highest priority virtual interrupt-requested field is not greater than the first virtual processor-priority value; and
in non-root mode, whether the virtual interrupt is to be delivered at a boundary between a second instruction and a third instruction by determining whether delivery of virtual interrupts is masked at the boundary, and to deliver the virtual interrupt in response to determining that delivery of virtual interrupts is unmasked, or to execute the third instruction in non-root mode in response to determining that delivery of virtual interrupts is masked.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of processors, methods, and systems for virtualizing interrupt prioritization and delivery are disclosed. In one embodiment, a processor includes instruction hardware and execution hardware. The instruction hardware is to receive a plurality of instructions, including a first instruction to transfer the processor from a root mode to a non-root mode for executing guest software in a virtual machine, wherein the processor is to return to the root mode upon the detection of any of a plurality of virtual machine exit events. The execution hardware is to execute the first instruction, execution of the first instruction to include determining a first virtual processor-priority value and storing the first virtual processor-priority value in a virtual copy of a processor-priority field, where the virtual copy of the processor-priority field is a virtual resource corresponding to a physical resource associated with an interrupt controller.
15 Citations
13 Claims
-
1. A processor for virtualizing interrupt prioritization and delivery comprising:
-
an instruction hardware to receive a plurality of instructions, including a first instruction to transfer the processor from a root mode to a non-root mode for executing guest software in a virtual machine, wherein the processor is to return to the root mode upon the detection of any of a plurality of virtual machine exit events; an execution hardware to execute the first instruction, the execution of the first instruction to include determining a first virtual processor-priority value by computing the maximum of a highest priority virtual interrupt in-service field of a virtual machine control structure and a virtual task-priority register value, and storing the first virtual processor-priority value in a virtual copy of a processor-priority field, where the virtual copy of the processor-priority field is a virtual resource corresponding to a physical resource associated with an interrupt controller; the execution hardware to determine; in non-root mode, whether a virtual interrupt is to be delivered by comparing a highest priority virtual interrupt-requested field of the virtual machine control structure and the first processor-priority value, and to deliver the virtual interrupt in response to determining that the highest priority virtual interrupt-requested field is greater than the first virtual processor-priority value, or to hold the virtual interrupt pending in response to determining that the highest priority virtual interrupt-requested field is not greater than the first virtual processor-priority value; and in non-root mode, whether the virtual interrupt is to be delivered at a boundary between a second instruction and a third instruction by determining whether delivery of virtual interrupts is masked at the boundary, and to deliver the virtual interrupt in response to determining that delivery of virtual interrupts is unmasked, or to execute the third instruction in non-root mode in response to determining that delivery of virtual interrupts is masked. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method for virtualizing interrupt prioritization and delivery comprising:
-
receiving, by a processor, a first instruction to transfer the processor from a root mode to a non-root mode for executing guest software in a virtual machine, wherein the processor is to return to the root mode upon the detection of any of a plurality of virtual machine exit events; executing, by the processor, the first instruction, where execution includes determining a first virtual processor-priority value by computing the maximum of a highest priority virtual interrupt in-service field of a virtual machine control structure and a virtual task-priority register value, and storing the first virtual processor-priority value in a virtual copy of a processor-priority field, where the virtual copy of the processor-priority field is a virtual resource corresponding to a physical resource associated with an interrupt controller; determining, in non-root mode, whether a virtual interrupt is to be delivered by comparing a highest priority virtual interrupt-requested field of the virtual machine control structure and the first virtual processor priority value, and to deliver the virtual interrupt in response to determining that the highest priority virtual interrupt-requested field is greater than the first virtual processor-priority value, or to hold the virtual interrupt pending in response to determining that the highest priority virtual interrupt-requested field is not greater that the first virtual processor-priority; determining, in non-root mode, whether delivery of virtual interrupts is masked at a boundary between a second instruction to be executed and a third instruction; and delivering the virtual interrupt in response to determining that delivery of virtual interrupts is unmasked or executing the third instruction in non-root mode in response to determining that delivery of virtual interrupts is masked. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A system for virtualizing interrupt prioritization and delivery comprising:
-
a memory; and a processor including an instruction hardware to receive a plurality of instructions, including a first instruction to transfer the processor from a root mode to a non-root mode for executing guest software in a virtual machine, wherein the processor is to return to the root mode upon the detection of any of a plurality of virtual machine exit events; an execution hardware to execute the first instruction, the execution of the first instruction to include determining a virtual processor-priority value by computing the maximum of a highest priority virtual interrupt in-service field of a virtual machine control structure in the memory and a virtual task-priority register value, and storing the first virtual processor-priority value in the memory in a virtual copy of a processor-priority field, where the virtual copy of the processor-priority field is a virtual resource corresponding to a physical resource associated with an interrupt controller; the execution hardware to determine; in non-root mode, whether a virtual interrupt is to be delivered by comparing a highest priority virtual interrupt-requested field of the virtual machine control structure and the first processor-priority value, and to deliver the virtual interrupt in response to determining that the highest priority virtual interrupt-requested field is greater than the first virtual processor-priority value, or to hold the virtual interrupt pending in response to determining that the highest priority virtual interrupt-requested field is not greater than the first virtual processor-priority value; and in non-root mode, whether the virtual interrupt is to be delivered at a boundary between a second instruction and a third instruction by determining whether delivery of virtual interrupts is masked at the boundary, and to deliver the virtual interrupt in response to determining that delivery of virtual interrupts is unmasked, or to execute the third instruction in non-root mode in response to determining that delivery of virtual interrupts is masked.
-
Specification