[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/hvm: check against VIOAPIC_LEVEL_TRIG in hvm_gsi_deassert


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Tue, 16 Jun 2020 12:20:56 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 16 Jun 2020 10:21:21 +0000
  • Ironport-sdr: GRjBZsy9kxu0D/p6GaawKqY6WO/uPQJvwbc/G4q2KaQ5qaPOv+gop+SJ8batzusqcUb1Y33edI m4SsHnYVBJk+UlGeFhlNb5hYWSmC949pc+azg6CJEKS7JTk6c98734WQMpaIJWHpvaupGCi4Gs Qm+GicgBjYNaP8/yNiPO2FvMfjxB6kI8IFqchSmZ9UgZIwn3Z0Mk60u1ByOwQJqTIHk6paQXBV 1HbnjN3NQCdcnV0ExhnDJaFKCDBvco68gVfm1GOFSpOlEmlKuyvaJiM2Px7051woLMNExUVjfY J1o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

In order to avoid relying on the specific values of
VIOAPIC_{LEVEL/EDGE}_TRIG.

No functional change.

Requested-by: Jan Beulich <jbeulich@xxxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 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 6cbea63f4c..6772aec721 100644
--- a/xen/arch/x86/hvm/irq.c
+++ b/xen/arch/x86/hvm/irq.c
@@ -202,7 +202,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.26.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.