All of lore.kernel.org
 help / color / mirror / Atom feed
* [IOMMU][PATCH 2/4] Add a generic layer on top of intel and amd iommu code
@ 2008-02-13 16:46 Wei Wang2
  0 siblings, 0 replies; only message in thread
From: Wei Wang2 @ 2008-02-13 16:46 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Signed-off-by: Wei Wang <wei.wang2@amd.com>
-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy 


[-- Attachment #2: vtd.patch --]
[-- Type: text/plain, Size: 2093 bytes --]

diff -r 2c343b0341d5 xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
--- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c	Wed Feb 13 14:24:17 2008 +0100
+++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c	Wed Feb 13 14:51:58 2008 +0100
@@ -1047,7 +1047,7 @@ static void free_iommu(struct iommu *iom
         agaw = 64;                              \
     agaw; })
 
-int iommu_domain_init(struct domain *domain)
+int intel_iommu_domain_init(struct domain *domain)
 {
     struct hvm_iommu *hd = domain_hvm_iommu(domain);
     struct iommu *iommu = NULL;
@@ -1055,11 +1055,6 @@ int iommu_domain_init(struct domain *dom
     int adjust_width, agaw;
     unsigned long sagaw;
     struct acpi_drhd_unit *drhd;
-
-    spin_lock_init(&hd->mapping_lock);
-    spin_lock_init(&hd->iommu_list_lock);
-    INIT_LIST_HEAD(&hd->pdev_list);
-    INIT_LIST_HEAD(&hd->g2m_ioport_list);
 
     if ( !vtd_enabled || list_empty(&acpi_drhd_units) )
         return 0;
@@ -1550,7 +1545,7 @@ static int domain_context_mapped(struct 
     return 0;
 }
 
-int iommu_map_page(struct domain *d, paddr_t gfn, paddr_t mfn)
+int intel_iommu_map_page(struct domain *d, paddr_t gfn, paddr_t mfn)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
@@ -1589,7 +1584,7 @@ int iommu_map_page(struct domain *d, pad
     return 0;
 }
 
-int iommu_unmap_page(struct domain *d, dma_addr_t gfn)
+int intel_iommu_unmap_page(struct domain *d, dma_addr_t gfn)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
@@ -1921,7 +1916,7 @@ int device_assigned(u8 bus, u8 devfn)
     return 1;
 }
 
-int assign_device(struct domain *d, u8 bus, u8 devfn)
+int intel_iommu_assign_device(struct domain *d, u8 bus, u8 devfn)
 {
     struct acpi_rmrr_unit *rmrr;
     struct pci_dev *pdev;
@@ -2151,6 +2146,14 @@ int iommu_resume(void)
     return 0;
 }
 
+struct iommu_ops intel_iommu_ops = {
+    .init = intel_iommu_domain_init,
+    .assign_device  = intel_iommu_assign_device,
+    .teardown = iommu_domain_teardown,
+    .map_page = intel_iommu_map_page,
+    .unmap_page = intel_iommu_unmap_page,
+};
+
 /*
  * Local variables:
  * mode: C

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-13 16:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 16:46 [IOMMU][PATCH 2/4] Add a generic layer on top of intel and amd iommu code Wei Wang2

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.