From: "Wei Wang2" <wei.wang2@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 2/2]Add AMD IOMMU support into hypervisor
Date: Fri, 21 Sep 2007 18:04:26 +0200 [thread overview]
Message-ID: <1190390666.7293.109.camel@gran.amd.com> (raw)
[-- 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
reply other threads:[~2007-09-21 16:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1190390666.7293.109.camel@gran.amd.com \
--to=wei.wang2@amd.com \
--cc=xen-devel@lists.xensource.com \
/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 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.