~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/xen/hvm/iommu.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
19
 
 
20
#ifndef __XEN_HVM_IOMMU_H__
 
21
#define __XEN_HVM_IOMMU_H__
 
22
 
 
23
#include <xen/iommu.h>
 
24
 
 
25
struct g2m_ioport {
 
26
    struct list_head list;
 
27
    unsigned int gport;
 
28
    unsigned int mport;
 
29
    unsigned int np;
 
30
};
 
31
 
 
32
struct mapped_rmrr {
 
33
    struct list_head list;
 
34
    u64 base;
 
35
    u64 end;
 
36
};
 
37
 
 
38
struct hvm_iommu {
 
39
    u64 pgd_maddr;                 /* io page directory machine address */
 
40
    spinlock_t mapping_lock;       /* io page table lock */
 
41
    int agaw;     /* adjusted guest address width, 0 is level 2 30-bit */
 
42
    struct list_head g2m_ioport_list;  /* guest to machine ioport mapping */
 
43
    u64 iommu_bitmap;              /* bitmap of iommu(s) that the domain uses */
 
44
    struct list_head mapped_rmrrs;
 
45
 
 
46
    /* amd iommu support */
 
47
    int domain_id;
 
48
    int paging_mode;
 
49
    struct page_info *root_table;
 
50
 
 
51
    /* iommu_ops */
 
52
    const struct iommu_ops *platform_ops;
 
53
};
 
54
 
 
55
#endif /* __XEN_HVM_IOMMU_H__ */