diff options
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/kvm.h | 21 | ||||
-rw-r--r-- | drivers/kvm/types.h | 41 |
2 files changed, 43 insertions, 19 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index be18620bd656..3b0ba5ab7104 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <linux/kvm.h> | 20 | #include <linux/kvm.h> |
21 | #include <linux/kvm_para.h> | 21 | #include <linux/kvm_para.h> |
22 | 22 | ||
23 | #include "types.h" | ||
24 | |||
23 | #define KVM_MAX_VCPUS 4 | 25 | #define KVM_MAX_VCPUS 4 |
24 | #define KVM_ALIAS_SLOTS 4 | 26 | #define KVM_ALIAS_SLOTS 4 |
25 | #define KVM_MEMORY_SLOTS 8 | 27 | #define KVM_MEMORY_SLOTS 8 |
@@ -39,25 +41,6 @@ | |||
39 | */ | 41 | */ |
40 | #define KVM_REQ_TLB_FLUSH 0 | 42 | #define KVM_REQ_TLB_FLUSH 0 |
41 | 43 | ||
42 | /* | ||
43 | * Address types: | ||
44 | * | ||
45 | * gva - guest virtual address | ||
46 | * gpa - guest physical address | ||
47 | * gfn - guest frame number | ||
48 | * hva - host virtual address | ||
49 | * hpa - host physical address | ||
50 | * hfn - host frame number | ||
51 | */ | ||
52 | |||
53 | typedef unsigned long gva_t; | ||
54 | typedef u64 gpa_t; | ||
55 | typedef unsigned long gfn_t; | ||
56 | |||
57 | typedef unsigned long hva_t; | ||
58 | typedef u64 hpa_t; | ||
59 | typedef unsigned long hfn_t; | ||
60 | |||
61 | #define NR_PTE_CHAIN_ENTRIES 5 | 44 | #define NR_PTE_CHAIN_ENTRIES 5 |
62 | 45 | ||
63 | struct kvm_pte_chain { | 46 | struct kvm_pte_chain { |
diff --git a/drivers/kvm/types.h b/drivers/kvm/types.h new file mode 100644 index 000000000000..6ad76231b8ff --- /dev/null +++ b/drivers/kvm/types.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License. | ||
5 | * | ||
6 | * This program is distributed in the hope that it will be useful, | ||
7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
9 | * GNU General Public License for more details. | ||
10 | * | ||
11 | * You should have received a copy of the GNU General Public License | ||
12 | * along with this program; if not, write to the Free Software | ||
13 | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef __KVM_TYPES_H__ | ||
18 | #define __KVM_TYPES_H__ | ||
19 | |||
20 | #include <asm/types.h> | ||
21 | |||
22 | /* | ||
23 | * Address types: | ||
24 | * | ||
25 | * gva - guest virtual address | ||
26 | * gpa - guest physical address | ||
27 | * gfn - guest frame number | ||
28 | * hva - host virtual address | ||
29 | * hpa - host physical address | ||
30 | * hfn - host frame number | ||
31 | */ | ||
32 | |||
33 | typedef unsigned long gva_t; | ||
34 | typedef u64 gpa_t; | ||
35 | typedef unsigned long gfn_t; | ||
36 | |||
37 | typedef unsigned long hva_t; | ||
38 | typedef u64 hpa_t; | ||
39 | typedef unsigned long hfn_t; | ||
40 | |||
41 | #endif /* __KVM_TYPES_H__ */ | ||