ia64/xen-unstable

view xen/include/asm-x86/amd-iommu.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 09ee974e722f
children
line source
1 /*
2 * Copyright (C) 2007 Advanced Micro Devices, Inc.
3 * Author: Leo Duran <leo.duran@amd.com>
4 * Author: Wei Wang <wei.wang2@amd.com> - adapted to xen
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 #ifndef _ASM_X86_64_AMD_IOMMU_H
21 #define _ASM_X86_64_AMD_IOMMU_H
23 #include <xen/init.h>
24 #include <xen/types.h>
25 #include <xen/list.h>
26 #include <xen/spinlock.h>
27 #include <asm/hvm/svm/amd-iommu-defs.h>
29 #define iommu_found() (!list_empty(&amd_iommu_head))
31 extern struct list_head amd_iommu_head;
33 extern int __init amd_iov_detect(void);
35 struct table_struct {
36 void *buffer;
37 unsigned long entries;
38 unsigned long alloc_size;
39 };
41 struct amd_iommu {
42 struct list_head list;
43 spinlock_t lock; /* protect iommu */
45 u16 bdf;
46 u8 cap_offset;
47 u8 revision;
48 u8 unit_id;
49 u8 msi_number;
51 u8 pte_not_present_cached;
52 u8 ht_tunnel_support;
53 u8 iotlb_support;
55 u8 isochronous;
56 u8 coherent;
57 u8 res_pass_pw;
58 u8 pass_pw;
59 u8 ht_tunnel_enable;
61 int last_downstream_bus;
62 int downstream_bus_present[PCI_MAX_BUS_COUNT];
64 void *mmio_base;
65 unsigned long mmio_base_phys;
67 struct table_struct dev_table;
68 struct table_struct cmd_buffer;
69 u32 cmd_buffer_tail;
70 struct table_struct event_log;
71 u32 event_log_head;
73 int exclusion_enable;
74 int exclusion_allow_all;
75 uint64_t exclusion_base;
76 uint64_t exclusion_limit;
78 int msi_cap;
79 int maskbit;
81 int enabled;
82 int vector;
83 };
85 struct ivrs_mappings {
86 u16 dte_requestor_id;
87 u8 dte_sys_mgt_enable;
88 u8 dte_allow_exclusion;
89 u8 unity_map_enable;
90 u8 write_permission;
91 u8 read_permission;
92 unsigned long addr_range_start;
93 unsigned long addr_range_length;
94 struct amd_iommu *iommu;
95 };
96 #endif /* _ASM_X86_64_AMD_IOMMU_H */