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

[PATCH for-4.14 5/8] x86/hvm: only translate ISA interrupts to GSIs in virtual timers


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 12 Jun 2020 17:56:37 +0200
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, paul@xxxxxxx
  • Delivery-date: Fri, 12 Jun 2020 15:57:24 +0000
  • Ironport-sdr: rVAZ4lcV09ivW5keN6zjsXLA88pLfNsACRUUlIrMjY0Np5SExn6kfS/MQ39zwDOZc/r4NY9NQi oa+niKpIOqTzC7qZN+SdHYA8agDCLiZZGPM6p/clhXW7jR/ogaTT4LeqZL6jwMN6f0X9egi3xX EBrvU2B3oUdCMR+ayxGN9l0tO26jz9tz/Try8F0FaOeVOaVrv7OmH0/pQoCeuh0iUT458ogL35 vmqnKSRxO9V4I1UAIuY/JInBXcH6MKNCARP07by0SEtbDOK+xK6iubEoG8YEGOX4DDj2OV53qW Hts=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Only call hvm_isa_irq_to_gsi for ISA interrupts, interrupts
originating from an IO APIC pin already use a GSI and don't need to be
translated.

I haven't observed any issues from this, but I think it's better to
use it correctly.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index 62c87867c5..6a975fc668 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -86,7 +86,7 @@ static int pt_irq_vector(struct periodic_time *pt, enum 
hvm_intsrc src)
         return pt->irq;
 
     isa_irq = pt->irq;
-    gsi = hvm_isa_irq_to_gsi(isa_irq);
+    gsi = pt->source == PTSRC_isa ? hvm_isa_irq_to_gsi(isa_irq) : pt->irq;
 
     if ( src == hvm_intsrc_pic )
         return (v->domain->arch.hvm.vpic[isa_irq >> 3].irq_base
-- 
2.26.2




 


Rackspace

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