aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/hvm
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-03-17 10:45:24 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-03-17 10:45:24 +0000
commit168c389917eae8b7df0662d1974d6ff7df1d6030 (patch)
tree05fbeeb62f93bd1c86f36aa15e0a06aec8d24364 /xen/include/xen/hvm
parent33c8483360bba3536dc678a94e7f70cb75828066 (diff)
downloadxen-168c389917eae8b7df0662d1974d6ff7df1d6030.tar.gz
xen-168c389917eae8b7df0662d1974d6ff7df1d6030.tar.bz2
xen-168c389917eae8b7df0662d1974d6ff7df1d6030.zip
Move iommu code to arch-generic locations, and also clean up some VT-d code.
Signed-off-by: Weidong Han <weidong.han@intel.com>
Diffstat (limited to 'xen/include/xen/hvm')
-rw-r--r--xen/include/xen/hvm/iommu.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/xen/include/xen/hvm/iommu.h b/xen/include/xen/hvm/iommu.h
new file mode 100644
index 0000000000..8b11d44c16
--- /dev/null
+++ b/xen/include/xen/hvm/iommu.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2006, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * Copyright (C) Allen Kay <allen.m.kay@intel.com>
+ */
+
+#ifndef __ASM_X86_HVM_IOMMU_H__
+#define __ASM_X86_HVM_IOMMU_H__
+
+#include <xen/iommu.h>
+#include <asm/hvm/irq.h>
+#include <asm/hvm/vpt.h>
+#include <asm/hvm/vlapic.h>
+#include <asm/hvm/io.h>
+#include <public/hvm/params.h>
+#include <public/hvm/save.h>
+
+struct g2m_ioport {
+ struct list_head list;
+ unsigned int gport;
+ unsigned int mport;
+ unsigned int np;
+};
+
+struct hvm_iommu {
+ spinlock_t iommu_list_lock; /* protect iommu specific lists */
+ struct list_head pdev_list; /* direct accessed pci devices */
+ struct dma_pte *pgd; /* io page directory root */
+ 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 */
+ domid_t iommu_domid; /* domain id stored in iommu */
+
+ /* amd iommu support */
+ int domain_id;
+ int paging_mode;
+ void *root_table;
+
+ /* iommu_ops */
+ struct iommu_ops *platform_ops;
+};
+
+#endif // __ASM_X86_HVM_IOMMU_H__