diff mbox

[Xen-devel,v5,04/14] xen/passthrough: vtd: iommu_set_hwdom_mapping is VTD specific

Message ID 1399996230-18201-5-git-send-email-julien.grall@linaro.org
State Accepted, archived
Headers show

Commit Message

Julien Grall May 13, 2014, 3:50 p.m. UTC
This function was exported in common header. Rename it and move the declaration
in drivers/passtrough/vtd/extern.h

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Cc: Xiantao Zhang <xiantao.zhang@intel.com>

---
    Changes in v5:
        - Rename iommu_vtd_set_hwdom_mapping into vtd_set_hwdom_mapping

    Changes in v4:
        - Patch added
---
 xen/drivers/passthrough/vtd/extern.h  |    2 ++
 xen/drivers/passthrough/vtd/iommu.c   |    2 +-
 xen/drivers/passthrough/vtd/x86/vtd.c |    2 +-
 xen/include/xen/iommu.h               |    1 -
 4 files changed, 4 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/xen/drivers/passthrough/vtd/extern.h b/xen/drivers/passthrough/vtd/extern.h
index 14cd90e..8ca1f7e 100644
--- a/xen/drivers/passthrough/vtd/extern.h
+++ b/xen/drivers/passthrough/vtd/extern.h
@@ -103,4 +103,6 @@  void pci_vtd_quirk(struct pci_dev *pdev);
 int platform_supports_intremap(void);
 int platform_supports_x2apic(void);
 
+void vtd_set_hwdom_mapping(struct domain *d);
+
 #endif // _VTD_EXTERN_H_
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index c94b0d1..ae9049e 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1249,7 +1249,7 @@  static void __hwdom_init intel_iommu_hwdom_init(struct domain *d)
     if ( !iommu_passthrough && !need_iommu(d) )
     {
         /* Set up 1:1 page table for dom0 */
-        iommu_set_hwdom_mapping(d);
+        vtd_set_hwdom_mapping(d);
     }
 
     setup_hwdom_pci_devices(d, setup_hwdom_device);
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/vtd/x86/vtd.c
index 218e223..9a458eb 100644
--- a/xen/drivers/passthrough/vtd/x86/vtd.c
+++ b/xen/drivers/passthrough/vtd/x86/vtd.c
@@ -107,7 +107,7 @@  void hvm_dpci_isairq_eoi(struct domain *d, unsigned int isairq)
     spin_unlock(&d->event_lock);
 }
 
-void __hwdom_init iommu_set_hwdom_mapping(struct domain *d)
+void __hwdom_init vtd_set_hwdom_mapping(struct domain *d)
 {
     unsigned long i, j, tmp, top;
 
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index f8da9f2..1fd8fb9 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -127,7 +127,6 @@  void iommu_suspend(void);
 void iommu_resume(void);
 void iommu_crash_shutdown(void);
 
-void iommu_set_hwdom_mapping(struct domain *d);
 void iommu_share_p2m_table(struct domain *d);
 
 int iommu_do_domctl(struct xen_domctl *, struct domain *d,