]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/arch/x86/include/asm/amd_iommu.h
x86: Add missing include to amd_iommu.h
[jailhouse.git] / hypervisor / arch / x86 / include / asm / amd_iommu.h
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Valentine Sinitsyn, 2014, 2015
5  * Copyright (c) Siemens AG, 2016
6  *
7  * Authors:
8  *  Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
9  *  Jan Kiszka <jan.kiszka@siemens.com>
10  *
11  * This work is licensed under the terms of the GNU GPL, version 2.  See
12  * the COPYING file in the top-level directory.
13  */
14
15 #ifndef _JAILHOUSE_ASM_AMD_IOMMU_H
16 #define _JAILHOUSE_ASM_AMD_IOMMU_H
17
18 #include <jailhouse/types.h>
19 #include <jailhouse/utils.h>
20
21 #include <jailhouse/cell-config.h>
22
23 #define AMD_IOMMU_PTE_P                 (1ULL <<  0)
24 #define AMD_IOMMU_PTE_PG_MODE(level)    ((level) << 9)
25 #define AMD_IOMMU_PTE_PG_MODE_MASK      BIT_MASK(11, 9)
26 #define AMD_IOMMU_PTE_IR                (1ULL << 61)
27 #define AMD_IOMMU_PTE_IW                (1ULL << 62)
28
29 #define AMD_IOMMU_PAGE_DEFAULT_FLAGS    (AMD_IOMMU_PTE_IW | AMD_IOMMU_PTE_IR | \
30                                          AMD_IOMMU_PTE_P)
31
32 u64 amd_iommu_get_memory_region_flags(const struct jailhouse_memory *mem);
33
34 #endif