From patchwork Fri Jan 8 07:31:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Muthuswamy X-Patchwork-Id: 12005923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61EBDC433E0 for ; Fri, 8 Jan 2021 07:32:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2239F23403 for ; Fri, 8 Jan 2021 07:32:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726631AbhAHHb5 (ORCPT ); Fri, 8 Jan 2021 02:31:57 -0500 Received: from mail-co1nam11on2134.outbound.protection.outlook.com ([40.107.220.134]:24790 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725791AbhAHHb5 (ORCPT ); Fri, 8 Jan 2021 02:31:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kkMDAgRWCbRo0JXvcIoV5uWCnxKVs4wG02Vi2tUySXFhUtYbECQFpueBSx+gf9gYJ3UtH/FlLlENXX3VcuySfZ/Fx/wNT3U/JvYl/208rQbPWC/uEbyFytteF6KiDZHqrOGrrGv/Wc2SPz1ce+fUkjIlldxwbTjjA7pbUDY0WKrcxXE8+dqG2vOfnvDuzkI+BOGmYvRXuOUgyLTulz+nuP/brAdcyCY6nVm10kgrBl5OL6kT8qxrPKBgfWjjDpq4wO1EbRHPwJ+9ihqb9/2YcigD1Xlw3QNhc4OL+NWA90bxj1q1nQxD6ijxl7cMPYhEi3kFqYHUmoxbrqiP34w+0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zRQ0ZdUESidlGsbsjyMgnR/NapqB/+xGffCt+6KLgdc=; b=lLTX+xJckC6njFx5vmKkBNWkkC1vZqCdDCzcxTtk5UX/Jvmikyl2llP6pz7FA0bPCUAgLMfIajEednTGmamLS8i891gsXtC0kVOeEzMOs3wbcrbiuQqe2OrCypeMi6VzMfKrWh//nn8RqC8WdNIA6PDcmDufZUDrAhp05i5GuVImmfcPaGCrghuJUiuVtAgf0/JD8FODawbcsKmzwmLXuW2rbdkhh8Mzd3/TCHYsVe9avWeKF+vrSINCLqqiU1FZR8ZNVKQGmWeGIQM9p4kdUPxJtPD8yd+Fv5Wj5Tc1QMbnV3bXaCot0JuUfx+ZD3qDli7WE9p+tBwcv43+nBKiKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zRQ0ZdUESidlGsbsjyMgnR/NapqB/+xGffCt+6KLgdc=; b=QXrrEnomgwgnWaUG0MkD+FKucotZb9ccJu8Il2epgqH6o/NnGqZ9v0/JK12PAGSFilWM/qHeXyS3OyXmmZvji8snbu43MWZYIuf5cIm/FEfH/rWgbFeQzBU2YfgTe6KOPN9+tODUyWFBuhtkgVWCzwzCxKuPvPOvkC7MhScBZGQ= Received: from (2603:10b6:803:51::33) by SA0PR21MB1866.namprd21.prod.outlook.com (2603:10b6:806:ed::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.0; Fri, 8 Jan 2021 07:31:08 +0000 Received: from SN4PR2101MB0880.namprd21.prod.outlook.com ([fe80::18ca:96d8:8030:e4e8]) by SN4PR2101MB0880.namprd21.prod.outlook.com ([fe80::18ca:96d8:8030:e4e8%4]) with mapi id 15.20.3763.002; Fri, 8 Jan 2021 07:31:08 +0000 From: Sunil Muthuswamy To: KY Srinivasan , Boqun Feng , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thomas Gleixner , Ingo Molnar , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "\"H. Peter Anvin\"" , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , "linux-hyperv@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH v2 1/2] Hyper-V: pci: x64: Generalize irq/msi set-up and handling Thread-Topic: [PATCH v2 1/2] Hyper-V: pci: x64: Generalize irq/msi set-up and handling Thread-Index: Adbljt4x9C/tWN57TcS7/Z2kriU9tg== Date: Fri, 8 Jan 2021 07:31:08 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2601:602:9400:570:916:634a:e039:b890] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 0e9c4b3a-acbe-4508-f272-08d8b3a75dc7 x-ms-traffictypediagnostic: SA0PR21MB1866: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GNePyEutR/RaMbeiQNQ/dmhDIvvBb/np7S84ighQH4QltNeYCEW8pfOIeN97Xsr30HPkaac6YLSzwJ2F/vRwtuO7QEZyGbbBab9fPY/s6SN/Zg4vs2OS3gPd7NIWJrTYz0kCssUXcWL3dswDjPf0wtzkirneVm/1xnPqy7fh2Z+b+MVx+BFQAe6hRgBUuhgN9JUxTlxdcTDh3qVmaiNqE1wIsheSbQnfTuOvEy3qPK9DCSfiyA1id+EJTXLNvmoC5j1HKnvsl8xasH7N01m11aklDn4HFCA1o+t7XUEQQRak5A941yqVksTWCHger7STt2NOzZGmOat8iGOeCK1oH+VLPdhAVbdeT/QGmxvuaWd+xbMPPGViZbGTWAdt7rDaDPrHf0Cdktqeop4Xbf/tVhZC6WR4aANDzkICrg6TJ9LO0/b6XROh65B4LGMIeFam x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN4PR2101MB0880.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(136003)(396003)(376002)(366004)(346002)(86362001)(6506007)(921005)(8936002)(7416002)(33656002)(4326008)(110136005)(316002)(54906003)(8990500004)(7696005)(8676002)(478600001)(10290500003)(71200400001)(52536014)(186003)(82960400001)(9686003)(5660300002)(76116006)(66476007)(66946007)(83380400001)(64756008)(66556008)(55016002)(82950400001)(2906002)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: 6I15pTyzSubSQX8nN5MQUIM5T8qIVRWWrhJBvlcc2qPAuB1WhsLAREtBsuFdiakLKw6XiinbDyV+uoqjZE5h9M5aIR2s0mXyMR+6XSKi+JO2zDt3pBfO/zXc4z6Un+tr6Lqkv1iD4+73nSJgyWgHc7BIDEJTh7CQY7Y/DZzf/hkKQm3YuLgQG7BOYzDihda0WRixbjF0x3X44Za8F0uPi7KePZtXuP6/cFe/+8Si5NsmGkQlg3B6YHwnG9T6qvH4zNSKcb4mhg+fvLlVYFXxGCw5g4+iesaAfKOFIqqrlnYZghqGDn/oyVWUDJCCaKCYOLFLA43W9cuUOe1XGIDjVxhR3P6jDP702ZVYkc7eAsXPOEOWCi/szCT6/5rhFLJPyRgnDsK3aPNwSsHRsXkHt1fOtYjMlaavTPk34Ggww2xwWMwM1UiJ+HYg3sWkmBH9AtsnhmzABIuLASfli08WULmkcElHk6ZYuick/MvWLvbS9oYiP6KehM2vjTBbUAsHH6yEHeNW42kiVcWbfBox5K6q6cBotTGSLeeVEvdzZKUvtQRdErkiiEFanLU1wSlA5uyvs4bsElLzvTMEzyGNRO2X1Z+ncESwRboxPcx6TvJaxSgoU1jiS89ai09PNe6jRCOWlFWPm9+2t4R+Pjveu5s/2k2vbzbsGMqktwA3mO8tO8vTAi6qXMJH0v4IyS3eC2w02Wrs39K8wP7UEokmsW37ndUScmPXuVu4UDogH3qMZDYMQk8QHGoyQsCl5SiCfUzxCv/h4olUUNhVotR+cuE8EmRRWw228g/dpxjkzlvXzzXSIQC1nmkl5HvcgqoamYfE8D5chnn7Ifr7L30A/p6Tt8cJ0E3/HZPaVNXKcxUhlpAao3ulT95wDMzBwcx9odSz2Juqp+Z40efOAhjsn3/r6d9Gi2QKHVpPrYvb5ehsA1/mTda0AJMywV2DEcUq4+sEgZm9z34mIGfHL1144X4xqgNJysCZJCgrOfUoMvy+aK1xlcW0C2dcvjpO41WVwqg7vcs4Mbq+3v/O25krn9BC/vwoihuHa/6OryL6Ze4= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN4PR2101MB0880.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e9c4b3a-acbe-4508-f272-08d8b3a75dc7 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2021 07:31:08.5553 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bO3XaNFIZsO8a25DsARaEioBPoJLrAGOBWsFd6+xM1BINhFLfdGtlahPWGv0fgHHfnK2+a4bvyrkxkuuQHU98DpVq1s1ZDMchXDonhfepLA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR21MB1866 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Currently, operations related to irq/msi in Hyper-V vPCI are x86-specific code. In order to support virtual PCI on Hyper-V for other architectures, introduce generic interfaces to replace the x86-specific ones. There are no functional changes in this patch. Co-developed-by: Boqun Feng (Microsoft) Signed-off-by: Boqun Feng (Microsoft) Signed-off-by: Sunil Muthuswamy --- In V2: - Addressed feedback on SoB tab. - Added a second patch to move the MSI entry definition. --- arch/x86/include/asm/mshyperv.h | 24 +++++++++++++++++++++ drivers/pci/controller/pci-hyperv.c | 33 +++++++++++++++++------------ 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h index ffc289992d1b..05b32ef57e34 100644 --- a/arch/x86/include/asm/mshyperv.h +++ b/arch/x86/include/asm/mshyperv.h @@ -245,6 +245,30 @@ bool hv_vcpu_is_preempted(int vcpu); static inline void hv_apic_init(void) {} #endif +#define hv_msi_handler handle_edge_irq +#define hv_msi_handler_name "edge" +#define hv_msi_prepare pci_msi_prepare + +/* Returns the Hyper-V PCI parent MSI vector domain. */ +static inline struct irq_domain *hv_msi_parent_vector_domain(void) +{ + return x86_vector_domain; +} + +/* Returns the interrupt vector mapped to the given IRQ. */ +static inline unsigned int hv_msi_get_int_vector(struct irq_data *data) +{ + struct irq_cfg *cfg = irqd_cfg(data); + + return cfg->vector; +} + +/* Get the IRQ delivery mode. */ +static inline u8 hv_msi_irq_delivery_mode(void) +{ + return APIC_DELIVERY_MODE_FIXED; +} + static inline void hv_set_msi_entry_from_desc(union hv_msi_entry *msi_entry, struct msi_desc *msi_desc) { diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 6db8d96a78eb..9ca740d275d7 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -43,12 +43,11 @@ #include #include #include -#include -#include #include #include #include #include +#include #include /* @@ -1194,7 +1193,6 @@ static void hv_irq_mask(struct irq_data *data) static void hv_irq_unmask(struct irq_data *data) { struct msi_desc *msi_desc = irq_data_get_msi_desc(data); - struct irq_cfg *cfg = irqd_cfg(data); struct hv_retarget_device_interrupt *params; struct hv_pcibus_device *hbus; struct cpumask *dest; @@ -1223,7 +1221,7 @@ static void hv_irq_unmask(struct irq_data *data) (hbus->hdev->dev_instance.b[7] << 8) | (hbus->hdev->dev_instance.b[6] & 0xf8) | PCI_FUNC(pdev->devfn); - params->int_target.vector = cfg->vector; + params->int_target.vector = hv_msi_get_int_vector(data); /* * Honoring apic->delivery_mode set to APIC_DELIVERY_MODE_FIXED by @@ -1324,7 +1322,7 @@ static u32 hv_compose_msi_req_v1( int_pkt->wslot.slot = slot; int_pkt->int_desc.vector = vector; int_pkt->int_desc.vector_count = 1; - int_pkt->int_desc.delivery_mode = APIC_DELIVERY_MODE_FIXED; + int_pkt->int_desc.delivery_mode = hv_msi_irq_delivery_mode(); /* * Create MSI w/ dummy vCPU set, overwritten by subsequent retarget in @@ -1345,7 +1343,7 @@ static u32 hv_compose_msi_req_v2( int_pkt->wslot.slot = slot; int_pkt->int_desc.vector = vector; int_pkt->int_desc.vector_count = 1; - int_pkt->int_desc.delivery_mode = APIC_DELIVERY_MODE_FIXED; + int_pkt->int_desc.delivery_mode = hv_msi_irq_delivery_mode(); /* * Create MSI w/ dummy vCPU set targeting just one vCPU, overwritten @@ -1372,7 +1370,6 @@ static u32 hv_compose_msi_req_v2( */ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) { - struct irq_cfg *cfg = irqd_cfg(data); struct hv_pcibus_device *hbus; struct vmbus_channel *channel; struct hv_pci_dev *hpdev; @@ -1422,7 +1419,7 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) size = hv_compose_msi_req_v1(&ctxt.int_pkts.v1, dest, hpdev->desc.win_slot.slot, - cfg->vector); + hv_msi_get_int_vector(data)); break; case PCI_PROTOCOL_VERSION_1_2: @@ -1430,7 +1427,7 @@ static void hv_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) size = hv_compose_msi_req_v2(&ctxt.int_pkts.v2, dest, hpdev->desc.win_slot.slot, - cfg->vector); + hv_msi_get_int_vector(data)); break; default: @@ -1541,12 +1538,13 @@ static struct irq_chip hv_msi_irq_chip = { .irq_compose_msi_msg = hv_compose_msi_msg, .irq_set_affinity = hv_set_affinity, .irq_ack = irq_chip_ack_parent, + .irq_eoi = irq_chip_eoi_parent, .irq_mask = hv_irq_mask, .irq_unmask = hv_irq_unmask, }; static struct msi_domain_ops hv_msi_ops = { - .msi_prepare = pci_msi_prepare, + .msi_prepare = hv_msi_prepare, .msi_free = hv_msi_free, }; @@ -1565,17 +1563,26 @@ static struct msi_domain_ops hv_msi_ops = { */ static int hv_pcie_init_irq_domain(struct hv_pcibus_device *hbus) { + struct irq_domain *parent_domain; + + parent_domain = hv_msi_parent_vector_domain(); + if (!parent_domain) { + dev_err(&hbus->hdev->device, + "Failed to get parent MSI domain\n"); + return -ENODEV; + } + hbus->msi_info.chip = &hv_msi_irq_chip; hbus->msi_info.ops = &hv_msi_ops; hbus->msi_info.flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX); - hbus->msi_info.handler = handle_edge_irq; - hbus->msi_info.handler_name = "edge"; + hbus->msi_info.handler = hv_msi_handler; + hbus->msi_info.handler_name = hv_msi_handler_name; hbus->msi_info.data = hbus; hbus->irq_domain = pci_msi_create_irq_domain(hbus->sysdata.fwnode, &hbus->msi_info, - x86_vector_domain); + parent_domain); if (!hbus->irq_domain) { dev_err(&hbus->hdev->device, "Failed to build an MSI IRQ domain\n"); From patchwork Fri Jan 8 07:31:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil Muthuswamy X-Patchwork-Id: 12005925 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05303C433E0 for ; Fri, 8 Jan 2021 07:33:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E4B123403 for ; Fri, 8 Jan 2021 07:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727294AbhAHHci (ORCPT ); Fri, 8 Jan 2021 02:32:38 -0500 Received: from mail-mw2nam12on2108.outbound.protection.outlook.com ([40.107.244.108]:24065 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725791AbhAHHci (ORCPT ); Fri, 8 Jan 2021 02:32:38 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kPJZrw6/HcOPD++SigxIVprdoehQuvtUAJfwLhvGUI72nf6YW/8do1KqIYzgFFj2foarUzAINt3AR10MMPQXNcFq3apwgQRmgr6nJ2TURja03wq04kL4jCe9/MtQ3d9GI4uE1hlUnJb55GNlrYZnuFulQOjwJfviXWPWsFIIclB6bdcgHMG2SHWtKKu9O54GnlO6/I7xFcI13l3MEYHG5GaNq/7bqDVaen8w/rMMN47PwF0Imod5gPFSGQsRqLZs015ynp3fqQ0O6NArZXvTRtmSO/0L6Q8OLr0R+pYG4IGGhgejum96COChph7PohSOXYoSP8B4SwrfFPnwybetvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qVTxoE1QUzwMKtwMl9XME4rEzaamZPT91LpMepGuOII=; b=T/e/TQkd03k6FExKPr34ydH/bzPXPCeC24uadbj5mZ27qlU7tliQnfv6JGY1XLjE2k7CLkjqpsogKBcGcm5F6KUmmmxaEdFylpF2aB31sHE3ljEdLZ3ElzIMCgeFrkO0N6DagjCMr5FemnnlWyUEDSVJXGmembI9Ba/G3Qkv2irMMzfK0CYASDz6n7+VOQN0wgCQQ/1dauUB+o5WV7jjOnErDRlkkNUkYU/cKmX52obzFUQfzY572ivxbGIGqO4h7t+uvKt5oFPUBTlF/9qngepxzeYc3z6lGG9Hdakj9l/lqt04zWkz4EemlA+7tVNoyZdTM7BYPqu6Jd6x2T1TLw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qVTxoE1QUzwMKtwMl9XME4rEzaamZPT91LpMepGuOII=; b=jv1aZDz46vxC7hGTrouXp6JmPAFrLwVsIo1hn27vJfzwyH641hA6EEklaKgPP155hMUE8uTLTDyw/QcXka03J38tCg0/MQbVIMPngijRbgfCdYlljeN5CNrgqNiMRIpJtEBN2T3UrPt3q8Uu6VGXOEpY+5BA/6TS1I+kWqt89sM= Received: from (2603:10b6:803:51::33) by SA0PR21MB1866.namprd21.prod.outlook.com (2603:10b6:806:ed::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.0; Fri, 8 Jan 2021 07:31:19 +0000 Received: from SN4PR2101MB0880.namprd21.prod.outlook.com ([fe80::18ca:96d8:8030:e4e8]) by SN4PR2101MB0880.namprd21.prod.outlook.com ([fe80::18ca:96d8:8030:e4e8%4]) with mapi id 15.20.3763.002; Fri, 8 Jan 2021 07:31:19 +0000 From: Sunil Muthuswamy To: KY Srinivasan , Boqun Feng , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thomas Gleixner , Ingo Molnar , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "\"H. Peter Anvin\"" , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , "linux-hyperv@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: [PATCH v2 2/2] Hyper-V: pci: x64: Moving the MSI entry definition to arch specific location Thread-Topic: [PATCH v2 2/2] Hyper-V: pci: x64: Moving the MSI entry definition to arch specific location Thread-Index: Adblj4px1LjTTBMqRhiKACld+P9Rww== Date: Fri, 8 Jan 2021 07:31:19 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: microsoft.com; dkim=none (message not signed) header.d=none;microsoft.com; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2601:602:9400:570:916:634a:e039:b890] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a516eeff-eeae-4868-2a47-08d8b3a76411 x-ms-traffictypediagnostic: SA0PR21MB1866: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3826; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8+9MnKuwopgLZCNInH51Pp0y5baWaZ69FzyK5LEPogZE1rruowbMHi3oOnWvaiGVQfH8knUb3bS44R8BwSsKrYgqqmqac5IM8OXI3f1WTA42fvizcw1j7ZdNYUNayE0aNCwWoh8g/Y4BMlcslUZ+0KVg5UY3fGE6EZwss+9WVTKJxbR+riIbYFVRkZzTIMlNL4AeLoimVPkiVqAY0YdVq9ZQbBSTQFoiELA5aT/EZ/yZyUJlEoNK5dUAebc1+2JLAhCODrZrjziapPeYdZftr8BuT3c36gP02QCl6LCNyqeYZZEjsE6Rr/sA132sBgq28hrtjq2bGyPtfla54OK+y/hdJblDNmwic9SEGCpL1WGcw8pJFq4+xwvvLPf2OzbK3s1n6C+SS/IuZJw15EMrIQAy3oDZg6r2Wtdi62y9k1W/UfKT9daudSuV3xVfjMAR x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN4PR2101MB0880.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(136003)(396003)(376002)(366004)(346002)(86362001)(6506007)(921005)(8936002)(7416002)(33656002)(4326008)(110136005)(316002)(54906003)(8990500004)(7696005)(8676002)(478600001)(10290500003)(71200400001)(52536014)(186003)(82960400001)(9686003)(5660300002)(76116006)(66476007)(66946007)(83380400001)(64756008)(66556008)(55016002)(82950400001)(2906002)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: QrtWd1djOG0MUH7eaNUpSxawgZhGnPVO0SA3Wg6WwUvP1FYApPbFJCEWSNTFKb/2eZIAClgHAshB+7daAED01cUCsQhUcl0jjoPS/RosT9WzOgHIkU/TpZ29602x+r6mrnLHxkr30XsNaWqOwoXhkgY+f5w0OmCp1Y8s91G0dO+0D4zrYnVSuCk6obhgtoyJbU+cxC82o5PfQKCfgT2nz533rs7zleP3/h1jm5pAusNrCusCAixpr88Y+/L37TZzx+dYOxTkpww988MDBpuiVidPAKPr1jZdxpVlkI+Wyqx67PsQx6eBqj433yrAjkiRx/v+nf+0ocsB4GuTYgHijxpvj5Qc/PQCiB+D5RSKqU8YcoYW/21gyZv/grwMAMBum9SLTizu5n8/wdODQTSuK9OOGSmeXAehrPncIHFyUWP58iJoyKgh+RBD7EHy+lluO1cvHN3Ql5Y9VpyoV5MVPoSg1SbWG9exz/KwoijI9ti+O1CgDvRRECO1tx0cyqELlVjieYB35eTldyFTzhlXf++qz53HtBAszWjeQYJolqh2w0684RM5S5uhuc26qIHAKM8ULYXUvuNqlm665dVzuwAN2vjGTCXU3hUkytn7ruH13Tc3bGsYCWas5PubL5b/8BpHKnu9yy4rVOBnchDE0pwI2/hTpjPAbNQzbO31fQTSKSHFdMwI9q7QANyh4qj5E+AaNDj3zD8/JCsnU9VR21cJQMo1njPdmi0BoRbxqLrOV4n2LN1fSD6y5xSd81mL4kh97HqRc7Hs4dyUecbtVWC4o2IN4wWvQfHAHoJyT6g8JMUIhBsmF1xVwHPJxsBDtlhrKWoyJRRirQ9Ss5Os3q7KBgObwnBNz2hjxpfabysPhZ7f8OndJvujMdo6Hwyl1P7f3BOio4aVEUmi55RjVFTEq7Qt1/I2Y4bc0qxf3HgRpz5qOEs0/CTcxTrnA7yXu7IeRYgHBp/nRvM40wIpa0XGg+D4SbgskfU22HhIzaEOM0x2MI6TWGg88qK2kJpSv+DzAvAbRpXlfbGy3nAA+gLuzpfitk8ry6OpGLfEzRA= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN4PR2101MB0880.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a516eeff-eeae-4868-2a47-08d8b3a76411 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2021 07:31:19.0965 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TeDYkJgRxav/Dsjkv/QHb2yqMp3lee7D0A9iXT09OjmKVwf+e1a7zVwjELoGK+8a8WID4UmKKV/wIP9K20FqektuirUPodgWSIpzK+suBh8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR21MB1866 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The Hyper-V MSI entry is architecture specific. Currently, it is defined in an arch neutral location. This patch moves it to an arch specific location. Signed-off-by: Sunil Muthuswamy --- arch/x86/include/asm/hyperv-tlfs.h | 7 +++++++ include/asm-generic/hyperv-tlfs.h | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index 6bf42aed387e..a15c17c7f019 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -523,6 +523,13 @@ struct hv_partition_assist_pg { u32 tlb_lock_count; }; +union hv_msi_entry { + u64 as_uint64; + struct { + u32 address; + u32 data; + } __packed; +}; #include diff --git a/include/asm-generic/hyperv-tlfs.h b/include/asm-generic/hyperv-tlfs.h index e73a11850055..6265f4494970 100644 --- a/include/asm-generic/hyperv-tlfs.h +++ b/include/asm-generic/hyperv-tlfs.h @@ -408,14 +408,6 @@ struct hv_tlb_flush_ex { } __packed; /* HvRetargetDeviceInterrupt hypercall */ -union hv_msi_entry { - u64 as_uint64; - struct { - u32 address; - u32 data; - } __packed; -}; - struct hv_interrupt_entry { u32 source; /* 1 for MSI(-X) */ u32 reserved1;