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
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.
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.
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
20
#ifndef _ASM_X86_64_AMD_IOMMU_H
21
#define _ASM_X86_64_AMD_IOMMU_H
24
#include <xen/types.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;
35
unsigned long entries;
36
unsigned long alloc_size;
40
struct list_head list;
41
spinlock_t lock; /* protect iommu */
49
u8 pte_not_present_cached;
60
unsigned long mmio_base_phys;
62
struct table_struct dev_table;
63
struct table_struct cmd_buffer;
65
struct table_struct event_log;
69
int exclusion_allow_all;
70
uint64_t exclusion_base;
71
uint64_t exclusion_limit;
80
struct ivrs_mappings {
82
u8 dte_sys_mgt_enable;
83
u8 dte_allow_exclusion;
87
unsigned long addr_range_start;
88
unsigned long addr_range_length;
89
struct amd_iommu *iommu;
91
/* per device interrupt remapping table */
93
spinlock_t intremap_lock;
95
/* interrupt remapping settings */
102
#endif /* _ASM_X86_64_AMD_IOMMU_H */