]> xenbits.xensource.com Git - xen.git/commitdiff
x86/vioapic: top word redir entry writes don't trigger interrupts
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 1 Apr 2021 14:41:48 +0000 (16:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 1 Apr 2021 14:41:48 +0000 (16:41 +0200)
Top word writes just update the destination of the interrupt, but
since there's no change on the masking or the triggering mode no
guest interrupt injection can result of such write. Add an assert to
that effect.

Requested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vioapic.c

index 804bc77279387ca713c76a738f935255ed957811..e3ee747b7d396ef7fa2a9bcf833233dd310a6730 100644 (file)
@@ -262,6 +262,8 @@ static void vioapic_write_redirent(
               !ent.fields.remote_irr &&
               hvm_irq->gsi_assert_count[gsi] )
     {
+        /* A top word write should never trigger an interrupt injection. */
+        ASSERT(!top_word);
         pent->fields.remote_irr = 1;
         vioapic_deliver(vioapic, idx);
     }