In order to support hardware virtualization, we need to be able to
check if there are any interrupts pending irregardless of the
rflags.intf value. This changeset adds the checkInterruptsRaw() method
to the x86 interrupt control. It returns true if there are pending
interrupts that can be delivered as soon as the CPU is ready for
interrupt delivery.
return false;
}
+bool
+X86ISA::Interrupts::checkInterruptsRaw() const
+{
+ return pendingUnmaskableInt || pendingExtInt ||
+ (IRRV > ISRV && bits(IRRV, 7, 4) >
+ bits(regs[APIC_TASK_PRIORITY], 7, 4));
+}
+
Fault
X86ISA::Interrupts::getInterrupt(ThreadContext *tc)
{
*/
bool checkInterrupts(ThreadContext *tc) const;
+ /**
+ * Check if there are pending interrupts without ignoring the
+ * interrupts disabled flag.
+ *
+ * @return true if there are interrupts pending.
+ */
+ bool checkInterruptsRaw() const;
Fault getInterrupt(ThreadContext *tc);
void updateIntrInfo(ThreadContext *tc);