All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2]Add AMD IOMMU support into hypervisor
@ 2007-09-21 16:04 Wei Wang2
  0 siblings, 0 replies; only message in thread
From: Wei Wang2 @ 2007-09-21 16:04 UTC (permalink / raw)
  To: xen-devel

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


misc.patch: Changes to xen code.

Signed-off-by: Wei Wang <wei.wang2@amd.com>

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

diff -r 2477e94450aa xen/arch/x86/hvm/svm/Makefile
--- a/xen/arch/x86/hvm/svm/Makefile	Thu Sep 20 14:15:45 2007 +0100
+++ b/xen/arch/x86/hvm/svm/Makefile	Thu Sep 20 16:39:27 2007 +0200
@@ -1,5 +1,6 @@ subdir-$(x86_32) += x86_32
 subdir-$(x86_32) += x86_32
 subdir-$(x86_64) += x86_64
+subdir-y +=amd_iommu
 
 obj-y += asid.o
 obj-y += emulate.o
diff -r 2477e94450aa xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c	Thu Sep 20 14:15:45 2007 +0100
+++ b/xen/arch/x86/setup.c	Thu Sep 20 16:39:27 2007 +0200
@@ -1040,6 +1040,8 @@ void __init __start_xen(unsigned long mb
 
     iommu_setup();
 
+    amd_iommu_detect();
+
     /*
      * We're going to setup domain0 using the module(s) that we stashed safely
      * above our heap. The second module, if present, is an initrd ramdisk.
diff -r 2477e94450aa xen/include/asm-x86/fixmap.h
--- a/xen/include/asm-x86/fixmap.h	Thu Sep 20 14:15:45 2007 +0100
+++ b/xen/include/asm-x86/fixmap.h	Thu Sep 20 16:39:27 2007 +0200
@@ -18,6 +18,7 @@
 #include <asm/page.h>
 #include <xen/kexec.h>
 #include <asm/iommu.h>
+#include <asm/amd-iommu.h>
 
 /*
  * Here we define all the compile-time 'special' virtual
@@ -43,6 +44,8 @@ enum fixed_addresses {
       + ((KEXEC_XEN_NO_PAGES >> 1) * KEXEC_IMAGE_NR) - 1,
     FIX_IOMMU_REGS_BASE_0,
     FIX_IOMMU_REGS_END = FIX_IOMMU_REGS_BASE_0 + MAX_IOMMUS-1,
+    FIX_IOMMU_MMIO_BASE_0,
+    FIX_IOMMU_MMIO_END = FIX_IOMMU_MMIO_BASE_0 + IOMMU_PAGES -1,
     __end_of_fixed_addresses
 };
 
diff -r 2477e94450aa xen/include/asm-x86/hvm/iommu.h
--- a/xen/include/asm-x86/hvm/iommu.h	Thu Sep 20 14:15:45 2007 +0100
+++ b/xen/include/asm-x86/hvm/iommu.h	Thu Sep 20 16:39:27 2007 +0200
@@ -42,6 +42,11 @@ struct hvm_iommu {
     spinlock_t mapping_lock;       /* io page table lock */
     int agaw;     /* adjusted guest address width, 0 is level 2 30-bit */
     struct list_head g2m_ioport_list;  /* guest to machine ioport mapping */
+
+    /* amd iommu support */
+    int domain_id;
+    int paging_mode;
+    void *root_table;
 };
 
 #endif // __ASM_X86_HVM_IOMMU_H__

[-- 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:[~2007-09-21 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-21 16:04 [PATCH 2/2]Add AMD IOMMU support into hypervisor 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.