Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _ASM_X86_KVM_H |
| 20 | #define _ASM_X86_KVM_H |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/ioctl.h> |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 23 | #define DE_VECTOR 0 |
| 24 | #define DB_VECTOR 1 |
| 25 | #define BP_VECTOR 3 |
| 26 | #define OF_VECTOR 4 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 27 | #define BR_VECTOR 5 |
| 28 | #define UD_VECTOR 6 |
| 29 | #define NM_VECTOR 7 |
| 30 | #define DF_VECTOR 8 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 31 | #define TS_VECTOR 10 |
| 32 | #define NP_VECTOR 11 |
| 33 | #define SS_VECTOR 12 |
| 34 | #define GP_VECTOR 13 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 35 | #define PF_VECTOR 14 |
| 36 | #define MF_VECTOR 16 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 37 | #define AC_VECTOR 17 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 38 | #define MC_VECTOR 18 |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 39 | #define XM_VECTOR 19 |
| 40 | #define VE_VECTOR 20 |
| 41 | #define __KVM_HAVE_PIT |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 42 | #define __KVM_HAVE_IOAPIC |
| 43 | #define __KVM_HAVE_IRQ_LINE |
| 44 | #define __KVM_HAVE_MSI |
| 45 | #define __KVM_HAVE_USER_NMI |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 46 | #define __KVM_HAVE_GUEST_DEBUG |
| 47 | #define __KVM_HAVE_MSIX |
| 48 | #define __KVM_HAVE_MCE |
| 49 | #define __KVM_HAVE_PIT_STATE2 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 50 | #define __KVM_HAVE_XEN_HVM |
| 51 | #define __KVM_HAVE_VCPU_EVENTS |
| 52 | #define __KVM_HAVE_DEBUGREGS |
| 53 | #define __KVM_HAVE_XSAVE |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 54 | #define __KVM_HAVE_XCRS |
| 55 | #define __KVM_HAVE_READONLY_MEM |
| 56 | #define KVM_NR_INTERRUPTS 256 |
| 57 | struct kvm_memory_alias { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 58 | __u32 slot; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u32 flags; |
| 60 | __u64 guest_phys_addr; |
| 61 | __u64 memory_size; |
| 62 | __u64 target_phys_addr; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 63 | }; |
| 64 | struct kvm_pic_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | __u8 last_irr; |
| 66 | __u8 irr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u8 imr; |
| 68 | __u8 isr; |
| 69 | __u8 priority_add; |
| 70 | __u8 irq_base; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __u8 read_reg_select; |
| 72 | __u8 poll; |
| 73 | __u8 special_mask; |
| 74 | __u8 init_state; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | __u8 auto_eoi; |
| 76 | __u8 rotate_on_auto_eoi; |
| 77 | __u8 special_fully_nested_mode; |
| 78 | __u8 init4; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | __u8 elcr; |
| 80 | __u8 elcr_mask; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 81 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 82 | #define KVM_IOAPIC_NUM_PINS 24 |
| 83 | struct kvm_ioapic_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | __u64 base_address; |
| 85 | __u32 ioregsel; |
| 86 | __u32 id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | __u32 irr; |
| 88 | __u32 pad; |
| 89 | union { |
| 90 | __u64 bits; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | struct { |
| 92 | __u8 vector; |
| 93 | __u8 delivery_mode : 3; |
| 94 | __u8 dest_mode : 1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | __u8 delivery_status : 1; |
| 96 | __u8 polarity : 1; |
| 97 | __u8 remote_irr : 1; |
| 98 | __u8 trig_mode : 1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | __u8 mask : 1; |
| 100 | __u8 reserve : 7; |
| 101 | __u8 reserved[4]; |
| 102 | __u8 dest_id; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | } fields; |
| 104 | } redirtbl[KVM_IOAPIC_NUM_PINS]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 105 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 106 | #define KVM_IRQCHIP_PIC_MASTER 0 |
| 107 | #define KVM_IRQCHIP_PIC_SLAVE 1 |
| 108 | #define KVM_IRQCHIP_IOAPIC 2 |
| 109 | #define KVM_NR_IRQCHIPS 3 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 110 | #define KVM_RUN_X86_SMM (1 << 0) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 111 | struct kvm_regs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 112 | __u64 rax, rbx, rcx, rdx; |
| 113 | __u64 rsi, rdi, rsp, rbp; |
| 114 | __u64 r8, r9, r10, r11; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 115 | __u64 r12, r13, r14, r15; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 | __u64 rip, rflags; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 117 | }; |
| 118 | #define KVM_APIC_REG_SIZE 0x400 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 119 | struct kvm_lapic_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 | char regs[KVM_APIC_REG_SIZE]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 121 | }; |
| 122 | struct kvm_segment { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 123 | __u64 base; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 124 | __u32 limit; |
| 125 | __u16 selector; |
| 126 | __u8 type; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 127 | __u8 present, dpl, db, s, l, g, avl; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 128 | __u8 unusable; |
| 129 | __u8 padding; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 130 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 131 | struct kvm_dtable { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | __u64 base; |
| 133 | __u16 limit; |
| 134 | __u16 padding[3]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 135 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 136 | struct kvm_sregs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 137 | struct kvm_segment cs, ds, es, fs, gs, ss; |
| 138 | struct kvm_segment tr, ldt; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 139 | struct kvm_dtable gdt, idt; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 | __u64 cr0, cr2, cr3, cr4, cr8; |
| 141 | __u64 efer; |
| 142 | __u64 apic_base; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 143 | __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 144 | }; |
| 145 | struct kvm_fpu { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 146 | __u8 fpr[8][16]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 147 | __u16 fcw; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 148 | __u16 fsw; |
| 149 | __u8 ftwx; |
| 150 | __u8 pad1; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 151 | __u16 last_opcode; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 152 | __u64 last_ip; |
| 153 | __u64 last_dp; |
| 154 | __u8 xmm[16][16]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 155 | __u32 mxcsr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 156 | __u32 pad2; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 157 | }; |
| 158 | struct kvm_msr_entry { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 159 | __u32 index; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 160 | __u32 reserved; |
| 161 | __u64 data; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 162 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 163 | struct kvm_msrs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 164 | __u32 nmsrs; |
| 165 | __u32 pad; |
| 166 | struct kvm_msr_entry entries[0]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 167 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 168 | struct kvm_msr_list { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 169 | __u32 nmsrs; |
| 170 | __u32 indices[0]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 171 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 172 | struct kvm_cpuid_entry { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 173 | __u32 function; |
| 174 | __u32 eax; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 175 | __u32 ebx; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 176 | __u32 ecx; |
| 177 | __u32 edx; |
| 178 | __u32 padding; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 179 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 180 | struct kvm_cpuid { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 181 | __u32 nent; |
| 182 | __u32 padding; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 183 | struct kvm_cpuid_entry entries[0]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 184 | }; |
| 185 | struct kvm_cpuid_entry2 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 186 | __u32 function; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 187 | __u32 index; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 188 | __u32 flags; |
| 189 | __u32 eax; |
| 190 | __u32 ebx; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 191 | __u32 ecx; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 192 | __u32 edx; |
| 193 | __u32 padding[3]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 194 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 195 | #define KVM_CPUID_FLAG_SIGNIFCANT_INDEX (1 << 0) |
| 196 | #define KVM_CPUID_FLAG_STATEFUL_FUNC (1 << 1) |
| 197 | #define KVM_CPUID_FLAG_STATE_READ_NEXT (1 << 2) |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 198 | struct kvm_cpuid2 { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 199 | __u32 nent; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 200 | __u32 padding; |
| 201 | struct kvm_cpuid_entry2 entries[0]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 202 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 203 | struct kvm_pit_channel_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 204 | __u32 count; |
| 205 | __u16 latched_count; |
| 206 | __u8 count_latched; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 207 | __u8 status_latched; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 208 | __u8 status; |
| 209 | __u8 read_state; |
| 210 | __u8 write_state; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 211 | __u8 write_latch; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 212 | __u8 rw_mode; |
| 213 | __u8 mode; |
| 214 | __u8 bcd; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 215 | __u8 gate; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 216 | __s64 count_load_time; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 217 | }; |
| 218 | struct kvm_debug_exit_arch { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 219 | __u32 exception; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 220 | __u32 pad; |
| 221 | __u64 pc; |
| 222 | __u64 dr6; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 223 | __u64 dr7; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 224 | }; |
| 225 | #define KVM_GUESTDBG_USE_SW_BP 0x00010000 |
| 226 | #define KVM_GUESTDBG_USE_HW_BP 0x00020000 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 227 | #define KVM_GUESTDBG_INJECT_DB 0x00040000 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 228 | #define KVM_GUESTDBG_INJECT_BP 0x00080000 |
| 229 | struct kvm_guest_debug_arch { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 230 | __u64 debugreg[8]; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 231 | }; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 232 | struct kvm_pit_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 233 | struct kvm_pit_channel_state channels[3]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 234 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 235 | #define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 236 | struct kvm_pit_state2 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 237 | struct kvm_pit_channel_state channels[3]; |
| 238 | __u32 flags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 239 | __u32 reserved[9]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 240 | }; |
| 241 | struct kvm_reinject_control { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 242 | __u8 pit_reinject; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 243 | __u8 reserved[31]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 244 | }; |
| 245 | #define KVM_VCPUEVENT_VALID_NMI_PENDING 0x00000001 |
| 246 | #define KVM_VCPUEVENT_VALID_SIPI_VECTOR 0x00000002 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 247 | #define KVM_VCPUEVENT_VALID_SHADOW 0x00000004 |
| 248 | #define KVM_VCPUEVENT_VALID_SMM 0x00000008 |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 249 | #define KVM_X86_SHADOW_INT_MOV_SS 0x01 |
| 250 | #define KVM_X86_SHADOW_INT_STI 0x02 |
| 251 | struct kvm_vcpu_events { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 252 | struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 253 | __u8 injected; |
| 254 | __u8 nr; |
| 255 | __u8 has_error_code; |
| 256 | __u8 pad; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 257 | __u32 error_code; |
| 258 | } exception; |
| 259 | struct { |
| 260 | __u8 injected; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 261 | __u8 nr; |
| 262 | __u8 soft; |
| 263 | __u8 shadow; |
| 264 | } interrupt; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 265 | struct { |
| 266 | __u8 injected; |
| 267 | __u8 pending; |
| 268 | __u8 masked; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 269 | __u8 pad; |
| 270 | } nmi; |
| 271 | __u32 sipi_vector; |
| 272 | __u32 flags; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 273 | struct { |
| 274 | __u8 smm; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 275 | __u8 pending; |
| 276 | __u8 smm_inside_nmi; |
| 277 | __u8 latched_init; |
| 278 | } smi; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 279 | __u32 reserved[9]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 280 | }; |
| 281 | struct kvm_debugregs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 282 | __u64 db[4]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 283 | __u64 dr6; |
| 284 | __u64 dr7; |
| 285 | __u64 flags; |
| 286 | __u64 reserved[9]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 287 | }; |
| 288 | struct kvm_xsave { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 289 | __u32 region[1024]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 290 | }; |
| 291 | #define KVM_MAX_XCRS 16 |
| 292 | struct kvm_xcr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 293 | __u32 xcr; |
| 294 | __u32 reserved; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 295 | __u64 value; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 296 | }; |
| 297 | struct kvm_xcrs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 298 | __u32 nr_xcrs; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 299 | __u32 flags; |
| 300 | struct kvm_xcr xcrs[KVM_MAX_XCRS]; |
| 301 | __u64 padding[16]; |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 302 | }; |
| 303 | struct kvm_sync_regs { |
| 304 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 305 | #define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) |
| 306 | #define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) |
Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 307 | #endif |