blob: 45c8d12c74165429a1407151a75b9e674d341f65 [file] [log] [blame]
Elliott Hughesabd62612013-11-08 11:45:48 -08001/****************************************************************************
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>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define DE_VECTOR 0
25#define DB_VECTOR 1
26#define BP_VECTOR 3
27#define OF_VECTOR 4
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define BR_VECTOR 5
30#define UD_VECTOR 6
31#define NM_VECTOR 7
32#define DF_VECTOR 8
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define TS_VECTOR 10
35#define NP_VECTOR 11
36#define SS_VECTOR 12
37#define GP_VECTOR 13
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define PF_VECTOR 14
40#define MF_VECTOR 16
Christopher Ferris82d75042015-01-26 10:57:07 -080041#define AC_VECTOR 17
Elliott Hughesabd62612013-11-08 11:45:48 -080042#define MC_VECTOR 18
Elliott Hughesabd62612013-11-08 11:45:48 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris82d75042015-01-26 10:57:07 -080044#define XM_VECTOR 19
45#define VE_VECTOR 20
46#define __KVM_HAVE_PIT
Elliott Hughesabd62612013-11-08 11:45:48 -080047#define __KVM_HAVE_IOAPIC
Christopher Ferris82d75042015-01-26 10:57:07 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -080049#define __KVM_HAVE_IRQ_LINE
50#define __KVM_HAVE_MSI
51#define __KVM_HAVE_USER_NMI
Elliott Hughesabd62612013-11-08 11:45:48 -080052#define __KVM_HAVE_GUEST_DEBUG
Christopher Ferris82d75042015-01-26 10:57:07 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -080054#define __KVM_HAVE_MSIX
55#define __KVM_HAVE_MCE
56#define __KVM_HAVE_PIT_STATE2
Elliott Hughesabd62612013-11-08 11:45:48 -080057#define __KVM_HAVE_XEN_HVM
Christopher Ferris82d75042015-01-26 10:57:07 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -080059#define __KVM_HAVE_VCPU_EVENTS
60#define __KVM_HAVE_DEBUGREGS
61#define __KVM_HAVE_XSAVE
Elliott Hughesabd62612013-11-08 11:45:48 -080062#define __KVM_HAVE_XCRS
Christopher Ferris82d75042015-01-26 10:57:07 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -080064#define __KVM_HAVE_READONLY_MEM
65#define KVM_NR_INTERRUPTS 256
66struct kvm_memory_alias {
Tao Baod7db5942015-01-28 10:07:51 -080067 __u32 slot;
Christopher Ferris82d75042015-01-26 10:57:07 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 __u32 flags;
70 __u64 guest_phys_addr;
71 __u64 memory_size;
72 __u64 target_phys_addr;
Christopher Ferris82d75042015-01-26 10:57:07 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -080074};
75struct kvm_pic_state {
Tao Baod7db5942015-01-28 10:07:51 -080076 __u8 last_irr;
77 __u8 irr;
Christopher Ferris82d75042015-01-26 10:57:07 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080079 __u8 imr;
80 __u8 isr;
81 __u8 priority_add;
82 __u8 irq_base;
Christopher Ferris82d75042015-01-26 10:57:07 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 __u8 read_reg_select;
85 __u8 poll;
86 __u8 special_mask;
87 __u8 init_state;
Christopher Ferris82d75042015-01-26 10:57:07 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 __u8 auto_eoi;
90 __u8 rotate_on_auto_eoi;
91 __u8 special_fully_nested_mode;
92 __u8 init4;
Christopher Ferris82d75042015-01-26 10:57:07 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 __u8 elcr;
95 __u8 elcr_mask;
Elliott Hughesabd62612013-11-08 11:45:48 -080096};
Elliott Hughesabd62612013-11-08 11:45:48 -080097#define KVM_IOAPIC_NUM_PINS 24
Christopher Ferris82d75042015-01-26 10:57:07 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -080099struct kvm_ioapic_state {
Tao Baod7db5942015-01-28 10:07:51 -0800100 __u64 base_address;
101 __u32 ioregsel;
102 __u32 id;
Christopher Ferris82d75042015-01-26 10:57:07 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 __u32 irr;
105 __u32 pad;
106 union {
107 __u64 bits;
Christopher Ferris82d75042015-01-26 10:57:07 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 struct {
110 __u8 vector;
111 __u8 delivery_mode : 3;
112 __u8 dest_mode : 1;
Christopher Ferris82d75042015-01-26 10:57:07 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 __u8 delivery_status : 1;
115 __u8 polarity : 1;
116 __u8 remote_irr : 1;
117 __u8 trig_mode : 1;
Christopher Ferris82d75042015-01-26 10:57:07 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 __u8 mask : 1;
120 __u8 reserve : 7;
121 __u8 reserved[4];
122 __u8 dest_id;
Christopher Ferris82d75042015-01-26 10:57:07 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 } fields;
125 } redirtbl[KVM_IOAPIC_NUM_PINS];
Elliott Hughesabd62612013-11-08 11:45:48 -0800126};
Elliott Hughesabd62612013-11-08 11:45:48 -0800127#define KVM_IRQCHIP_PIC_MASTER 0
Christopher Ferris82d75042015-01-26 10:57:07 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -0800129#define KVM_IRQCHIP_PIC_SLAVE 1
130#define KVM_IRQCHIP_IOAPIC 2
131#define KVM_NR_IRQCHIPS 3
Christopher Ferris05d08e92016-02-04 13:16:38 -0800132#define KVM_RUN_X86_SMM (1 << 0)
Christopher Ferris82d75042015-01-26 10:57:07 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800134struct kvm_regs {
Tao Baod7db5942015-01-28 10:07:51 -0800135 __u64 rax, rbx, rcx, rdx;
136 __u64 rsi, rdi, rsp, rbp;
137 __u64 r8, r9, r10, r11;
Christopher Ferris82d75042015-01-26 10:57:07 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800139 __u64 r12, r13, r14, r15;
Tao Baod7db5942015-01-28 10:07:51 -0800140 __u64 rip, rflags;
Elliott Hughesabd62612013-11-08 11:45:48 -0800141};
142#define KVM_APIC_REG_SIZE 0x400
Christopher Ferris82d75042015-01-26 10:57:07 -0800143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800144struct kvm_lapic_state {
Tao Baod7db5942015-01-28 10:07:51 -0800145 char regs[KVM_APIC_REG_SIZE];
Elliott Hughesabd62612013-11-08 11:45:48 -0800146};
147struct kvm_segment {
Christopher Ferris82d75042015-01-26 10:57:07 -0800148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800149 __u64 base;
Tao Baod7db5942015-01-28 10:07:51 -0800150 __u32 limit;
151 __u16 selector;
152 __u8 type;
Christopher Ferris82d75042015-01-26 10:57:07 -0800153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800154 __u8 present, dpl, db, s, l, g, avl;
Tao Baod7db5942015-01-28 10:07:51 -0800155 __u8 unusable;
156 __u8 padding;
Elliott Hughesabd62612013-11-08 11:45:48 -0800157};
Christopher Ferris82d75042015-01-26 10:57:07 -0800158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800159struct kvm_dtable {
Tao Baod7db5942015-01-28 10:07:51 -0800160 __u64 base;
161 __u16 limit;
162 __u16 padding[3];
Christopher Ferris82d75042015-01-26 10:57:07 -0800163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800164};
Elliott Hughesabd62612013-11-08 11:45:48 -0800165struct kvm_sregs {
Tao Baod7db5942015-01-28 10:07:51 -0800166 struct kvm_segment cs, ds, es, fs, gs, ss;
167 struct kvm_segment tr, ldt;
Christopher Ferris82d75042015-01-26 10:57:07 -0800168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169 struct kvm_dtable gdt, idt;
Tao Baod7db5942015-01-28 10:07:51 -0800170 __u64 cr0, cr2, cr3, cr4, cr8;
171 __u64 efer;
172 __u64 apic_base;
Christopher Ferris82d75042015-01-26 10:57:07 -0800173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800174 __u64 interrupt_bitmap[(KVM_NR_INTERRUPTS + 63) / 64];
Elliott Hughesabd62612013-11-08 11:45:48 -0800175};
176struct kvm_fpu {
Tao Baod7db5942015-01-28 10:07:51 -0800177 __u8 fpr[8][16];
Christopher Ferris82d75042015-01-26 10:57:07 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800179 __u16 fcw;
Tao Baod7db5942015-01-28 10:07:51 -0800180 __u16 fsw;
181 __u8 ftwx;
182 __u8 pad1;
Christopher Ferris82d75042015-01-26 10:57:07 -0800183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800184 __u16 last_opcode;
Tao Baod7db5942015-01-28 10:07:51 -0800185 __u64 last_ip;
186 __u64 last_dp;
187 __u8 xmm[16][16];
Christopher Ferris82d75042015-01-26 10:57:07 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800189 __u32 mxcsr;
Tao Baod7db5942015-01-28 10:07:51 -0800190 __u32 pad2;
Elliott Hughesabd62612013-11-08 11:45:48 -0800191};
192struct kvm_msr_entry {
Christopher Ferris82d75042015-01-26 10:57:07 -0800193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800194 __u32 index;
Tao Baod7db5942015-01-28 10:07:51 -0800195 __u32 reserved;
196 __u64 data;
Elliott Hughesabd62612013-11-08 11:45:48 -0800197};
Christopher Ferris82d75042015-01-26 10:57:07 -0800198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800199struct kvm_msrs {
Tao Baod7db5942015-01-28 10:07:51 -0800200 __u32 nmsrs;
201 __u32 pad;
202 struct kvm_msr_entry entries[0];
Christopher Ferris82d75042015-01-26 10:57:07 -0800203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800204};
Elliott Hughesabd62612013-11-08 11:45:48 -0800205struct kvm_msr_list {
Tao Baod7db5942015-01-28 10:07:51 -0800206 __u32 nmsrs;
207 __u32 indices[0];
Christopher Ferris82d75042015-01-26 10:57:07 -0800208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800209};
Elliott Hughesabd62612013-11-08 11:45:48 -0800210struct kvm_cpuid_entry {
Tao Baod7db5942015-01-28 10:07:51 -0800211 __u32 function;
212 __u32 eax;
Christopher Ferris82d75042015-01-26 10:57:07 -0800213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800214 __u32 ebx;
Tao Baod7db5942015-01-28 10:07:51 -0800215 __u32 ecx;
216 __u32 edx;
217 __u32 padding;
Christopher Ferris82d75042015-01-26 10:57:07 -0800218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800219};
Elliott Hughesabd62612013-11-08 11:45:48 -0800220struct kvm_cpuid {
Tao Baod7db5942015-01-28 10:07:51 -0800221 __u32 nent;
222 __u32 padding;
Christopher Ferris82d75042015-01-26 10:57:07 -0800223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800224 struct kvm_cpuid_entry entries[0];
Elliott Hughesabd62612013-11-08 11:45:48 -0800225};
226struct kvm_cpuid_entry2 {
Tao Baod7db5942015-01-28 10:07:51 -0800227 __u32 function;
Christopher Ferris82d75042015-01-26 10:57:07 -0800228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800229 __u32 index;
Tao Baod7db5942015-01-28 10:07:51 -0800230 __u32 flags;
231 __u32 eax;
232 __u32 ebx;
Christopher Ferris82d75042015-01-26 10:57:07 -0800233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800234 __u32 ecx;
Tao Baod7db5942015-01-28 10:07:51 -0800235 __u32 edx;
236 __u32 padding[3];
Elliott Hughesabd62612013-11-08 11:45:48 -0800237};
Christopher Ferris82d75042015-01-26 10:57:07 -0800238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800239#define KVM_CPUID_FLAG_SIGNIFCANT_INDEX BIT(0)
Christopher Ferris38062f92014-07-09 15:33:25 -0700240#define KVM_CPUID_FLAG_STATEFUL_FUNC BIT(1)
241#define KVM_CPUID_FLAG_STATE_READ_NEXT BIT(2)
Elliott Hughesabd62612013-11-08 11:45:48 -0800242struct kvm_cpuid2 {
Christopher Ferris82d75042015-01-26 10:57:07 -0800243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800244 __u32 nent;
Tao Baod7db5942015-01-28 10:07:51 -0800245 __u32 padding;
246 struct kvm_cpuid_entry2 entries[0];
Elliott Hughesabd62612013-11-08 11:45:48 -0800247};
Christopher Ferris82d75042015-01-26 10:57:07 -0800248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800249struct kvm_pit_channel_state {
Tao Baod7db5942015-01-28 10:07:51 -0800250 __u32 count;
251 __u16 latched_count;
252 __u8 count_latched;
Christopher Ferris82d75042015-01-26 10:57:07 -0800253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800254 __u8 status_latched;
Tao Baod7db5942015-01-28 10:07:51 -0800255 __u8 status;
256 __u8 read_state;
257 __u8 write_state;
Christopher Ferris82d75042015-01-26 10:57:07 -0800258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800259 __u8 write_latch;
Tao Baod7db5942015-01-28 10:07:51 -0800260 __u8 rw_mode;
261 __u8 mode;
262 __u8 bcd;
Christopher Ferris82d75042015-01-26 10:57:07 -0800263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800264 __u8 gate;
Tao Baod7db5942015-01-28 10:07:51 -0800265 __s64 count_load_time;
Elliott Hughesabd62612013-11-08 11:45:48 -0800266};
267struct kvm_debug_exit_arch {
Christopher Ferris82d75042015-01-26 10:57:07 -0800268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800269 __u32 exception;
Tao Baod7db5942015-01-28 10:07:51 -0800270 __u32 pad;
271 __u64 pc;
272 __u64 dr6;
Christopher Ferris82d75042015-01-26 10:57:07 -0800273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800274 __u64 dr7;
Elliott Hughesabd62612013-11-08 11:45:48 -0800275};
276#define KVM_GUESTDBG_USE_SW_BP 0x00010000
277#define KVM_GUESTDBG_USE_HW_BP 0x00020000
Christopher Ferris82d75042015-01-26 10:57:07 -0800278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800279#define KVM_GUESTDBG_INJECT_DB 0x00040000
Elliott Hughesabd62612013-11-08 11:45:48 -0800280#define KVM_GUESTDBG_INJECT_BP 0x00080000
281struct kvm_guest_debug_arch {
Tao Baod7db5942015-01-28 10:07:51 -0800282 __u64 debugreg[8];
Christopher Ferris82d75042015-01-26 10:57:07 -0800283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800284};
Elliott Hughesabd62612013-11-08 11:45:48 -0800285struct kvm_pit_state {
Tao Baod7db5942015-01-28 10:07:51 -0800286 struct kvm_pit_channel_state channels[3];
Elliott Hughesabd62612013-11-08 11:45:48 -0800287};
Christopher Ferris82d75042015-01-26 10:57:07 -0800288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800289#define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001
Elliott Hughesabd62612013-11-08 11:45:48 -0800290struct kvm_pit_state2 {
Tao Baod7db5942015-01-28 10:07:51 -0800291 struct kvm_pit_channel_state channels[3];
292 __u32 flags;
Christopher Ferris82d75042015-01-26 10:57:07 -0800293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800294 __u32 reserved[9];
Elliott Hughesabd62612013-11-08 11:45:48 -0800295};
296struct kvm_reinject_control {
Tao Baod7db5942015-01-28 10:07:51 -0800297 __u8 pit_reinject;
Christopher Ferris82d75042015-01-26 10:57:07 -0800298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800299 __u8 reserved[31];
Elliott Hughesabd62612013-11-08 11:45:48 -0800300};
301#define KVM_VCPUEVENT_VALID_NMI_PENDING 0x00000001
302#define KVM_VCPUEVENT_VALID_SIPI_VECTOR 0x00000002
Christopher Ferris82d75042015-01-26 10:57:07 -0800303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800304#define KVM_VCPUEVENT_VALID_SHADOW 0x00000004
305#define KVM_VCPUEVENT_VALID_SMM 0x00000008
Elliott Hughesabd62612013-11-08 11:45:48 -0800306#define KVM_X86_SHADOW_INT_MOV_SS 0x01
307#define KVM_X86_SHADOW_INT_STI 0x02
Christopher Ferris05d08e92016-02-04 13:16:38 -0800308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -0800309struct kvm_vcpu_events {
Tao Baod7db5942015-01-28 10:07:51 -0800310 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800311 __u8 injected;
312 __u8 nr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800314 __u8 has_error_code;
315 __u8 pad;
Tao Baod7db5942015-01-28 10:07:51 -0800316 __u32 error_code;
317 } exception;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800319 struct {
320 __u8 injected;
Tao Baod7db5942015-01-28 10:07:51 -0800321 __u8 nr;
322 __u8 soft;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800324 __u8 shadow;
325 } interrupt;
Tao Baod7db5942015-01-28 10:07:51 -0800326 struct {
327 __u8 injected;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800329 __u8 pending;
330 __u8 masked;
Tao Baod7db5942015-01-28 10:07:51 -0800331 __u8 pad;
332 } nmi;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800334 __u32 sipi_vector;
335 __u32 flags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800336 struct {
337 __u8 smm;
Christopher Ferris82d75042015-01-26 10:57:07 -0800338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris05d08e92016-02-04 13:16:38 -0800339 __u8 pending;
340 __u8 smm_inside_nmi;
341 __u8 latched_init;
342 } smi;
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344 __u32 reserved[9];
Elliott Hughesabd62612013-11-08 11:45:48 -0800345};
346struct kvm_debugregs {
Tao Baod7db5942015-01-28 10:07:51 -0800347 __u64 db[4];
Christopher Ferris82d75042015-01-26 10:57:07 -0800348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800349 __u64 dr6;
350 __u64 dr7;
351 __u64 flags;
352 __u64 reserved[9];
Christopher Ferris82d75042015-01-26 10:57:07 -0800353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -0800354};
355struct kvm_xsave {
Tao Baod7db5942015-01-28 10:07:51 -0800356 __u32 region[1024];
Elliott Hughesabd62612013-11-08 11:45:48 -0800357};
Christopher Ferris82d75042015-01-26 10:57:07 -0800358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -0800359#define KVM_MAX_XCRS 16
360struct kvm_xcr {
Tao Baod7db5942015-01-28 10:07:51 -0800361 __u32 xcr;
362 __u32 reserved;
Christopher Ferris82d75042015-01-26 10:57:07 -0800363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800364 __u64 value;
Elliott Hughesabd62612013-11-08 11:45:48 -0800365};
366struct kvm_xcrs {
Tao Baod7db5942015-01-28 10:07:51 -0800367 __u32 nr_xcrs;
Christopher Ferris82d75042015-01-26 10:57:07 -0800368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800369 __u32 flags;
370 struct kvm_xcr xcrs[KVM_MAX_XCRS];
371 __u64 padding[16];
Elliott Hughesabd62612013-11-08 11:45:48 -0800372};
Christopher Ferris82d75042015-01-26 10:57:07 -0800373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -0800374struct kvm_sync_regs {
375};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800376#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
377#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1)
378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Elliott Hughesabd62612013-11-08 11:45:48 -0800379#endif