From: Rahul Singh <rahul.singh@arm.com>
To: xen-devel@lists.xenproject.org
Cc: bertrand.marquis@arm.com, rahul.singh@arm.com,
Jan Beulich <jbeulich@suse.com>, Paul Durrant <paul@xen.org>
Subject: [PATCH v3 1/3] xen/iommu: Move iommu_update_ire_from_msi(..) to xen/iommu.h
Date: Mon, 26 Apr 2021 17:21:25 +0100 [thread overview]
Message-ID: <30f0c8057969f9777f11352b9b7ca1e4a7a730e8.1619453100.git.rahul.singh@arm.com> (raw)
In-Reply-To: <cover.1619453100.git.rahul.singh@arm.com>
In-Reply-To: <cover.1619453100.git.rahul.singh@arm.com>
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 <rahul.singh@arm.com>
---
Changes since v2:
- This patch is added in this version to make sure iommu related code is in
separate patch.
---
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);
-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;
-int iommu_update_ire_from_msi(struct msi_desc *msi_desc, struct msi_msg *msg);
-
#define PT_IRQ_TIME_OUT MILLISECS(8)
#endif /* HAS_PCI */
@@ -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 */
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 */
int __must_check (*suspend)(void);
@@ -374,6 +372,15 @@ extern struct page_list_head iommu_pt_cleanup_list;
bool arch_iommu_use_permitted(const struct domain *d);
+#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_ */
/*
--
2.17.1
next prev parent reply other threads:[~2021-04-26 16:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 16:21 [PATCH v3 0/3] xen/pci: Make PCI passthrough code non-x86 specific Rahul Singh
2021-04-26 16:21 ` Rahul Singh [this message]
2021-04-27 15:58 ` [PATCH v3 1/3] xen/iommu: Move iommu_update_ire_from_msi(..) to xen/iommu.h Jan Beulich
2021-04-26 16:21 ` [PATCH v3 2/3] xen/pci: Refactor PCI MSI intercept related code Rahul Singh
2021-04-28 10:42 ` Roger Pau Monné
2021-04-28 13:57 ` Jan Beulich
2021-04-29 8:27 ` Rahul Singh
2021-04-29 8:23 ` Rahul Singh
2021-04-28 14:06 ` Jan Beulich
2021-04-29 11:31 ` Rahul Singh
2021-04-29 11:47 ` Jan Beulich
2021-04-26 16:21 ` [PATCH v3 3/3] xen/pci: Refactor MSI code that implements MSI functionality within XEN Rahul Singh
2021-04-28 11:06 ` Roger Pau Monné
2021-04-28 14:11 ` Jan Beulich
2021-04-28 14:26 ` Julien Grall
2021-04-29 11:59 ` Rahul Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30f0c8057969f9777f11352b9b7ca1e4a7a730e8.1619453100.git.rahul.singh@arm.com \
--to=rahul.singh@arm.com \
--cc=bertrand.marquis@arm.com \
--cc=jbeulich@suse.com \
--cc=paul@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).