Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2119176pxk; Mon, 14 Sep 2020 05:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzwvcKLbMOOycCE9ioxhcD6iKJtvs/kASM/rIsBuJbbkuCSWcsFfxYFvrcNHGV67gQrV+v X-Received: by 2002:a50:e80a:: with SMTP id e10mr17068230edn.4.1600086220785; Mon, 14 Sep 2020 05:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600086220; cv=none; d=google.com; s=arc-20160816; b=d7wAqET01YCxxUy6wkizcewPyHBHHalEmBAh9Aurfp1y1fY3xOHfGRX/i77HIa4/ad ci8UH3xhr0vFjsoaQyge6rv5Ctk6f0G8nS1JgpmKsbWMfdJF7aRQDjBOzaMMQ3hkEVho 0p6x7m4kiLlwjRkhpv322cVaueRWr9y3tWAreipFFugyqHOl2TD8RTHKosueBzDP9EM5 9qqZNAcoDC4j0bPav7hpfwLirhlSBvMyF+4ojdldnprPxe0b8gazUWPg29+pw0Q6lHCY lYMquh5ttfqUPCGqSGP7IPpxoGFc6slf+Zr6m7Va8H+LqzlHTSHLhHc7VHyA0ar+9w1J eZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=PCmCr3SdPqpCYBFfCy32K6SA3OwSEdGb0+Meki4uGYs=; b=PKMWc7G2ieR8j/t8hqmRKgceLg9qDtWBt3y5E9yEIyujHW8W2hdFrJQmQkZJYKkbvc JwNXfYjhxdfGVa5nYCNmtOXbAlNHp4C3FtKWAWGlkoRwSXT6AR+pEtAzw0cygMSNT/YB lnSQdt32mDFL5NdMuXgwsnS0UEyfE7NR76PgD/EoqEJenpDm1ojhEblh0m+uv3E/6IO7 fxhacOqP0hAhDj3egBHTERTGSKg82IEmzIwVHoN1kx4+ytoHGgsxlohfvjIhXv8F+6QK Ga845C5/+2Vrk49tqDHm4t98xjGBfVEJOFMWkPhimlLsOvilJ0k9LQVxn7BEDQOJANhI MsJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si7428110edl.424.2020.09.14.05.23.18; Mon, 14 Sep 2020 05:23:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726245AbgINMTr (ORCPT + 99 others); Mon, 14 Sep 2020 08:19:47 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:43320 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726141AbgINMGq (ORCPT ); Mon, 14 Sep 2020 08:06:46 -0400 Received: by mail-ed1-f65.google.com with SMTP id n13so17250293edo.10; Mon, 14 Sep 2020 05:06:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PCmCr3SdPqpCYBFfCy32K6SA3OwSEdGb0+Meki4uGYs=; b=kK0ciLyjYydx60XVlIMFH6mwZkVbgsETXC5ojtNHdsqrOIUKbGYFpTW7cXqQdH/DT1 WAvUGkjemCNEwCEBFJKofu+2LE3aJoBlRCugwtB/+FeC7AdYu5Q/uyO7NX/RZTxigkXJ uOCodSWJKEM94/7WEHE1TD/THklM10Pi7MRg6ydIHdnBlUM4lPJGtLX0/GTcHmYQwd+R ROCYRofveEdZjCH1jRl2LYIfujneUPPHfiIrl3fM9b515kPGqD9ypCYMbQ3vJ6kobFqe NTKWZrn6sYo7KAUF6u7RW2w5P5B0CeDHHNLE5ZrbtCOSWVZuEZjO3WHEkhC9eUhQyW9D 6Ffw== X-Gm-Message-State: AOAM533Nqv5XCQcvgi0LdWk8SO3IKmZHlFth6kP9WgrpSDplMcPM12Iv AiH5Vx9ictgzm3dlXCc3Lwta90Zqiuc= X-Received: by 2002:a5d:4e0b:: with SMTP id p11mr14965362wrt.13.1600084782684; Mon, 14 Sep 2020 04:59:42 -0700 (PDT) Received: from liuwe-devbox-debian-v2.j3c5onc20sse1dnehy4noqpfcg.zx.internal.cloudapp.net ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id c205sm18764809wmd.33.2020.09.14.04.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 04:59:42 -0700 (PDT) From: Wei Liu To: Linux on Hyper-V List Cc: virtualization@lists.linux-foundation.org, Linux Kernel List , Michael Kelley , Vineeth Pillai , Sunil Muthuswamy , Nuno Das Neves , Wei Liu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), "H. Peter Anvin" , Bjorn Helgaas , Andy Lutomirski Subject: [PATCH RFC v1 15/18] x86/apic/msi: export pci_msi_get_hwirq Date: Mon, 14 Sep 2020 11:59:24 +0000 Message-Id: <20200914115928.83184-7-wei.liu@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200914112802.80611-1-wei.liu@kernel.org> References: <20200914112802.80611-1-wei.liu@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linux will implement an MSI domain for MSI/MSI-X when running as root on Microsoft Hypervisor. It will be using this function to reduce code duplication. Signed-off-by: Wei Liu --- arch/x86/include/asm/msi.h | 3 +++ arch/x86/kernel/apic/msi.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/msi.h b/arch/x86/include/asm/msi.h index 25ddd0916bb2..5c0e102c03ec 100644 --- a/arch/x86/include/asm/msi.h +++ b/arch/x86/include/asm/msi.h @@ -11,4 +11,7 @@ int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, void pci_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc); +struct msi_domain_info; +irq_hw_number_t pci_msi_get_hwirq(struct msi_domain_info *info, msi_alloc_info_t *arg); + #endif /* _ASM_X86_MSI_H */ diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c index c2b2911feeef..dc9693a73933 100644 --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -205,11 +205,12 @@ void native_teardown_msi_irq(unsigned int irq) irq_domain_free_irqs(irq, 1); } -static irq_hw_number_t pci_msi_get_hwirq(struct msi_domain_info *info, +irq_hw_number_t pci_msi_get_hwirq(struct msi_domain_info *info, msi_alloc_info_t *arg) { return arg->msi_hwirq; } +EXPORT_SYMBOL_GPL(pci_msi_get_hwirq); int pci_msi_prepare(struct irq_domain *domain, struct device *dev, int nvec, msi_alloc_info_t *arg) -- 2.20.1