]> git.ipfire.org Git - thirdparty/kernel/stable.git/blame - include/linux/kvm_types.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 503
[thirdparty/kernel/stable.git] / include / linux / kvm_types.h
CommitLineData
cd93f165 1/* SPDX-License-Identifier: GPL-2.0-only */
d77a39d9
HB
2
3#ifndef __KVM_TYPES_H__
4#define __KVM_TYPES_H__
5
65647300
PB
6struct kvm;
7struct kvm_async_pf;
8struct kvm_device_ops;
9struct kvm_interrupt;
10struct kvm_irq_routing_table;
11struct kvm_memory_slot;
12struct kvm_one_reg;
13struct kvm_run;
14struct kvm_userspace_memory_region;
15struct kvm_vcpu;
16struct kvm_vcpu_init;
15f46015 17struct kvm_memslots;
65647300
PB
18
19enum kvm_mr_change;
20
d77a39d9
HB
21#include <asm/types.h>
22
23/*
24 * Address types:
25 *
26 * gva - guest virtual address
27 * gpa - guest physical address
28 * gfn - guest frame number
29 * hva - host virtual address
30 * hpa - host physical address
31 * hfn - host frame number
32 */
33
34typedef unsigned long gva_t;
35typedef u64 gpa_t;
5689cc53 36typedef u64 gfn_t;
d77a39d9
HB
37
38typedef unsigned long hva_t;
39typedef u64 hpa_t;
5689cc53 40typedef u64 hfn_t;
d77a39d9 41
ba049e93 42typedef hfn_t kvm_pfn_t;
35149e21 43
49c7754c
GN
44struct gfn_to_hva_cache {
45 u64 generation;
46 gpa_t gpa;
47 unsigned long hva;
8f964525 48 unsigned long len;
49c7754c
GN
49 struct kvm_memory_slot *memslot;
50};
51
d77a39d9 52#endif /* __KVM_TYPES_H__ */