From 81ebf6e707ec0f49e257b136ce0421cbba4f4819 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Fri, 19 Jun 2020 15:23:50 +0200 Subject: [PATCH] x86/hvm: check against VIOAPIC_LEVEL_TRIG in hvm_gsi_deassert MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In order to avoid relying on the specific values of VIOAPIC_{LEVEL/EDGE}_TRIG. No functional change. Requested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Release-acked-by: Paul Durrant --- xen/arch/x86/hvm/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index fd02cf2e8d..38ac5fb6c7 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -201,7 +201,7 @@ void hvm_gsi_deassert(struct domain *d, unsigned int gsi) int trig = vioapic_get_trigger_mode(d, gsi); struct hvm_irq *hvm_irq = hvm_domain_irq(d); - if ( trig <= VIOAPIC_EDGE_TRIG || gsi >= hvm_irq->nr_gsis ) + if ( trig != VIOAPIC_LEVEL_TRIG || gsi >= hvm_irq->nr_gsis ) { ASSERT(trig == VIOAPIC_EDGE_TRIG && gsi < hvm_irq->nr_gsis); return; -- 2.30.2