1 /* 2 * Copyright (c) 2006, Intel Corporation. 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms and conditions of the GNU General Public License, 6 * version 2, as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope it will be useful, but WITHOUT 9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 11 * more details. 12 * 13 * You should have received a copy of the GNU General Public License along with 14 * this program; If not, see <http://www.gnu.org/licenses/>. 15 * 16 * Copyright (C) Allen Kay <allen.m.kay@intel.com> 17 * Copyright (C) Weidong Han <weidong.han@intel.com> 18 */ 19 20 #ifndef _VTD_H_ 21 #define _VTD_H_ 22 23 #include <xen/iommu.h> 24 25 #define MAP_ME_PHANTOM_FUNC 1 26 #define UNMAP_ME_PHANTOM_FUNC 0 27 28 /* Allow for both IOAPIC and IOSAPIC. */ 29 #define IO_xAPIC_route_entry IO_APIC_route_entry 30 31 struct IO_APIC_route_remap_entry { 32 union { 33 u64 val; 34 struct { 35 u64 vector:8, 36 delivery_mode:3, 37 index_15:1, 38 delivery_status:1, 39 polarity:1, 40 irr:1, 41 trigger:1, 42 mask:1, 43 reserved:31, 44 format:1, 45 index_0_14:15; 46 }; 47 }; 48 }; 49 50 struct msi_msg_remap_entry { 51 union { 52 u32 val; 53 struct { 54 u32 dontcare:2, 55 index_15:1, 56 SHV:1, 57 format:1, 58 index_0_14:15, 59 addr_id_val:12; /* Interrupt address identifier value, 60 must be 0FEEh */ 61 }; 62 } address_lo; /* low 32 bits of msi message address */ 63 64 u32 address_hi; /* high 32 bits of msi message address */ 65 u32 data; /* msi message data */ 66 }; 67 68 #endif // _VTD_H_ 69