Hollis Blanchard | d77a39d | 2007-12-03 15:30:23 -0600 | [diff] [blame] | 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; |
Joerg Roedel | 5689cc5 | 2010-07-01 16:00:12 +0200 | [diff] [blame] | 35 | typedef u64 gfn_t; |
Hollis Blanchard | d77a39d | 2007-12-03 15:30:23 -0600 | [diff] [blame] | 36 | |
| 37 | typedef unsigned long hva_t; |
| 38 | typedef u64 hpa_t; |
Joerg Roedel | 5689cc5 | 2010-07-01 16:00:12 +0200 | [diff] [blame] | 39 | typedef u64 hfn_t; |
Hollis Blanchard | d77a39d | 2007-12-03 15:30:23 -0600 | [diff] [blame] | 40 | |
Anthony Liguori | 35149e2 | 2008-04-02 14:46:56 -0500 | [diff] [blame] | 41 | typedef hfn_t pfn_t; |
| 42 | |
Sheng Yang | cf9e4e1 | 2009-02-11 16:03:36 +0800 | [diff] [blame] | 43 | union kvm_ioapic_redirect_entry { |
| 44 | u64 bits; |
| 45 | struct { |
| 46 | u8 vector; |
| 47 | u8 delivery_mode:3; |
| 48 | u8 dest_mode:1; |
| 49 | u8 delivery_status:1; |
| 50 | u8 polarity:1; |
| 51 | u8 remote_irr:1; |
| 52 | u8 trig_mode:1; |
| 53 | u8 mask:1; |
| 54 | u8 reserve:7; |
| 55 | u8 reserved[4]; |
| 56 | u8 dest_id; |
| 57 | } fields; |
| 58 | }; |
| 59 | |
Gleb Natapov | 58c2dde | 2009-03-05 16:35:04 +0200 | [diff] [blame] | 60 | struct kvm_lapic_irq { |
| 61 | u32 vector; |
| 62 | u32 delivery_mode; |
| 63 | u32 dest_mode; |
| 64 | u32 level; |
| 65 | u32 trig_mode; |
| 66 | u32 shorthand; |
| 67 | u32 dest_id; |
| 68 | }; |
| 69 | |
Gleb Natapov | 49c7754 | 2010-10-18 15:22:23 +0200 | [diff] [blame] | 70 | struct gfn_to_hva_cache { |
| 71 | u64 generation; |
| 72 | gpa_t gpa; |
| 73 | unsigned long hva; |
| 74 | struct kvm_memory_slot *memslot; |
| 75 | }; |
| 76 | |
Hollis Blanchard | d77a39d | 2007-12-03 15:30:23 -0600 | [diff] [blame] | 77 | #endif /* __KVM_TYPES_H__ */ |