From nobody Tue Feb 10 05:45:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1595869588; cv=none; d=zohomail.com; s=zohoarc; b=ONx9QjIehsRNHr0NmB3ze2nFzPKCWG8RjwcwEJfGqdXibHwbHFE66WmTTrgv3sbXQhbNQyoKoe94h9m9sp8vEXjdOS7LY5cH1M8OOBSQhQ8EPLefIagVmGvl3r/+eX99WNPaHLIJRtQ8oF28SPkARfaQUAju/3KA6ZebGObq47c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595869588; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0jz9wIvDZuiZID0JIXeJ9zg+pUU1nefbB1xiWUaCZyg=; b=JvKFpEzUmlKXziCUY1gAPJ/eucaW0wAmAjzyLrwfxXvJNmwRffef2tIFhMxH1Zn4Lo2RhKb8R9oE6dplheq0TD7juguNnam7LA39bLgwEnnxfk2w/YqVJTJQIFvvFFPW2yfGFd+fLPV5s7x5OH4sHqkIu3Q1n8xRjdVoVpp4tBw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1595869588507332.4022966269516; Mon, 27 Jul 2020 10:06:28 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k06Zf-0006s7-Rz; Mon, 27 Jul 2020 17:06:03 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k06Ze-0006s0-Vf for xen-devel@lists.xenproject.org; Mon, 27 Jul 2020 17:06:03 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 72e92cc6-d02b-11ea-8ad9-bc764e2007e4; Mon, 27 Jul 2020 17:06:02 +0000 (UTC) X-Inumbo-ID: 72e92cc6-d02b-11ea-8ad9-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1595869562; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dFV/5IIieWSOyYLpuMea63bzinjrU9UWYgTJ7LkynSg=; b=QN/r0ryMllnh41ZJKvznUKbIbis/5iIlLxAEBhsmugf+38kyo0ZAJPbD Ivv9H5uc2zmJ3IxCwawAQJ3QD3BMFpf1cL2Yz3KCORa/4DAKhu6bNbbhQ XMY6Z6XYyWzDBaArK3wTZwW+WRi3uxeYxG1lOd+vBU59emlFmlwf5rVwU M=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: yX0Ucm7OmM9ftMh86I8MenFv19Jl15favDXMS1gmwiOs726c9E7XWQ6DfS6NhCbf7Yx5kJlvun ICR0PpJB8CmlbWKP8a2CS8m4x4dRvg9TZATeU3UTnouR72F0u4sS++/mxdQ+m9xRGC+WuANi63 ANe5dWZrpj/Ur3UEuG74BTf4G92WneT9hdmOqi4hVFVnKIAeX9V+bbrWXru+MyXroPqGn9HBU0 1lKGaH01YRIvIe7PhSUGzPYHchfzMuzPzCmw6J7WYHBbkpEGiJ7vDxc2s9Pk76huPiTWGQypCD 35k= X-SBRS: 2.7 X-MesageID: 23469017 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,402,1589256000"; d="scan'208";a="23469017" From: Roger Pau Monne To: Subject: [PATCH v2 5/5] x86/hvm: only translate ISA interrupts to GSIs in virtual timers Date: Mon, 27 Jul 2020 19:05:39 +0200 Message-ID: <20200727170539.55798-6-roger.pau@citrix.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727170539.55798-1-roger.pau@citrix.com> References: <20200727170539.55798-1-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Reviewed-by: Jan Beulich --- Changes since v1: - Delay the setting of gsi a bit. --- 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..c68bbd1558 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -86,13 +86,13 @@ static int pt_irq_vector(struct periodic_time *pt, enum= hvm_intsrc src) return pt->irq; =20 isa_irq =3D pt->irq; - gsi =3D hvm_isa_irq_to_gsi(isa_irq); =20 if ( src =3D=3D hvm_intsrc_pic ) return (v->domain->arch.hvm.vpic[isa_irq >> 3].irq_base + (isa_irq & 7)); =20 ASSERT(src =3D=3D hvm_intsrc_lapic); + gsi =3D pt->source =3D=3D PTSRC_isa ? hvm_isa_irq_to_gsi(isa_irq) : pt= ->irq; vector =3D vioapic_get_vector(v->domain, gsi); if ( vector < 0 ) { --=20 2.27.0