ia64/xen-unstable

view xen/drivers/passthrough/vtd/extern.h @ 19810:aa472909b39c

vtd: IO NUMA support

This patch adds VT-d RHSA processing for IO NUMA support. The basic
idea is to parse ACPI RHSA structure to obtain VT-d HW to proximity
domain mapping. This mapping is then used when allocating pages for
Vt-d HW data structures.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 23 11:14:24 2009 +0100 (2009-06-23)
parents 931dbe86e5f3
children
line source
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, write to the Free Software Foundation, Inc., 59 Temple
15 * Place - Suite 330, Boston, MA 02111-1307 USA.
16 *
17 * Copyright (C) Allen Kay <allen.m.kay@intel.com>
18 * Copyright (C) Weidong Han <weidong.han@intel.com>
19 */
21 #ifndef _VTD_EXTERN_H_
22 #define _VTD_EXTERN_H_
24 #include "dmar.h"
26 extern int qinval_enabled;
27 extern int ats_enabled;
29 void print_iommu_regs(struct acpi_drhd_unit *drhd);
30 void print_vtd_entries(struct iommu *iommu, int bus, int devfn, u64 gmfn);
31 void dump_iommu_info(unsigned char key);
33 int enable_qinval(struct iommu *iommu);
34 void disable_qinval(struct iommu *iommu);
35 int enable_intremap(struct iommu *iommu);
36 void disable_intremap(struct iommu *iommu);
37 int queue_invalidate_context(struct iommu *iommu,
38 u16 did, u16 source_id, u8 function_mask, u8 granu);
39 int queue_invalidate_iotlb(struct iommu *iommu,
40 u8 granu, u8 dr, u8 dw, u16 did, u8 am, u8 ih, u64 addr);
41 int queue_invalidate_iec(struct iommu *iommu,
42 u8 granu, u8 im, u16 iidx);
43 int invalidate_sync(struct iommu *iommu);
44 int iommu_flush_iec_global(struct iommu *iommu);
45 int iommu_flush_iec_index(struct iommu *iommu, u8 im, u16 iidx);
46 struct iommu * ioapic_to_iommu(unsigned int apic_id);
47 struct acpi_drhd_unit * ioapic_to_drhd(unsigned int apic_id);
48 struct acpi_drhd_unit * iommu_to_drhd(struct iommu *iommu);
49 struct acpi_rhsa_unit * drhd_to_rhsa(struct acpi_drhd_unit *drhd);
50 void clear_fault_bits(struct iommu *iommu);
51 int ats_device(int seg, int bus, int devfn);
52 int enable_ats_device(int seg, int bus, int devfn);
53 int disable_ats_device(int seg, int bus, int devfn);
54 int invalidate_ats_tcs(struct iommu *iommu);
55 int qinval_device_iotlb(struct iommu *iommu,
56 u32 max_invs_pend, u16 sid, u16 size, u64 addr);
57 int dev_invalidate_iotlb(struct iommu *iommu, u16 did,
58 u64 addr, unsigned int size_order, u64 type);
59 struct acpi_drhd_unit * find_ats_dev_drhd(struct iommu *iommu);
61 #endif // _VTD_EXTERN_H_