From 6f59dc12962be61ef84774d0630bdb7c1050851f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Thu, 1 Apr 2021 16:41:48 +0200 Subject: [PATCH] x86/vioapic: top word redir entry writes don't trigger interrupts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- xen/arch/x86/hvm/vioapic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c index 804bc77279..e3ee747b7d 100644 --- a/xen/arch/x86/hvm/vioapic.c +++ b/xen/arch/x86/hvm/vioapic.c @@ -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); } -- 2.30.2