Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux
File: kvm.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef __LINUX_KVM_H
[1] Fix | Delete
#define __LINUX_KVM_H
[2] Fix | Delete
[3] Fix | Delete
/*
[4] Fix | Delete
* Userspace interface for /dev/kvm - kernel based virtual machine
[5] Fix | Delete
*
[6] Fix | Delete
* Note: you must update KVM_API_VERSION if you change this interface.
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
#include <linux/const.h>
[10] Fix | Delete
#include <linux/types.h>
[11] Fix | Delete
[12] Fix | Delete
#include <linux/ioctl.h>
[13] Fix | Delete
#include <asm/kvm.h>
[14] Fix | Delete
[15] Fix | Delete
#define KVM_API_VERSION 12
[16] Fix | Delete
[17] Fix | Delete
/* *** Deprecated interfaces *** */
[18] Fix | Delete
[19] Fix | Delete
#define KVM_TRC_SHIFT 16
[20] Fix | Delete
[21] Fix | Delete
#define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT)
[22] Fix | Delete
#define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1))
[23] Fix | Delete
[24] Fix | Delete
#define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01)
[25] Fix | Delete
#define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02)
[26] Fix | Delete
#define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01)
[27] Fix | Delete
[28] Fix | Delete
#define KVM_TRC_HEAD_SIZE 12
[29] Fix | Delete
#define KVM_TRC_CYCLE_SIZE 8
[30] Fix | Delete
#define KVM_TRC_EXTRA_MAX 7
[31] Fix | Delete
[32] Fix | Delete
#define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02)
[33] Fix | Delete
#define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03)
[34] Fix | Delete
#define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04)
[35] Fix | Delete
#define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05)
[36] Fix | Delete
#define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06)
[37] Fix | Delete
#define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07)
[38] Fix | Delete
#define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08)
[39] Fix | Delete
#define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09)
[40] Fix | Delete
#define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A)
[41] Fix | Delete
#define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B)
[42] Fix | Delete
#define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C)
[43] Fix | Delete
#define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D)
[44] Fix | Delete
#define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E)
[45] Fix | Delete
#define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F)
[46] Fix | Delete
#define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10)
[47] Fix | Delete
#define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11)
[48] Fix | Delete
#define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12)
[49] Fix | Delete
#define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13)
[50] Fix | Delete
#define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14)
[51] Fix | Delete
#define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15)
[52] Fix | Delete
#define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16)
[53] Fix | Delete
#define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17)
[54] Fix | Delete
#define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18)
[55] Fix | Delete
#define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19)
[56] Fix | Delete
[57] Fix | Delete
struct kvm_user_trace_setup {
[58] Fix | Delete
__u32 buf_size;
[59] Fix | Delete
__u32 buf_nr;
[60] Fix | Delete
};
[61] Fix | Delete
[62] Fix | Delete
#define __KVM_DEPRECATED_MAIN_W_0x06 \
[63] Fix | Delete
_IOW(KVMIO, 0x06, struct kvm_user_trace_setup)
[64] Fix | Delete
#define __KVM_DEPRECATED_MAIN_0x07 _IO(KVMIO, 0x07)
[65] Fix | Delete
#define __KVM_DEPRECATED_MAIN_0x08 _IO(KVMIO, 0x08)
[66] Fix | Delete
[67] Fix | Delete
#define __KVM_DEPRECATED_VM_R_0x70 _IOR(KVMIO, 0x70, struct kvm_assigned_irq)
[68] Fix | Delete
[69] Fix | Delete
struct kvm_breakpoint {
[70] Fix | Delete
__u32 enabled;
[71] Fix | Delete
__u32 padding;
[72] Fix | Delete
__u64 address;
[73] Fix | Delete
};
[74] Fix | Delete
[75] Fix | Delete
struct kvm_debug_guest {
[76] Fix | Delete
__u32 enabled;
[77] Fix | Delete
__u32 pad;
[78] Fix | Delete
struct kvm_breakpoint breakpoints[4];
[79] Fix | Delete
__u32 singlestep;
[80] Fix | Delete
};
[81] Fix | Delete
[82] Fix | Delete
#define __KVM_DEPRECATED_VCPU_W_0x87 _IOW(KVMIO, 0x87, struct kvm_debug_guest)
[83] Fix | Delete
[84] Fix | Delete
/* *** End of deprecated interfaces *** */
[85] Fix | Delete
[86] Fix | Delete
[87] Fix | Delete
/* for KVM_CREATE_MEMORY_REGION */
[88] Fix | Delete
struct kvm_memory_region {
[89] Fix | Delete
__u32 slot;
[90] Fix | Delete
__u32 flags;
[91] Fix | Delete
__u64 guest_phys_addr;
[92] Fix | Delete
__u64 memory_size; /* bytes */
[93] Fix | Delete
};
[94] Fix | Delete
[95] Fix | Delete
/* for KVM_SET_USER_MEMORY_REGION */
[96] Fix | Delete
struct kvm_userspace_memory_region {
[97] Fix | Delete
__u32 slot;
[98] Fix | Delete
__u32 flags;
[99] Fix | Delete
__u64 guest_phys_addr;
[100] Fix | Delete
__u64 memory_size; /* bytes */
[101] Fix | Delete
__u64 userspace_addr; /* start of the userspace allocated memory */
[102] Fix | Delete
};
[103] Fix | Delete
[104] Fix | Delete
/*
[105] Fix | Delete
* The bit 0 ~ bit 15 of kvm_memory_region::flags are visible for userspace,
[106] Fix | Delete
* other bits are reserved for kvm internal use which are defined in
[107] Fix | Delete
* include/linux/kvm_host.h.
[108] Fix | Delete
*/
[109] Fix | Delete
#define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0)
[110] Fix | Delete
#define KVM_MEM_READONLY (1UL << 1)
[111] Fix | Delete
[112] Fix | Delete
/* for KVM_IRQ_LINE */
[113] Fix | Delete
struct kvm_irq_level {
[114] Fix | Delete
/*
[115] Fix | Delete
* ACPI gsi notion of irq.
[116] Fix | Delete
* For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47..
[117] Fix | Delete
* For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23..
[118] Fix | Delete
* For ARM: See Documentation/virt/kvm/api.rst
[119] Fix | Delete
*/
[120] Fix | Delete
union {
[121] Fix | Delete
__u32 irq;
[122] Fix | Delete
__s32 status;
[123] Fix | Delete
};
[124] Fix | Delete
__u32 level;
[125] Fix | Delete
};
[126] Fix | Delete
[127] Fix | Delete
[128] Fix | Delete
struct kvm_irqchip {
[129] Fix | Delete
__u32 chip_id;
[130] Fix | Delete
__u32 pad;
[131] Fix | Delete
union {
[132] Fix | Delete
char dummy[512]; /* reserving space */
[133] Fix | Delete
#ifdef __KVM_HAVE_PIT
[134] Fix | Delete
struct kvm_pic_state pic;
[135] Fix | Delete
#endif
[136] Fix | Delete
#ifdef __KVM_HAVE_IOAPIC
[137] Fix | Delete
struct kvm_ioapic_state ioapic;
[138] Fix | Delete
#endif
[139] Fix | Delete
} chip;
[140] Fix | Delete
};
[141] Fix | Delete
[142] Fix | Delete
/* for KVM_CREATE_PIT2 */
[143] Fix | Delete
struct kvm_pit_config {
[144] Fix | Delete
__u32 flags;
[145] Fix | Delete
__u32 pad[15];
[146] Fix | Delete
};
[147] Fix | Delete
[148] Fix | Delete
#define KVM_PIT_SPEAKER_DUMMY 1
[149] Fix | Delete
[150] Fix | Delete
struct kvm_s390_skeys {
[151] Fix | Delete
__u64 start_gfn;
[152] Fix | Delete
__u64 count;
[153] Fix | Delete
__u64 skeydata_addr;
[154] Fix | Delete
__u32 flags;
[155] Fix | Delete
__u32 reserved[9];
[156] Fix | Delete
};
[157] Fix | Delete
[158] Fix | Delete
#define KVM_S390_CMMA_PEEK (1 << 0)
[159] Fix | Delete
[160] Fix | Delete
/**
[161] Fix | Delete
* kvm_s390_cmma_log - Used for CMMA migration.
[162] Fix | Delete
*
[163] Fix | Delete
* Used both for input and output.
[164] Fix | Delete
*
[165] Fix | Delete
* @start_gfn: Guest page number to start from.
[166] Fix | Delete
* @count: Size of the result buffer.
[167] Fix | Delete
* @flags: Control operation mode via KVM_S390_CMMA_* flags
[168] Fix | Delete
* @remaining: Used with KVM_S390_GET_CMMA_BITS. Indicates how many dirty
[169] Fix | Delete
* pages are still remaining.
[170] Fix | Delete
* @mask: Used with KVM_S390_SET_CMMA_BITS. Bitmap of bits to actually set
[171] Fix | Delete
* in the PGSTE.
[172] Fix | Delete
* @values: Pointer to the values buffer.
[173] Fix | Delete
*
[174] Fix | Delete
* Used in KVM_S390_{G,S}ET_CMMA_BITS ioctls.
[175] Fix | Delete
*/
[176] Fix | Delete
struct kvm_s390_cmma_log {
[177] Fix | Delete
__u64 start_gfn;
[178] Fix | Delete
__u32 count;
[179] Fix | Delete
__u32 flags;
[180] Fix | Delete
union {
[181] Fix | Delete
__u64 remaining;
[182] Fix | Delete
__u64 mask;
[183] Fix | Delete
};
[184] Fix | Delete
__u64 values;
[185] Fix | Delete
};
[186] Fix | Delete
[187] Fix | Delete
struct kvm_hyperv_exit {
[188] Fix | Delete
#define KVM_EXIT_HYPERV_SYNIC 1
[189] Fix | Delete
#define KVM_EXIT_HYPERV_HCALL 2
[190] Fix | Delete
#define KVM_EXIT_HYPERV_SYNDBG 3
[191] Fix | Delete
__u32 type;
[192] Fix | Delete
__u32 pad1;
[193] Fix | Delete
union {
[194] Fix | Delete
struct {
[195] Fix | Delete
__u32 msr;
[196] Fix | Delete
__u32 pad2;
[197] Fix | Delete
__u64 control;
[198] Fix | Delete
__u64 evt_page;
[199] Fix | Delete
__u64 msg_page;
[200] Fix | Delete
} synic;
[201] Fix | Delete
struct {
[202] Fix | Delete
__u64 input;
[203] Fix | Delete
__u64 result;
[204] Fix | Delete
__u64 params[2];
[205] Fix | Delete
} hcall;
[206] Fix | Delete
struct {
[207] Fix | Delete
__u32 msr;
[208] Fix | Delete
__u32 pad2;
[209] Fix | Delete
__u64 control;
[210] Fix | Delete
__u64 status;
[211] Fix | Delete
__u64 send_page;
[212] Fix | Delete
__u64 recv_page;
[213] Fix | Delete
__u64 pending_page;
[214] Fix | Delete
} syndbg;
[215] Fix | Delete
} u;
[216] Fix | Delete
};
[217] Fix | Delete
[218] Fix | Delete
struct kvm_xen_exit {
[219] Fix | Delete
#define KVM_EXIT_XEN_HCALL 1
[220] Fix | Delete
__u32 type;
[221] Fix | Delete
union {
[222] Fix | Delete
struct {
[223] Fix | Delete
__u32 longmode;
[224] Fix | Delete
__u32 cpl;
[225] Fix | Delete
__u64 input;
[226] Fix | Delete
__u64 result;
[227] Fix | Delete
__u64 params[6];
[228] Fix | Delete
} hcall;
[229] Fix | Delete
} u;
[230] Fix | Delete
};
[231] Fix | Delete
[232] Fix | Delete
#define KVM_S390_GET_SKEYS_NONE 1
[233] Fix | Delete
#define KVM_S390_SKEYS_MAX 1048576
[234] Fix | Delete
[235] Fix | Delete
#define KVM_EXIT_UNKNOWN 0
[236] Fix | Delete
#define KVM_EXIT_EXCEPTION 1
[237] Fix | Delete
#define KVM_EXIT_IO 2
[238] Fix | Delete
#define KVM_EXIT_HYPERCALL 3
[239] Fix | Delete
#define KVM_EXIT_DEBUG 4
[240] Fix | Delete
#define KVM_EXIT_HLT 5
[241] Fix | Delete
#define KVM_EXIT_MMIO 6
[242] Fix | Delete
#define KVM_EXIT_IRQ_WINDOW_OPEN 7
[243] Fix | Delete
#define KVM_EXIT_SHUTDOWN 8
[244] Fix | Delete
#define KVM_EXIT_FAIL_ENTRY 9
[245] Fix | Delete
#define KVM_EXIT_INTR 10
[246] Fix | Delete
#define KVM_EXIT_SET_TPR 11
[247] Fix | Delete
#define KVM_EXIT_TPR_ACCESS 12
[248] Fix | Delete
#define KVM_EXIT_S390_SIEIC 13
[249] Fix | Delete
#define KVM_EXIT_S390_RESET 14
[250] Fix | Delete
#define KVM_EXIT_DCR 15 /* deprecated */
[251] Fix | Delete
#define KVM_EXIT_NMI 16
[252] Fix | Delete
#define KVM_EXIT_INTERNAL_ERROR 17
[253] Fix | Delete
#define KVM_EXIT_OSI 18
[254] Fix | Delete
#define KVM_EXIT_PAPR_HCALL 19
[255] Fix | Delete
#define KVM_EXIT_S390_UCONTROL 20
[256] Fix | Delete
#define KVM_EXIT_WATCHDOG 21
[257] Fix | Delete
#define KVM_EXIT_S390_TSCH 22
[258] Fix | Delete
#define KVM_EXIT_EPR 23
[259] Fix | Delete
#define KVM_EXIT_SYSTEM_EVENT 24
[260] Fix | Delete
#define KVM_EXIT_S390_STSI 25
[261] Fix | Delete
#define KVM_EXIT_IOAPIC_EOI 26
[262] Fix | Delete
#define KVM_EXIT_HYPERV 27
[263] Fix | Delete
#define KVM_EXIT_ARM_NISV 28
[264] Fix | Delete
#define KVM_EXIT_X86_RDMSR 29
[265] Fix | Delete
#define KVM_EXIT_X86_WRMSR 30
[266] Fix | Delete
#define KVM_EXIT_DIRTY_RING_FULL 31
[267] Fix | Delete
#define KVM_EXIT_AP_RESET_HOLD 32
[268] Fix | Delete
#define KVM_EXIT_X86_BUS_LOCK 33
[269] Fix | Delete
#define KVM_EXIT_XEN 34
[270] Fix | Delete
[271] Fix | Delete
/* For KVM_EXIT_INTERNAL_ERROR */
[272] Fix | Delete
/* Emulate instruction failed. */
[273] Fix | Delete
#define KVM_INTERNAL_ERROR_EMULATION 1
[274] Fix | Delete
/* Encounter unexpected simultaneous exceptions. */
[275] Fix | Delete
#define KVM_INTERNAL_ERROR_SIMUL_EX 2
[276] Fix | Delete
/* Encounter unexpected vm-exit due to delivery event. */
[277] Fix | Delete
#define KVM_INTERNAL_ERROR_DELIVERY_EV 3
[278] Fix | Delete
/* Encounter unexpected vm-exit reason */
[279] Fix | Delete
#define KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON 4
[280] Fix | Delete
[281] Fix | Delete
/* Flags that describe what fields in emulation_failure hold valid data. */
[282] Fix | Delete
#define KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES (1ULL << 0)
[283] Fix | Delete
[284] Fix | Delete
/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
[285] Fix | Delete
struct kvm_run {
[286] Fix | Delete
/* in */
[287] Fix | Delete
__u8 request_interrupt_window;
[288] Fix | Delete
__u8 immediate_exit;
[289] Fix | Delete
__u8 padding1[6];
[290] Fix | Delete
[291] Fix | Delete
/* out */
[292] Fix | Delete
__u32 exit_reason;
[293] Fix | Delete
__u8 ready_for_interrupt_injection;
[294] Fix | Delete
__u8 if_flag;
[295] Fix | Delete
__u16 flags;
[296] Fix | Delete
[297] Fix | Delete
/* in (pre_kvm_run), out (post_kvm_run) */
[298] Fix | Delete
__u64 cr8;
[299] Fix | Delete
__u64 apic_base;
[300] Fix | Delete
[301] Fix | Delete
#ifdef __KVM_S390
[302] Fix | Delete
/* the processor status word for s390 */
[303] Fix | Delete
__u64 psw_mask; /* psw upper half */
[304] Fix | Delete
__u64 psw_addr; /* psw lower half */
[305] Fix | Delete
#endif
[306] Fix | Delete
union {
[307] Fix | Delete
/* KVM_EXIT_UNKNOWN */
[308] Fix | Delete
struct {
[309] Fix | Delete
__u64 hardware_exit_reason;
[310] Fix | Delete
} hw;
[311] Fix | Delete
/* KVM_EXIT_FAIL_ENTRY */
[312] Fix | Delete
struct {
[313] Fix | Delete
__u64 hardware_entry_failure_reason;
[314] Fix | Delete
__u32 cpu;
[315] Fix | Delete
} fail_entry;
[316] Fix | Delete
/* KVM_EXIT_EXCEPTION */
[317] Fix | Delete
struct {
[318] Fix | Delete
__u32 exception;
[319] Fix | Delete
__u32 error_code;
[320] Fix | Delete
} ex;
[321] Fix | Delete
/* KVM_EXIT_IO */
[322] Fix | Delete
struct {
[323] Fix | Delete
#define KVM_EXIT_IO_IN 0
[324] Fix | Delete
#define KVM_EXIT_IO_OUT 1
[325] Fix | Delete
__u8 direction;
[326] Fix | Delete
__u8 size; /* bytes */
[327] Fix | Delete
__u16 port;
[328] Fix | Delete
__u32 count;
[329] Fix | Delete
__u64 data_offset; /* relative to kvm_run start */
[330] Fix | Delete
} io;
[331] Fix | Delete
/* KVM_EXIT_DEBUG */
[332] Fix | Delete
struct {
[333] Fix | Delete
struct kvm_debug_exit_arch arch;
[334] Fix | Delete
} debug;
[335] Fix | Delete
/* KVM_EXIT_MMIO */
[336] Fix | Delete
struct {
[337] Fix | Delete
__u64 phys_addr;
[338] Fix | Delete
__u8 data[8];
[339] Fix | Delete
__u32 len;
[340] Fix | Delete
__u8 is_write;
[341] Fix | Delete
} mmio;
[342] Fix | Delete
/* KVM_EXIT_HYPERCALL */
[343] Fix | Delete
struct {
[344] Fix | Delete
__u64 nr;
[345] Fix | Delete
__u64 args[6];
[346] Fix | Delete
__u64 ret;
[347] Fix | Delete
__u32 longmode;
[348] Fix | Delete
__u32 pad;
[349] Fix | Delete
} hypercall;
[350] Fix | Delete
/* KVM_EXIT_TPR_ACCESS */
[351] Fix | Delete
struct {
[352] Fix | Delete
__u64 rip;
[353] Fix | Delete
__u32 is_write;
[354] Fix | Delete
__u32 pad;
[355] Fix | Delete
} tpr_access;
[356] Fix | Delete
/* KVM_EXIT_S390_SIEIC */
[357] Fix | Delete
struct {
[358] Fix | Delete
__u8 icptcode;
[359] Fix | Delete
__u16 ipa;
[360] Fix | Delete
__u32 ipb;
[361] Fix | Delete
} s390_sieic;
[362] Fix | Delete
/* KVM_EXIT_S390_RESET */
[363] Fix | Delete
#define KVM_S390_RESET_POR 1
[364] Fix | Delete
#define KVM_S390_RESET_CLEAR 2
[365] Fix | Delete
#define KVM_S390_RESET_SUBSYSTEM 4
[366] Fix | Delete
#define KVM_S390_RESET_CPU_INIT 8
[367] Fix | Delete
#define KVM_S390_RESET_IPL 16
[368] Fix | Delete
__u64 s390_reset_flags;
[369] Fix | Delete
/* KVM_EXIT_S390_UCONTROL */
[370] Fix | Delete
struct {
[371] Fix | Delete
__u64 trans_exc_code;
[372] Fix | Delete
__u32 pgm_code;
[373] Fix | Delete
} s390_ucontrol;
[374] Fix | Delete
/* KVM_EXIT_DCR (deprecated) */
[375] Fix | Delete
struct {
[376] Fix | Delete
__u32 dcrn;
[377] Fix | Delete
__u32 data;
[378] Fix | Delete
__u8 is_write;
[379] Fix | Delete
} dcr;
[380] Fix | Delete
/* KVM_EXIT_INTERNAL_ERROR */
[381] Fix | Delete
struct {
[382] Fix | Delete
__u32 suberror;
[383] Fix | Delete
/* Available with KVM_CAP_INTERNAL_ERROR_DATA: */
[384] Fix | Delete
__u32 ndata;
[385] Fix | Delete
__u64 data[16];
[386] Fix | Delete
} internal;
[387] Fix | Delete
/*
[388] Fix | Delete
* KVM_INTERNAL_ERROR_EMULATION
[389] Fix | Delete
*
[390] Fix | Delete
* "struct emulation_failure" is an overlay of "struct internal"
[391] Fix | Delete
* that is used for the KVM_INTERNAL_ERROR_EMULATION sub-type of
[392] Fix | Delete
* KVM_EXIT_INTERNAL_ERROR. Note, unlike other internal error
[393] Fix | Delete
* sub-types, this struct is ABI! It also needs to be backwards
[394] Fix | Delete
* compatible with "struct internal". Take special care that
[395] Fix | Delete
* "ndata" is correct, that new fields are enumerated in "flags",
[396] Fix | Delete
* and that each flag enumerates fields that are 64-bit aligned
[397] Fix | Delete
* and sized (so that ndata+internal.data[] is valid/accurate).
[398] Fix | Delete
*
[399] Fix | Delete
* Space beyond the defined fields may be used to store arbitrary
[400] Fix | Delete
* debug information relating to the emulation failure. It is
[401] Fix | Delete
* accounted for in "ndata" but the format is unspecified and is
[402] Fix | Delete
* not represented in "flags". Any such information is *not* ABI!
[403] Fix | Delete
*/
[404] Fix | Delete
struct {
[405] Fix | Delete
__u32 suberror;
[406] Fix | Delete
__u32 ndata;
[407] Fix | Delete
__u64 flags;
[408] Fix | Delete
union {
[409] Fix | Delete
struct {
[410] Fix | Delete
__u8 insn_size;
[411] Fix | Delete
__u8 insn_bytes[15];
[412] Fix | Delete
};
[413] Fix | Delete
};
[414] Fix | Delete
/* Arbitrary debug data may follow. */
[415] Fix | Delete
} emulation_failure;
[416] Fix | Delete
/* KVM_EXIT_OSI */
[417] Fix | Delete
struct {
[418] Fix | Delete
__u64 gprs[32];
[419] Fix | Delete
} osi;
[420] Fix | Delete
/* KVM_EXIT_PAPR_HCALL */
[421] Fix | Delete
struct {
[422] Fix | Delete
__u64 nr;
[423] Fix | Delete
__u64 ret;
[424] Fix | Delete
__u64 args[9];
[425] Fix | Delete
} papr_hcall;
[426] Fix | Delete
/* KVM_EXIT_S390_TSCH */
[427] Fix | Delete
struct {
[428] Fix | Delete
__u16 subchannel_id;
[429] Fix | Delete
__u16 subchannel_nr;
[430] Fix | Delete
__u32 io_int_parm;
[431] Fix | Delete
__u32 io_int_word;
[432] Fix | Delete
__u32 ipb;
[433] Fix | Delete
__u8 dequeued;
[434] Fix | Delete
} s390_tsch;
[435] Fix | Delete
/* KVM_EXIT_EPR */
[436] Fix | Delete
struct {
[437] Fix | Delete
__u32 epr;
[438] Fix | Delete
} epr;
[439] Fix | Delete
/* KVM_EXIT_SYSTEM_EVENT */
[440] Fix | Delete
struct {
[441] Fix | Delete
#define KVM_SYSTEM_EVENT_SHUTDOWN 1
[442] Fix | Delete
#define KVM_SYSTEM_EVENT_RESET 2
[443] Fix | Delete
#define KVM_SYSTEM_EVENT_CRASH 3
[444] Fix | Delete
__u32 type;
[445] Fix | Delete
__u64 flags;
[446] Fix | Delete
} system_event;
[447] Fix | Delete
/* KVM_EXIT_S390_STSI */
[448] Fix | Delete
struct {
[449] Fix | Delete
__u64 addr;
[450] Fix | Delete
__u8 ar;
[451] Fix | Delete
__u8 reserved;
[452] Fix | Delete
__u8 fc;
[453] Fix | Delete
__u8 sel1;
[454] Fix | Delete
__u16 sel2;
[455] Fix | Delete
} s390_stsi;
[456] Fix | Delete
/* KVM_EXIT_IOAPIC_EOI */
[457] Fix | Delete
struct {
[458] Fix | Delete
__u8 vector;
[459] Fix | Delete
} eoi;
[460] Fix | Delete
/* KVM_EXIT_HYPERV */
[461] Fix | Delete
struct kvm_hyperv_exit hyperv;
[462] Fix | Delete
/* KVM_EXIT_ARM_NISV */
[463] Fix | Delete
struct {
[464] Fix | Delete
__u64 esr_iss;
[465] Fix | Delete
__u64 fault_ipa;
[466] Fix | Delete
} arm_nisv;
[467] Fix | Delete
/* KVM_EXIT_X86_RDMSR / KVM_EXIT_X86_WRMSR */
[468] Fix | Delete
struct {
[469] Fix | Delete
__u8 error; /* user -> kernel */
[470] Fix | Delete
__u8 pad[7];
[471] Fix | Delete
#define KVM_MSR_EXIT_REASON_INVAL (1 << 0)
[472] Fix | Delete
#define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1)
[473] Fix | Delete
#define KVM_MSR_EXIT_REASON_FILTER (1 << 2)
[474] Fix | Delete
__u32 reason; /* kernel -> user */
[475] Fix | Delete
__u32 index; /* kernel -> user */
[476] Fix | Delete
__u64 data; /* kernel <-> user */
[477] Fix | Delete
} msr;
[478] Fix | Delete
/* KVM_EXIT_XEN */
[479] Fix | Delete
struct kvm_xen_exit xen;
[480] Fix | Delete
/* Fix the size of the union. */
[481] Fix | Delete
char padding[256];
[482] Fix | Delete
};
[483] Fix | Delete
[484] Fix | Delete
/* 2048 is the size of the char array used to bound/pad the size
[485] Fix | Delete
* of the union that holds sync regs.
[486] Fix | Delete
*/
[487] Fix | Delete
#define SYNC_REGS_SIZE_BYTES 2048
[488] Fix | Delete
/*
[489] Fix | Delete
* shared registers between kvm and userspace.
[490] Fix | Delete
* kvm_valid_regs specifies the register classes set by the host
[491] Fix | Delete
* kvm_dirty_regs specified the register classes dirtied by userspace
[492] Fix | Delete
* struct kvm_sync_regs is architecture specific, as well as the
[493] Fix | Delete
* bits for kvm_valid_regs and kvm_dirty_regs
[494] Fix | Delete
*/
[495] Fix | Delete
__u64 kvm_valid_regs;
[496] Fix | Delete
__u64 kvm_dirty_regs;
[497] Fix | Delete
union {
[498] Fix | Delete
struct kvm_sync_regs regs;
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function