From 0885ebd5b1a2f4087620910c0b23c2a187aab59c Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Wed, 26 Aug 2015 18:13:53 +0200 Subject: [PATCH] vbox: make interruptibility state check conditional If the guest is not in an interruptible state when the recall handler is called, an assertion fails. Since the assertion is only relevant if the recall handler was called during IRQ injection, it should be moved into the corresponding conditional block which already has the assertion for the 'IF' flag. Fixes #1661 --- repos/ports/src/virtualbox/nova/vcpu.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/repos/ports/src/virtualbox/nova/vcpu.h b/repos/ports/src/virtualbox/nova/vcpu.h index b9d33109c..b7ccc44bf 100644 --- a/repos/ports/src/virtualbox/nova/vcpu.h +++ b/repos/ports/src/virtualbox/nova/vcpu.h @@ -168,18 +168,21 @@ class Vcpu_handler : public Vmm::Vcpu_dispatcher, Nova::Utcb * utcb = reinterpret_cast(Thread_base::utcb()); Assert(utcb->actv_state == ACTIVITY_STATE_ACTIVE); - if (utcb->intr_state != INTERRUPT_STATE_NONE) - Vmm::printf("intr state %x %x\n", utcb->intr_state, utcb->intr_state & 0xF); - - Assert(utcb->intr_state == INTERRUPT_STATE_NONE); if (utcb->inj_info & IRQ_INJ_VALID_MASK) { + Assert(utcb->flags & X86_EFL_IF); + + if (utcb->intr_state != INTERRUPT_STATE_NONE) + Vmm::printf("intr state %x %x\n", utcb->intr_state, utcb->intr_state & 0xF); + + Assert(utcb->intr_state == INTERRUPT_STATE_NONE); + /* if (!continue_hw_accelerated(utcb)) Vmm::printf("WARNING - recall ignored during IRQ delivery\n"); */ - /* got recall during irq injection and X86_EFL_IF set for + /* got recall during irq injection and the guest is ready for * delivery of IRQ - just continue */ Nova::reply(_stack_reply); }