From nobody Mon Feb 9 16:04:38 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; 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=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1619707664; cv=none; d=zohomail.com; s=zohoarc; b=Vx09l+81t8MIfq84V5yXdl7KfnmgSLOeBLyDPeHWTw66D5mZzc1F2iZmbhSRu4qiv+kFmgZ5AA8Xnb1ZLjANf8uyEF/ap1nayxr66t7JRHity+brVTDhnCZqJeM2r4JrH2bhx8TpsPJbgX0KFOBYTu4P++hk7enVnk7T3W/6c1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619707664; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=9zCfigqrsi9cYlNrs26ddDBV9gNFR73YdG73F1pFvs4=; b=BuMy8MDypg02h2MfisfpGh9orklaOTzt/XdBE1WlECgkbd+WaMs7XdtfW5ovxGHB8JcGCQhx2rI+LaztbzgFeCZr30VkhnGzRNMj6RwsNuDI21ugNlYD5DRioyB0HB/HETA+ir4fVSWtLTCKJVOd9HvxKR5wEk2KFZSMA92kNmI= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1619707664919600.2757767912733; Thu, 29 Apr 2021 07:47:44 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.120080.227069 (Exim 4.92) (envelope-from ) id 1lc7wy-00021D-1A; Thu, 29 Apr 2021 14:47:32 +0000 Received: by outflank-mailman (output) from mailman id 120080.227069; Thu, 29 Apr 2021 14:47:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lc7wx-000216-UO; Thu, 29 Apr 2021 14:47:31 +0000 Received: by outflank-mailman (input) for mailman id 120080; Thu, 29 Apr 2021 14:47:30 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lc7ww-00020q-GK for xen-devel@lists.xenproject.org; Thu, 29 Apr 2021 14:47:30 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 4d73e45a-6464-43d6-aaa6-87f0b1fb6232; Thu, 29 Apr 2021 14:47:29 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 051091FB; Thu, 29 Apr 2021 07:47:29 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 387803F73B; Thu, 29 Apr 2021 07:47:28 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 4d73e45a-6464-43d6-aaa6-87f0b1fb6232 From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Jan Beulich , Paul Durrant Subject: [PATCH v4 1/3] xen/iommu: Move iommu_update_ire_from_msi(..) to xen/iommu.h Date: Thu, 29 Apr 2021 15:46:51 +0100 Message-Id: <3dd255f5715eee3f359a6187d83c57a262065830.1619707144.git.rahul.singh@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Move iommu_update_ire_from_msi(..) from passthrough/pci.c to xen/iommu.h and wrap it under CONFIG_X86 as it is referenced in x86 code only to avoid compilation error for other architecture when HAS_PCI is enabled. No functional change intended. Signed-off-by: Rahul Singh Acked-by: Jan Beulich --- xen/drivers/passthrough/pci.c | 7 ------- xen/include/xen/iommu.h | 13 ++++++++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 705137f8be..199ce08612 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -1303,13 +1303,6 @@ static int __init setup_dump_pcidevs(void) } __initcall(setup_dump_pcidevs); =20 -int iommu_update_ire_from_msi( - struct msi_desc *msi_desc, struct msi_msg *msg) -{ - return iommu_intremap - ? iommu_call(&iommu_ops, update_ire_from_msi, msi_desc, msg) : = 0; -} - static int iommu_add_device(struct pci_dev *pdev) { const struct domain_iommu *hd; diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 4f0e5ac622..460755df29 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -187,8 +187,6 @@ void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci); struct msi_desc; struct msi_msg; =20 -int iommu_update_ire_from_msi(struct msi_desc *msi_desc, struct msi_msg *m= sg); - #define PT_IRQ_TIME_OUT MILLISECS(8) #endif /* HAS_PCI */ =20 @@ -238,7 +236,6 @@ struct iommu_ops { u8 devfn, device_t *dev); #ifdef CONFIG_HAS_PCI int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn); - int (*update_ire_from_msi)(struct msi_desc *msi_desc, struct msi_msg *= msg); #endif /* HAS_PCI */ =20 void (*teardown)(struct domain *d); @@ -267,6 +264,7 @@ struct iommu_ops { int (*adjust_irq_affinities)(void); void (*sync_cache)(const void *addr, unsigned int size); void (*clear_root_pgtable)(struct domain *d); + int (*update_ire_from_msi)(struct msi_desc *msi_desc, struct msi_msg *= msg); #endif /* CONFIG_X86 */ =20 int __must_check (*suspend)(void); @@ -374,6 +372,15 @@ extern struct page_list_head iommu_pt_cleanup_list; =20 bool arch_iommu_use_permitted(const struct domain *d); =20 +#ifdef CONFIG_X86 +static inline int iommu_update_ire_from_msi( + struct msi_desc *msi_desc, struct msi_msg *msg) +{ + return iommu_intremap + ? iommu_call(&iommu_ops, update_ire_from_msi, msi_desc, msg) : = 0; +} +#endif + #endif /* _IOMMU_H_ */ =20 /* --=20 2.17.1