Lines Matching +full:guest +full:- +full:index +full:- +full:bits

1 .. SPDX-License-Identifier: GPL-2.0
4 The Definitive KVM (Kernel-based Virtual Machine) API Documentation
24 - System ioctls: These query and set global attributes which affect the
28 - VM ioctls: These query and set attributes that affect an entire virtual
35 - vcpu ioctls: These query and set attributes that control the operation
43 - device ioctls: These query and set attributes that control the operation
92 facility that allows backward-compatible extensions to the API to be
133 -----------------------
150 -----------------
185 to 40bits by default. The limit can be configured if the host supports the
189 address used by the VM. The IPA_Bits is encoded in bits[7-0] of the
192 e.g, to configure a guest to use 48bit physical address size::
199 0 Implies default size, 40bits (for backward compatibility)
200 N Implies N bits, where N is a positive integer such that,
207 ioctl() at run-time.
213 exposed by the guest CPUs in ID_AA64MMFR0_EL1[PARange]. It only affects
214 size of the address translated by the stage2 level (guest physical to
219 ----------------------------------------------------------
225 :Returns: 0 on success; -1 on error
230 EFAULT the msr index list cannot be read from or written to
231 E2BIG the msr index list is too big to fit in the array specified by
246 KVM_GET_MSR_INDEX_LIST returns the guest msrs that are supported. The list
263 -----------------------
282 --------------------------
295 the VCPU file descriptor can be mmap-ed, including:
297 - if KVM_CAP_COALESCED_MMIO is available, a page at
302 - if KVM_CAP_DIRTY_LOG_RING is available, a number of pages at
308 -------------------
314 :Returns: vcpu fd on success, -1 on error
320 the KVM_CHECK_EXTENSION ioctl() at run-time.
322 KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time.
330 KVM_CAP_MAX_VCPU_ID of the KVM_CHECK_EXTENSION ioctl() at run-time.
343 Userspace can control the threading (SMT) mode of the guest by its
345 single-threaded guest vcpus, it should make all vcpu ids be a multiple
355 ---------------------
361 :Returns: 0 on success, -1 on error
380 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies
384 The bits in the dirty bitmap are cleared before the ioctl returns, unless
393 ------------
399 :Returns: 0 on success, -1 on error
405 ENOEXEC the vcpu hasn't been initialized or the guest tried to execute
412 This ioctl is used to run a guest virtual cpu. While there are no
420 -----------------
426 :Returns: 0 on success, -1 on error
460 -----------------
466 :Returns: 0 on success, -1 on error
474 ------------------
480 :Returns: 0 on success, -1 on error
497 /* ppc -- see arch/powerpc/include/uapi/asm/kvm.h */
505 ------------------
511 :Returns: 0 on success, -1 on error
518 ------------------
524 :Returns: 0 on success, -1 on error
545 ------------------
570 -EEXIST if an interrupt is already enqueued
571 -EINVAL the irq number is invalid
572 -ENXIO if the PIC is in the kernel
573 -EFAULT if the pointer is invalid
577 ioctl is useful if the in-kernel PIC is not used.
587 This injects an edge type external interrupt into the guest once it's ready
598 This injects a level type external interrupt into the guest context. The
617 RISC-V:
644 -----------------
651 -1 on error
654 Reads the values of MSR-based features that are available for the VM. This
656 The list of msr-based features can be obtained using KVM_GET_MSR_FEATURE_INDEX_LIST
660 Reads model-specific registers from the vcpu. Supported msr indices can
673 __u32 index;
679 size of the entries array) and the 'index' member of each array entry.
684 -----------------
690 :Returns: number of msrs successfully set (see below), -1 on error
692 Writes model-specific registers to the vcpu. See KVM_GET_MSRS for the
696 size of the entries array), and the 'index' and 'data' members of each
700 fails, e.g., due to setting reserved bits, the MSR isn't supported/emulated
706 ------------------
712 :Returns: 0 on success, -1 on error
718 - If this IOCTL fails, KVM gives no guarantees that previous valid CPUID
721 - Using KVM_SET_CPUID{,2} after KVM_RUN, i.e. changing the guest vCPU model
722 after running the guest, may cause guest instability.
723 - Using heterogeneous CPUID configurations, modulo APIC IDs, topology, etc...
724 may cause guest instability.
746 ------------------------
752 :Returns: 0 on success, -1 on error
757 their traditional behaviour) will cause KVM_RUN to return with -EINTR.
772 ----------------
778 :Returns: 0 on success, -1 on error
810 ----------------
816 :Returns: 0 on success, -1 on error
848 -----------------------
854 :Returns: 0 on success, -1 on error
858 future vcpus to have a local APIC. IRQ routing for GSIs 0-15 is set to both
859 PIC and IOAPIC; GSI 16-23 only go to the IOAPIC.
870 -----------------
876 :Returns: 0 on success, -1 on error
880 been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered
883 On real hardware, interrupt pins can be active-low or active-high. This
888 (active-low/active-high) for level-triggered interrupts, and KVM used
890 active-low interrupts, the above convention is now valid on x86 too.
892 should not present interrupts to the guest as active-low unless this
893 capability is present (or unless it is not using the in-kernel irqchip,
898 in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to
902 bits: | 31 ... 28 | 27 ... 24 | 23 ... 16 | 15 ... 0 |
907 - KVM_ARM_IRQ_TYPE_CPU:
908 out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
909 - KVM_ARM_IRQ_TYPE_SPI:
910 in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.)
912 - KVM_ARM_IRQ_TYPE_PPI:
913 in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)
924 injection of interrupts for the in-kernel irqchip. KVM_IRQ_LINE can always
939 --------------------
945 :Returns: 0 on success, -1 on error
964 --------------------
970 :Returns: 0 on success, -1 on error
989 -----------------------
995 :Returns: 0 on success, -1 on error
997 Sets the MSR that the Xen HVM guest uses to initialize its hypercall
999 blobs in userspace. When the guest writes the MSR, kvm copies one
1000 page of a blob (32- or 64-bit, depending on the vcpu mode) to guest
1025 channel interrupts rather than manipulating the guest's shared_info
1028 spinlock operation for the guest. Userspace may still use the ioctl
1035 ------------------
1041 :Returns: 0 on success, -1 on error
1043 Gets the current timestamp of kvmclock as seen by the current guest. In
1048 set of bits that KVM can return in struct kvm_clock_data's flag member.
1085 ------------------
1091 :Returns: 0 on success, -1 on error
1120 ------------------------
1127 :Returns: 0 on success, -1 on error
1170 The following bits are defined in the flags field:
1172 - KVM_VCPUEVENT_VALID_SHADOW may be set to signal that
1175 - KVM_VCPUEVENT_VALID_SMM may be set to signal that smi contains a
1178 - KVM_VCPUEVENT_VALID_PAYLOAD may be set to signal that the
1183 - KVM_VCPUEVENT_VALID_TRIPLE_FAULT may be set to signal that the
1190 If the guest accesses a device that is being emulated by the host kernel in
1193 pending until the guest takes the exception by unmasking PSTATE.A.
1200 visible to the guest. To save, restore or migrate a VCPU the struct representing
1202 guest-visible registers. It is not possible to 'cancel' an SError that has been
1205 A device being emulated in user-space may also wish to generate an SError. To do
1206 this the events structure can be populated by user-space. The current state
1215 always have a non-zero value when read, and the agent making an SError pending
1216 should specify the ISS field in the lower 24 bits of exception.serror_esr. If
1217 the system supports KVM_CAP_ARM_INJECT_SERROR_ESR, but user-space sets the events
1221 -EINVAL. Setting anything other than the lower 24bits of exception.serror_esr
1222 will return -EINVAL.
1243 ------------------------
1250 :Returns: 0 on success, -1 on error
1262 smi.pending. Keep the corresponding bits in the flags field cleared to
1263 suppress overwriting the current in-kernel state. The bits are:
1268 KVM_VCPUEVENT_VALID_SMM transfer the smi sub-struct.
1289 User space may need to inject several types of events to the guest.
1294 If the guest performed an access to I/O memory which could not be handled by
1310 ----------------------
1316 :Returns: 0 on success, -1 on error
1332 ----------------------
1338 :Returns: 0 on success, -1 on error
1347 -------------------------------
1353 :Returns: 0 on success, -1 on error
1369 This ioctl allows the user to create, modify or delete a guest physical
1370 memory slot. Bits 0-15 of "slot" specify the slot id and this value
1373 Slots may not overlap in guest physical address space.
1375 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot"
1383 an existing slot, it may be moved in the guest physical memory space,
1394 It is recommended that the lower 21 bits of guest_phys_addr and userspace_addr
1395 be identical. This allows large pages in the guest to be backed by large
1402 to make a new slot read-only. In this case, writes to this memory will be
1406 the memory region are automatically reflected into the guest. For example, an
1410 Note: On arm64, a write generated by the page-table walker (to update
1414 page-table walker, making it impossible to emulate the access.
1415 Instead, an abort (data abort if the cause of the page-table update
1417 fetch) is injected in the guest.
1422 Returns -EINVAL or -EEXIST if the VM has the KVM_VM_S390_UCONTROL flag set.
1423 Returns -EINVAL if called on a protected VM.
1426 ---------------------
1432 :Returns: 0 on success, -1 on error
1434 This ioctl defines the physical address of a three-page region in the guest
1436 guest physical address space and must not conflict with any memory slot
1437 or any mmio address. The guest may malfunction if it accesses this memory
1440 This ioctl is required on Intel-based hosts. This is needed on Intel hardware
1448 -------------------
1454 :Returns: 0 on success; -1 on error
1460 :Returns: 0 on success; -1 on error
1465 can enable an extension, making it available to the guest.
1499 The vcpu ioctl should be used for vcpu-specific capabilities, the vm ioctl
1500 for vm-wide capabilities.
1503 ---------------------
1509 :Returns: 0 on success; -1 on error
1544 in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1572 guest.
1584 ---------------------
1590 :Returns: 0 on success; -1 on error
1596 in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1609 ------------------------------
1615 :Returns: 0 on success, -1 on error
1617 This ioctl defines the physical address of a one-page region in the guest
1619 guest physical address space and must not conflict with any memory slot
1620 or any mmio address. The guest may malfunction if it accesses this memory
1626 This ioctl is required on Intel-based hosts. This is needed on Intel hardware
1633 ------------------------
1639 :Returns: 0 on success, -1 on error
1648 ------------------
1654 :Returns: 0 on success, -1 on error
1668 ------------------
1674 :Returns: 0 on success, -1 on error
1696 -----------------
1702 :Returns: 0 on success, -1 on error
1723 -----------------
1729 :Returns: 0 on success, -1 on error
1750 ----------------------------
1756 :Returns: 0 on success, -1 on error
1772 __u32 index;
1789 Dynamically-enabled feature bits need to be requested with
1790 ``arch_prctl()`` before calling this ioctl. Feature bits that have not
1799 with the 'nent' field indicating the number of entries in the variable-size
1814 index:
1822 if the index field is valid
1826 this function/index combination
1829 may be returned as true, but they depend on KVM_CREATE_IRQCHIP for in-kernel
1842 -----------------------
1858 This ioctl fetches PV specific information that need to be passed to the guest
1872 ------------------------
1878 :Returns: 0 on success, -1 on error
1884 - GSI routing does not apply to KVM_IRQ_LINE but only to KVM_IRQFD.
1921 error -EINVAL.
1925 - KVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry
1926 type, specifies that the devid field contains a valid value. The per-VM
1930 - zero otherwise
1951 BDF identifier in the lower 16 bits.
1955 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
1989 --------------------
1995 :Returns: 0 on success, -1 on error
2005 --------------------
2011 :Returns: virtual tsc-khz on success, negative value on error
2013 Returns the tsc frequency of the guest. The unit of the return value is
2014 KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
2019 ------------------
2025 :Returns: 0 on success, -1 on error
2040 the APIC_ID register (bytes 32-35). xAPIC only allows an 8-bit APIC ID
2041 which is stored in bits 31-24 of the APIC register, or equivalently in
2050 ------------------
2056 :Returns: 0 on success, -1 on error
2068 The format of the APIC ID register (bytes 32-35 of struct kvm_lapic_state's
2074 ------------------
2083 within the guest. A guest write in the registered address will signal the
2097 For the special case of virtio-ccw devices on s390, the ioevent is matched
2111 For virtio-ccw devices, addr contains the subchannel id and datamatch the
2112 virtqueue index.
2115 the kernel will ignore the length of guest write and may get a faster vmexit.
2120 ------------------
2126 :Returns: 0 on success, -1 on error
2139 consists of a number of bits, equal to the total number of TLB entries as
2146 The array is little-endian: the bit 0 is the least significant bit of the
2152 be set to the number of set bits in the bitmap.
2156 -------------------------
2165 is an IOMMU for PAPR-style virtual I/O. It is used to translate
2166 logical addresses used in virtual I/O into guest physical addresses,
2179 which this TCE table will translate - the table will contain one 64
2182 When the guest issues an H_PUT_TCE hcall on a liobn for which a TCE
2189 the entries written by kernel-handled H_PUT_TCE calls, and also lets
2195 ------------
2201 :Returns: 0 on success, -1 on error
2211 - pause the vcpu
2212 - read the local APIC's state (KVM_GET_LAPIC)
2213 - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1)
2214 - if so, issue KVM_NMI
2215 - resume the vcpu
2222 ----------------------
2244 ------------------------
2266 ------------------------
2284 --------------------
2322 Arch Register Width (bits)
2520 ARM registers are mapped using the lower 32 bits. The upper 16 of that
2525 0x4020 0000 0010 <index into the kvm_regs struct:16>
2527 ARM 32-bit CP15 registers have the following id bit patterns::
2531 ARM 64-bit CP15 registers have the following id bit patterns::
2539 ARM 32-bit VFP control registers have the following id bit patterns::
2543 ARM 64-bit FP registers have the following id bit patterns::
2547 ARM firmware pseudo-registers have the following bit pattern::
2552 arm64 registers are mapped using the lower 32 bits. The upper 16 of
2555 arm64 core/FP-SIMD registers have the following id bit patterns. Note
2557 contains elements ranging from 32 to 128 bits. The index is a 32bit
2560 0x60x0 0000 0010 <index into the kvm_regs struct:16>
2565 Encoding Register Bits kvm_regs member
2589 .. [1] These encodings are not accepted for SVE-enabled vcpus. See
2592 The equivalent register content can be accessed via bits [127:0] of
2614 arm64 firmware pseudo-registers have the following bit pattern::
2620 0x6080 0000 0015 00 <n:5> <slice:5> Zn bits[2048*slice + 2047 : 2048*slice]
2621 0x6050 0000 0015 04 <n:4> <slice:5> Pn bits[256*slice + 255 : 256*slice]
2622 0x6050 0000 0015 060 <slice:5> FFR bits[256*slice + 255 : 256*slice]
2623 0x6060 0000 0015 ffff KVM_REG_ARM64_SVE_VLS pseudo-register
2626 ENOENT. max_vq is the vcpu's maximum supported vector length in 128-bit
2637 KVM_REG_ARM64_SVE_VLS is a pseudo-register that allows the set of vector
2647 ((vector_lengths[(vq - KVM_ARM64_SVE_VQ_MIN) / 64] >>
2648 ((vq - KVM_ARM64_SVE_VQ_MIN) % 64)) & 1))
2654 max_vq. This is the maximum vector length available to the guest on
2670 is hardware-dependent and may not be available. Attempting to configure
2677 arm64 bitmap feature firmware pseudo-registers have the following bit pattern::
2682 are available for userspace to configure. The set bits corresponds to the
2684 sets all the supported bits during VM initialization. The userspace can
2691 a -EBUSY to userspace.
2696 MIPS registers are mapped using the lower 32 bits. The upper 16 of that is
2704 patterns depending on whether they're 32-bit or 64-bit registers::
2706 0x7020 0000 0001 00 <reg:5> <sel:3> (32-bit)
2707 0x7030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2711 hardware, host kernel, guest, and whether XPA is present in the guest, i.e.
2712 with the RI and XI bits (if they exist) in bits 63 and 62 respectively, and
2726 always accessed according to the current guest FPU mode (Status.FR and
2727 Config5.FRE), i.e. as the guest would see them, and they become unpredictable
2728 if the guest FPU mode is changed. MIPS SIMD Architecture (MSA) vector
2732 0x7020 0000 0003 00 <0:3> <reg:5> (32-bit FPU registers)
2733 0x7030 0000 0003 00 <0:3> <reg:5> (64-bit FPU registers)
2734 0x7040 0000 0003 00 <0:3> <reg:5> (128-bit MSA vector registers)
2746 RISC-V registers are mapped using the lower 32 bits. The upper 8 bits of
2749 RISC-V config registers are meant for configuring a Guest VCPU and it has
2752 0x8020 0000 01 <index into the kvm_riscv_config struct:24> (32bit Host)
2753 0x8030 0000 01 <index into the kvm_riscv_config struct:24> (64bit Host)
2755 Following are the RISC-V config registers:
2760 0x80x0 0000 0100 0000 isa ISA feature bitmap of Guest VCPU
2764 a Guest VCPU runs. It will have ISA feature bits matching underlying host
2767 RISC-V core registers represent the general execution state of a Guest VCPU
2770 0x8020 0000 02 <index into the kvm_riscv_core struct:24> (32bit Host)
2771 0x8030 0000 02 <index into the kvm_riscv_core struct:24> (64bit Host)
2773 Following are the RISC-V core registers:
2810 0x80x0 0000 0200 0020 mode Privilege mode (1 = S-mode or 0 = U-mode)
2813 RISC-V csr registers represent the supervisor mode control/status registers
2814 of a Guest VCPU and it has the following id bit patterns::
2816 0x8020 0000 03 <index into the kvm_riscv_csr struct:24> (32bit Host)
2817 0x8030 0000 03 <index into the kvm_riscv_csr struct:24> (64bit Host)
2819 Following are the RISC-V csr registers:
2835 RISC-V timer registers represent the timer state of a Guest VCPU and it has
2838 0x8030 0000 04 <index into the kvm_riscv_timer struct:24>
2840 Following are the RISC-V timer registers:
2845 0x8030 0000 0400 0000 frequency Time base frequency (read-only)
2846 0x8030 0000 0400 0001 time Time value visible to Guest
2847 0x8030 0000 0400 0002 compare Time compare programmed by Guest
2851 RISC-V F-extension registers represent the single precision floating point
2852 state of a Guest VCPU and it has the following id bit patterns::
2854 0x8020 0000 05 <index into the __riscv_f_ext_state struct:24>
2856 Following are the RISC-V F-extension registers:
2867 RISC-V D-extension registers represent the double precision floating point
2868 state of a Guest VCPU and it has the following id bit patterns::
2870 0x8020 0000 06 <index into the __riscv_d_ext_state struct:24> (fcsr)
2871 0x8030 0000 06 <index into the __riscv_d_ext_state struct:24> (non-fcsr)
2873 Following are the RISC-V D-extension registers:
2884 LoongArch registers are mapped using the lower 32 bits. The upper 16 bits of
2887 LoongArch csr registers are used to control guest cpu or get status of guest
2890 0x9030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2899 --------------------
2929 ----------------------
2935 :Returns: 0 on success, -1 on error
2937 This ioctl sets a flag accessible to the guest indicating that the specified
2942 shared between guest and host, specifically the second bit of the flags
2944 the host and read/cleared exclusively by the guest. The guest operation of
2946 load-link/store-conditional, or equivalent must be used. There are two cases
2947 where the guest will clear the flag: when the soft lockup watchdog timer resets
2953 -------------------
2959 :Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error
2961 Directly inject a MSI message. Only valid with in-kernel irqchip that handles
2976 KVM_MSI_VALID_DEVID: devid contains a valid value. The per-VM
2983 BDF identifier in the lower 16 bits.
2987 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
2992 --------------------
2998 :Returns: 0 on success, -1 on error
3000 Creates an in-kernel device model for the i8254 PIT. This call is only valid
3001 after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following
3013 PIT timer interrupts may use a per-VM kernel thread for injection. If it
3016 kvm-pit/<owner-process-pid>
3018 When running a guest with elevated priorities, the scheduling parameters of
3025 -----------------
3031 :Returns: 0 on success, -1 on error
3033 Retrieves the state of the in-kernel PIT model. Only valid after
3053 -----------------
3059 :Returns: 0 on success, -1 on error
3061 Sets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2.
3068 --------------------------
3074 :Returns: 0 on success, -1 on error
3079 device-tree properties for the guest operating system.
3093 - KVM_PPC_PAGE_SIZES_REAL:
3094 When that flag is set, guest page sizes must "fit" the backing
3098 - KVM_PPC_1T_SEGMENTS
3102 - KVM_PPC_NO_HASH
3123 page size. The bits are in positions such as the value can directly
3143 --------------
3149 :Returns: 0 on success, -1 on error
3151 Allows setting an eventfd to directly trigger a guest interrupt.
3155 the guest using the specified gsi pin. The irqfd is removed using
3159 With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify
3160 mechanism allowing emulation of level-triggered, irqfd-based
3165 as from an EOI, the gsi is de-asserted and the user is notified via
3166 kvm_irqfd.resamplefd. It is the user's responsibility to re-queue
3174 - in case no routing entry is associated to this gsi, injection fails
3175 - in case the gsi is associated to an irqchip routing entry,
3177 - in case the gsi is associated to an MSI routing entry, the MSI
3179 to GICv3 ITS in-kernel emulation).
3182 --------------------------
3188 :Returns: 0 on success, -1 on error
3191 guest using the PAPR paravirtualization interface. This only does
3200 The parameter is a pointer to a 32-bit unsigned integer variable
3207 default-sized hash table (16 MB).
3214 all HPTEs). In either case, if the guest is using the virtualized
3215 real-mode area (VRMA) facility, the kernel will re-create the VMRA
3219 -----------------------
3225 :Returns: 0 on success, -1 on error
3227 Allows to inject an interrupt to the guest. Interrupts can be floating
3241 - sigp stop; optional flags in parm
3243 - program check; code in parm
3245 - sigp set prefix; prefix address in parm
3247 - restart
3249 - clock comparator interrupt
3251 - CPU timer interrupt
3253 - virtio external interrupt; external interrupt
3256 - sclp external interrupt; sclp parameter in parm
3258 - sigp emergency; source cpu in parm
3260 - sigp external call; source cpu in parm
3262 - compound value to indicate an
3263 I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel);
3267 - machine check interrupt; cr 14 bits in parm, machine check interrupt
3274 ------------------------
3280 :Returns: file descriptor number (>= 0) on success, -1 on error
3283 entries in the guest's hashed page table (HPT), or to write entries to
3300 The 'start_index' field gives the index in the HPT of the entry at
3318 __u32 index;
3323 Writes to the fd create HPT entries starting at the index given in the
3329 ----------------------
3335 :Returns: 0 on success, -1 on error
3368 --------------------------------------------
3376 :Returns: 0 on success, -1 on error
3384 (e.g. read-only attribute, or attribute that only makes
3391 semantics are device-specific. See individual device documentation in
3399 __u32 group; /* device-defined */
3400 __u64 attr; /* group-defined */
3405 ------------------------
3412 :Returns: 0 on success, -1 on error
3429 ----------------------
3435 :Returns: 0 on success; -1 on error
3444 This tells KVM what type of CPU to present to the guest, and what
3450 - Processor state:
3451 * AArch64: EL1h, D, A, I and F bits set. All other bits
3453 * AArch32: SVC, A, I and F bits set. All other bits are
3455 - General Purpose registers, including PC and SP: set to 0
3456 - FPSIMD/NEON registers: set to 0
3457 - SVE registers: set to 0
3458 - System registers: Reset to their architecturally defined
3471 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
3473 and execute guest code when KVM_RUN is called.
3474 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
3476 - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision
3479 - KVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU.
3482 - KVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication
3490 - KVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication
3498 - KVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only).
3504 - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the
3505 initial value of this pseudo-register indicates the best set of
3510 - KVM_RUN and KVM_GET_REG_LIST are not available;
3512 - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access
3517 - KVM_REG_ARM64_SVE_VLS may optionally be written using
3523 - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can
3527 -----------------------------
3533 :Returns: 0 on success; -1 on error
3546 kvm_vcpu_init->features bitmap returned will have feature bits set if
3556 ---------------------
3562 :Returns: 0 on success; -1 on error
3567 E2BIG the reg index list is too big to fit in the array specified by
3578 This ioctl returns the guest registers that are supported for the
3584 - KVM_REG_S390_TODPR
3586 - KVM_REG_S390_EPOCHDIFF
3588 - KVM_REG_S390_CPU_TIMER
3590 - KVM_REG_S390_CLOCK_COMP
3592 - KVM_REG_S390_PFTOKEN
3594 - KVM_REG_S390_PFCOMPARE
3596 - KVM_REG_S390_PFSELECT
3598 - KVM_REG_S390_PP
3600 - KVM_REG_S390_GBEA
3604 -----------------------------------------
3610 :Returns: 0 on success, -1 on error
3618 E2BIG Address outside guest physical address space
3629 Specify a device address in the guest's physical address space where guests
3637 bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 |
3640 arm64 currently only require this when using the in-kernel GIC
3642 as the device id. When setting the base address for the guest's
3646 base addresses will return -EEXIST.
3653 ------------------------------
3659 :Returns: 0 on success, -1 on error
3664 of a service that has a kernel-side implementation. If the token
3665 value is non-zero, it will be associated with that service, and
3666 subsequent RTAS calls by the guest specifying that token will be
3669 calls by the guest for that service will be passed to userspace to be
3673 ------------------------
3679 :Returns: 0 on success; -1 on error
3690 handling guest debug events. There are two parts to the structure, the
3692 when running. Common control bits are:
3694 - KVM_GUESTDBG_ENABLE: guest debugging is enabled
3695 - KVM_GUESTDBG_SINGLESTEP: the next run should single-step
3697 The top 16 bits of the control field are architecture specific control
3700 - KVM_GUESTDBG_USE_SW_BP: using software breakpoints [x86, arm64]
3701 - KVM_GUESTDBG_USE_HW_BP: using hardware breakpoints [x86, s390]
3702 - KVM_GUESTDBG_USE_HW: using hardware debug events [arm64]
3703 - KVM_GUESTDBG_INJECT_DB: inject DB type exception [x86]
3704 - KVM_GUESTDBG_INJECT_BP: inject BP type exception [x86]
3705 - KVM_GUESTDBG_EXIT_PENDING: trigger an immediate guest exit [s390]
3706 - KVM_GUESTDBG_BLOCKIRQ: avoid injecting interrupts/NMI/SMI [x86]
3711 running off into the normal guest vector. For KVM_GUESTDBG_USE_HW_BP
3712 we need to ensure the guest vCPUs architecture specific registers are
3724 the single-step debug event (KVM_GUESTDBG_SINGLESTEP) is supported.
3727 supported KVM_GUESTDBG_* bits in the control field.
3734 ---------------------------
3740 :Returns: 0 on success, -1 on error
3760 __u32 index;
3775 the variable-size array 'entries'. If the number of entries is too low
3782 The entries returned are the set CPUID bits of the respective features
3784 or unsupported feature bits cleared.
3794 index:
3801 if the index field is valid
3806 this function/index combination
3809 --------------------
3816 < 0 on generic error (e.g. -EFAULT or -ENOMEM),
3826 __u64 gaddr; /* the guest address */
3854 their behavior can be set in the "flags" field. Undefined flag bits must
3869 Access logical memory, i.e. translate the given guest address to an absolute
3874 Logical accesses are permitted for non-protected guests only.
3892 translation-exception identifier (TEID) indicates suppression.
3915 Absolute accesses are permitted for non-protected guests only.
3927 Perform cmpxchg on absolute guest memory. Intended for use with the
3954 -----------------------
3960 :Returns: 0 on success, KVM_S390_GET_SKEYS_NONE if guest is not using storage
3963 This ioctl is used to get guest storage key values on the s390
3974 The start_gfn field is the number of the first guest frame whose storage keys
3980 will cause the ioctl to return -EINVAL.
3986 -----------------------
3994 This ioctl is used to set guest storage key values on the s390
3998 The start_gfn field is the number of the first guest frame whose storage keys
4004 will cause the ioctl to return -EINVAL.
4011 the ioctl will return -EINVAL.
4014 -----------------
4020 :Returns: 0 on success, -1 on error
4036 Allows to inject an interrupt to the guest.
4061 - KVM_S390_SIGP_STOP - sigp stop; parameter in .stop
4062 - KVM_S390_PROGRAM_INT - program check; parameters in .pgm
4063 - KVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefix
4064 - KVM_S390_RESTART - restart; no parameters
4065 - KVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parameters
4066 - KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parameters
4067 - KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emerg
4068 - KVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcall
4069 - KVM_S390_MCHK - machine check interrupt; parameters in .mchk
4074 ---------------------------
4081 -EINVAL if buffer size is 0,
4082 -ENOBUFS if buffer size is too small to fit all pending interrupts,
4083 -EFAULT if the buffer address was invalid
4101 the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and
4105 If -ENOBUFS is returned the buffer provided was too small and userspace
4109 ---------------------------
4116 -EFAULT if the buffer address was invalid,
4117 -EINVAL for an invalid buffer length (see below),
4118 -EBUSY if there were already interrupts pending,
4122 This ioctl allows userspace to set the complete state of all cpu-local
4138 for each interrupt to be injected into the guest.
4144 which is the maximum number of possibly pending cpu-local interrupts.
4147 ------------
4153 :Returns: 0 on success, -1 on error
4158 ----------------------------
4173 __u32 base; /* MSR index the bitmap starts at */
4205 If no filter range matches an MSR index that is getting accessed, KVM will
4210 If no filter range matches an MSR index that is getting accessed, KVM will
4214 guest MSR accesses that would normally be allowed by KVM. If an MSR is not
4222 KVM_MSR_EXIT_REASON_FILTER is not enabled, KVM will inject a #GP into the guest
4247 part of VM-Enter/VM-Exit emulation.
4250 of VM-Enter/VM-Exit emulation. If an MSR access is denied on VM-Enter, KVM
4251 synthesizes a consistency check VM-Exit(EXIT_REASON_MSR_LOAD_FAIL). If an
4252 MSR access is denied on VM-Exit, KVM synthesizes a VM-Abort. In short, KVM
4254 the VM-Enter/VM-Exit MSR list. It is platform owner's responsibility to
4271 ----------------------------
4304 -------------------------
4311 -EFAULT if struct kvm_reinject_control cannot be read,
4312 -ENXIO if KVM_CREATE_PIT or KVM_CREATE_PIT2 didn't succeed earlier.
4331 ------------------------------
4338 -EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read,
4339 -EINVAL if the configuration is invalid
4341 This ioctl controls whether the guest will use radix or HPT (hashed
4343 the guest.
4352 There are two bits that can be set in flags; KVM_PPC_MMUV3_RADIX and
4353 KVM_PPC_MMUV3_GTSE. KVM_PPC_MMUV3_RADIX, if set, configures the guest
4355 KVM_PPC_MMUV3_GTSE, if set and if KVM permits it, configures the guest
4357 if clear, the guest may not use these instructions.
4359 The process_table field specifies the address and size of the guest
4360 process table, which is in the guest's space. This field is formatted
4365 ---------------------------
4372 -EFAULT if struct kvm_ppc_rmmu_info cannot be written,
4373 -EINVAL if no useful information can be returned
4393 size, and the number of bits indexed at each level of the tree, from
4398 encodings, encoded with the AP value in the top 3 bits and the log
4399 base 2 of the page size in the bottom 6 bits.
4402 --------------------------------
4411 -EFAULT if struct kvm_reinject_control cannot be read,
4412 -EINVAL if the supplied shift or flags are invalid,
4413 -ENOMEM if unable to allocate the new HPT,
4415 Used to implement the PAPR extension for runtime resizing of a guest's
4417 the preparation of a new potential HPT for the guest, essentially
4428 If called with shift > 0 when there is no pending HPT for the guest,
4446 returns 0 (i.e. cancels any in-progress preparation).
4448 flags is reserved for future expansion, currently setting any bits in
4449 flags will result in an -EINVAL.
4456 -------------------------------
4463 -EFAULT if struct kvm_reinject_control cannot be read,
4464 -EINVAL if the supplied shift or flags are invalid,
4465 -ENXIO is there is no pending HPT, or the pending HPT doesn't
4467 -EBUSY if the pending HPT is not fully prepared,
4468 -ENOSPC if there was a hash collision when moving existing
4470 -EIO on other error conditions
4472 Used to implement the PAPR extension for runtime resizing of a guest's
4473 Hashed Page Table (HPT). Specifically this requests that the guest be
4487 KVM_PPC_RESIZE_HPT_COMMIT will return an error (usually -ENXIO or
4488 -EBUSY, though others may be possible if the preparation was started,
4491 This will have undefined effects on the guest if it has not already
4495 On successful completion, the pending HPT will become the guest's active
4498 On failure, the guest will still be operating on its previous HPT.
4501 -----------------------------------
4507 :Returns: 0 on success, -1 on error
4511 capabilities will have the corresponding bits set.
4514 -----------------------
4521 -EFAULT if u64 mcg_cap cannot be read,
4522 -EINVAL if the requested number of banks is invalid,
4523 -EINVAL if requested MCE capability is not supported.
4528 supported number of error-reporting banks can be retrieved when
4533 ---------------------
4540 -EFAULT if struct kvm_x86_mce cannot be read,
4541 -EINVAL if the bank number is invalid,
4542 -EINVAL if VAL bit is not set in status field.
4544 Inject a machine check error (MCE) into the guest. The input
4558 inject it as an MCE exception into the guest. If the guest
4567 ----------------------------
4587 This ioctl is used to get the values of the CMMA bits on the s390
4590 - During live migration to save the CMMA values. Live migration needs
4592 - To non-destructively peek at the CMMA values, with the flag
4615 start_gfn is the number of the first guest frame whose CMMA values are
4623 KVM_S390_SKEYS_MAX. KVM_S390_SKEYS_MAX is re-used for consistency with
4633 start_gfn will indicate the first page frame whose CMMA bits were dirty.
4668 ----------------------------
4676 This ioctl is used to set the values of the CMMA bits on the s390
4695 start_gfn indicates the starting guest frame number,
4701 mask indicates which PGSTE bits are to be considered.
4707 This ioctl can fail with -ENOMEM if not enough memory can be allocated to
4708 complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if
4710 if the flags field was not 0, with -EFAULT if the userspace address is
4716 --------------------------
4723 -EFAULT if struct kvm_ppc_cpu_char cannot be written
4728 CVE-2017-5715, CVE-2017-5753 and CVE-2017-5754). The information is
4734 __u64 character_mask; /* valid bits in character */
4735 __u64 behaviour_mask; /* valid bits in behaviour */
4739 indicate which bits of character and behaviour have been filled in by
4740 the kernel. If the set of defined bits is extended in future then
4742 knows about the new bits.
4745 with preventing inadvertent information disclosure - specifically,
4746 whether there is an instruction to flash-invalidate the L1 data cache
4763 ---------------------------
4769 :Returns: 0 on success; -1 on error
4772 for issuing platform-specific memory encryption commands to manage those
4777 Documentation/virt/kvm/x86/amd-memory-encryption.rst.
4780 -----------------------------------
4786 :Returns: 0 on success; -1 on error
4788 This ioctl can be used to register a guest memory region which may
4789 contain encrypted data (e.g. guest RAM, SMRAM etc).
4791 It is used in the SEV-enabled guest. When encryption is enabled, a guest
4797 guest will require some additional steps.
4800 swap or migrate (move) ciphertext pages. Hence, for now we pin the guest
4804 -------------------------------------
4810 :Returns: 0 on success; -1 on error
4812 This ioctl can be used to unregister the guest memory region registered
4816 ------------------------
4823 This ioctl (un)registers an eventfd to receive notifications from the guest on
4824 the specified Hyper-V connection id through the SIGNAL_EVENT hypercall, without
4825 causing a user exit. SIGNAL_EVENT hypercall with non-zero event flag number
4826 (bits 24-31) still triggers a KVM_EXIT_HYPERV_HCALL user exit.
4837 The conn_id field should fit within 24 bits::
4846 -EINVAL if conn_id or flags is outside the allowed range,
4847 -ENOENT on deassign if the conn_id isn't registered,
4848 -EEXIST on assign if the conn_id is already registered
4851 --------------------------
4857 :Returns: 0 on success, -1 on error
4925 --------------------------
4931 :Returns: 0 on success, -1 on error
4937 -------------------------------------
4966 -------------------------
4972 :Returns: 0 on success, -1 on error
4990 memory slot, and num_pages is the size in bits of the input bitmap.
4994 in KVM's dirty bitmap, and dirty tracking is re-enabled for that page
4995 (for example via write-protection, or by clearing the dirty bit in
4998 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies
5008 --------------------------------
5014 :Returns: 0 on success, -1 on error
5026 __u32 index;
5035 This ioctl returns x86 cpuid features leaves related to Hyper-V emulation in
5037 cpuid information presented to guests consuming Hyper-V enlightenments (e.g.
5038 Windows or Hyper-V guests).
5040 CPUID feature leaves returned by this ioctl are defined by Hyper-V Top Level
5047 - HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS
5048 - HYPERV_CPUID_INTERFACE
5049 - HYPERV_CPUID_VERSION
5050 - HYPERV_CPUID_FEATURES
5051 - HYPERV_CPUID_ENLIGHTMENT_INFO
5052 - HYPERV_CPUID_IMPLEMENT_LIMITS
5053 - HYPERV_CPUID_NESTED_FEATURES
5054 - HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONS
5055 - HYPERV_CPUID_SYNDBG_INTERFACE
5056 - HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES
5059 with the 'nent' field indicating the number of entries in the variable-size
5060 array 'entries'. If the number of entries is too low to describe all Hyper-V
5062 to the number of Hyper-V feature leaves, the 'nent' field is adjusted to the
5065 'index' and 'flags' fields in 'struct kvm_cpuid_entry2' are currently reserved,
5069 system ioctl which exposes all supported feature bits unconditionally, vcpu
5072 - HYPERV_CPUID_NESTED_FEATURES leaf and HV_X64_ENLIGHTENED_VMCS_RECOMMENDED
5075 - HV_STIMER_DIRECT_MODE_AVAILABLE bit is only exposed with in-kernel LAPIC.
5079 ---------------------------
5084 :Returns: 0 on success, -1 on error
5110 that should be performed and how to do it are feature-dependent.
5114 -EPERM unless the feature has already been finalized by means of a
5121 ------------------------------
5127 :Returns: 0 on success, -1 on error
5149 This ioctl restricts the set of PMU events the guest can program by limiting
5165 When the guest attempts to program the PMU the guest's event select +
5167 guest should have access.
5179 Bits Description
5180 ---- -----------
5181 7:0 event select (low bits)
5184 35:32 event select (high bits)
5189 When the guest attempts to program the PMU, these steps are followed in
5190 determining if the guest should have access:
5192 1. Match the event select from the guest against the filter events.
5193 2. If a match is found, match the guest's unit mask to the mask and match
5196 3. If a match is found, match the guest's unit mask to the mask and match
5204 a. If the event is filtered and it's an allow list, allow the guest to
5206 b. If the event is filtered and it's a deny list, do not allow the guest to
5209 When setting a new pmu event filter, -EINVAL will be returned if any of the
5210 unused fields are set or if any of the high bits (35:32) in the event
5221 Specifically, KVM follows the following pseudo-code when determining whether to
5222 allow the guest FixCtr[i] to count its pre-defined fixed event::
5237 ---------------------
5248 EINVAL if ultravisor failed to terminate the secure guest
5249 ENOMEM if hypervisor failed to allocate new radix page tables for guest
5252 This ioctl is used to turn off the secure mode of the guest or transition
5253 the guest from secure mode to normal mode. This is invoked when the guest
5254 is reset. This has no effect if called for a normal guest.
5256 This ioctl issues an ultravisor call to terminate the secure guest,
5261 ---------------------------
5273 ----------------------------
5286 --------------------------
5300 -------------------------
5345 All registered VCPUs are converted back to non-protected ones. If a
5403 vcpus, PV guests and PV guest memory size.
5446 not succeed all other subcommands will fail with -EINVAL. This
5447 subcommand will return -EINVAL if a dump process has not yet been
5455 the 1MB block specified by the absolute guest address
5478 resume execution immediately as non-protected. There can be at most
5503 --------------------------
5549 Sets the ABI mode of the VM to 32-bit or 64-bit (long mode). This
5553 Sets the guest physical frame number at which the Xen shared_info
5560 the Xen CPU id which is used as the index into the vcpu_info[]
5565 a Xen guest, amongst other things. It is exempt from dirty tracking
5567 time an event channel interrupt is delivered to the guest! Thus,
5570 routed to the guest.
5580 in guest physical address space. This attribute should be used in
5583 re-mapped in guest physical address space.
5589 This is the HVM-wide vector injected directly by the hypervisor
5590 (not through the local APIC), typically configured by a guest via
5591 HVM_PARAM_CALLBACK_IRQ. This can be disabled again (e.g. for guest
5598 from the guest. A given sending port number may be directed back to
5599 a specified vCPU (by APIC ID) / port / priority on the guest, or to
5611 the 32-bit version code returned to the guest when it invokes the
5620 XEN_RUNSTATE_UPDATE flag which allows guest vCPUs to safely read
5626 --------------------------
5639 ---------------------------
5676 Sets the guest physical address of the vcpu_info for a given vCPU.
5690 an overlay on guest memory and remains at a fixed host address
5691 regardless of where it is mapped in guest physical address space
5693 avoided if the guest memory layout is modified.
5699 Sets the guest physical address of an additional pvclock structure
5700 for a given vCPU. This is typically used for guest vsyscall support.
5704 Sets the guest physical address of the vcpu_runstate_info for a given
5705 vCPU. This is how a Xen guest tracks CPU state such as steal time.
5724 other four times. The state field must be set to -1, or to a valid
5732 vCPU ID of the given vCPU, to allow timer-related VCPU operations to
5745 per-vCPU local APIC upcall vector, configured by a Xen guest with
5747 used by Windows guests, and is distinct from the HVM-wide upcall
5753 ---------------------------
5768 ---------------------------
5774 :Returns: number of bytes copied, < 0 on error (-EINVAL for incorrect
5775 arguments, -EFAULT if memory cannot be accessed).
5787 Copies Memory Tagging Extension (MTE) tags to/from guest tag memory. The
5789 ``length`` must not be bigger than 2^31 - PAGE_SIZE bytes. The ``addr``
5806 --------------------
5812 :Returns: 0 on success, -1 on error
5839 --------------------
5845 :Returns: 0 on success, -1 on error
5852 ----------------------
5871 +-------------+
5873 +-------------+
5875 +-------------+
5877 +-------------+
5879 +-------------+
5969 Bits 0-3 of ``flags`` encode the type:
5991 is [``hist_param``*(N-1), ``hist_param``*N), while the range of the last
5992 bucket is [``hist_param``*(``size``-1), +INF). (+INF means positive infinity
5997 [0, 1), while the range of the last bucket is [pow(2, ``size``-2), +INF).
5999 [pow(2, N-2), pow(2, N-1)).
6001 Bits 4-7 of ``flags`` encode the unit:
6024 Bits 8-11 of ``flags``, together with ``exponent``, encode the scale of the
6029 CPU clock cycles. For example, an exponent of -9 can be used with
6045 bucket in the unit expressed by bits 4-11 of ``flags`` together with ``exponent``.
6051 The Stats Data block contains an array of 64-bit values in the same order
6055 --------------------
6061 :Returns: 0 on success, -1 on error
6082 -----------------------------
6099 This ioctl injects an event channel interrupt directly to the guest vCPU.
6102 -----------------------------
6111 for vcpus. It re-uses the kvm_s390_pv_dmp struct and hence also shares
6127 ----------------------
6135 Used to manage hardware-assisted virtualization features for zPCI devices.
6147 __u64 ibv; /* Guest addr of interrupt bit vector */
6148 __u64 sb; /* Guest addr of summary bit */
6151 __u8 isc; /* Guest interrupt subclass */
6152 __u8 sbo; /* Offset of guest summary bit vector */
6174 --------------------------------
6182 This capability indicates that userspace is able to apply a single VM-wide
6183 offset to both the virtual and physical counters as viewed by the guest
6200 on previous values of the guest counters.
6203 (-EINVAL) being returned. This ioctl can also return -EBUSY if any vcpu
6214 ------------------------------------
6243 flag's bit index represents a possible value for the ``range`` field.
6253 op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, op2=={0-7}.
6262 ---------------------------------
6268 :Returns: 0 on success, -1 on error
6271 allows mapping guest_memfd memory into a guest. All fields shared with
6298 on-demand.
6300 When mapping a gfn into the guest, KVM selects shared vs. private, i.e consumes
6309 Returns -EINVAL if the VM has the KVM_VM_S390_UCONTROL flag set.
6310 Returns -EINVAL if called on a protected VM.
6313 -------------------------------
6322 of guest physical memory.
6341 guest private memory.
6349 ----------------------------
6376 underlying memory, e.g. effectively provides the translation of guest addresses
6392 ---------------------------
6424 KVM_PRE_FAULT_MEMORY populates KVM's stage-2 page tables used to map memory
6426 stage-2 read page fault, e.g. faults in memory as needed, but doesn't break
6427 CoW. However, KVM does not mark any newly created stage-2 PTE as Accessed.
6430 private guest memory before the guest is 'finalized'/measured, this ioctl
6432 guest into a 'finalized' state so that the above semantics can be reliably
6443 are indexed by virtual address or nested guest physical address.
6444 Calling this ioctl when the guest is using shadow page tables (for
6445 example because it is running a nested guest with nested page tables)
6470 interrupts into the guest. Useful in conjunction with KVM_INTERRUPT.
6476 This field is polled once when KVM_RUN starts; if non-zero, KVM_RUN
6477 exits immediately, returning -EINTR. In the common scenario where a
6481 a signal handler that sets run->immediate_exit to a non-zero value.
6507 The value of the current interrupt flag. Only valid if in-kernel
6514 More architecture-specific flags detailing state of the VCPU that may
6521 /* x86, set if the VCPU is executing a nested (L2) guest */
6532 The value of the cr8 register. Only valid if in-kernel local APIC is
6539 The value of the APIC BASE msr. Only valid if in-kernel local
6551 reasons. Further architecture-specific information is available in
6563 to unknown reasons. Further architecture-specific information is
6616 executed a memory-mapped I/O instruction which could not be satisfied
6628 operations are complete (and guest state is consistent) only after userspace
6629 has re-entered the kernel with KVM_RUN. The kernel side will first finish
6634 completed before performing a live migration. Userspace can re-enter the
6635 guest with an unmasked signal pending or with the immediate_exit field set
6652 requires a guest to interact with host userspace.
6657 ----------
6663 ``nr`` contains the function ID of the guest's SMCCC call. Userspace is
6668 - ``KVM_HYPERCALL_EXIT_SMC``: Indicates that the guest used the SMC
6669 conduit to initiate the SMCCC call. If this bit is 0 then the guest
6672 - ``KVM_HYPERCALL_EXIT_16BIT``: Indicates that the guest used a 16bit
6674 guest used a 32bit instruction. An AArch64 guest always has this
6741 Deprecated - was used for 440 KVM.
6751 hypercalls and exit with this exit struct that contains all the guest gprs.
6755 necessary. Upon guest entry all guest GPRs will then be replaced by the values
6767 This is used on 64-bit PowerPC when emulating a pSeries partition,
6769 guest does a hypercall using the 'sc 1' instruction. The 'nr' field
6770 contains the hypercall number (from the guest R3), and 'args' contains
6771 the arguments (from the guest R4 - R12). Userspace should put the
6813 external interrupt has just been delivered into the guest. User space
6832 a system-level event using some architecture specific mechanism (hypercall
6836 The 'type' field describes the system-level event type.
6839 - KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the
6843 - KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM.
6846 - KVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest
6850 - KVM_SYSTEM_EVENT_SEV_TERM -- an AMD SEV guest requested termination.
6851 The guest physical address of the guest's GHCB is stored in `data[0]`.
6852 - KVM_SYSTEM_EVENT_WAKEUP -- the exiting vCPU is in a suspended state and
6855 - KVM_SYSTEM_EVENT_SUSPEND -- the guest has requested a suspension of
6859 architecture specific information for the system-level event. Only
6862 - for arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if
6863 the guest issued a SYSTEM_RESET2 call according to v1.1 of the PSCI
6866 - for arm64, data[0] is set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2
6867 if the guest issued a SYSTEM_OFF2 call according to v1.3 of the PSCI
6870 - for RISC-V, data[0] is set to the value of the second argument of the
6878 --------------
6881 KVM_CAP_ARM_SYSTEM_SUSPEND VM capability. If a guest invokes the PSCI
6888 the call parameters are left in-place in the vCPU registers.
6893 - Honor the guest request to suspend the VM. Userspace can request
6894 in-kernel emulation of suspension by setting the calling vCPU's
6900 - Deny the guest request to suspend the VM. See ARM DEN0022D.b 5.19.2
6904 is enabled. If a guest invokes the PSCI SYSTEM_OFF2 function, KVM will
6916 Indicates that the VCPU's in-kernel local APIC received an EOI for a
6917 level-triggered IOAPIC interrupt. This exit only triggers when the
6959 related to Hyper-V emulation.
6963 - KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space about
6965 Hyper-V SynIC state change. Notification is used to remap SynIC
6969 - KVM_EXIT_HYPERV_SYNDBG -- synchronously notify user-space about
6971 Hyper-V Synthetic debugger state change. Notification is used to either update
6983 Used on arm64 systems. If a guest accesses memory not in a memslot,
6990 the VM. KVM assumed that if the guest accessed non-memslot memory, it was
6992 phrased accordingly. However, what happened more often was that a guest bug
6993 caused access outside the guest memory areas which should lead to a more
6994 meaningful warning message and an external abort in the guest, if the access
6999 instead return to userspace with KVM_EXIT_ARM_NISV, with the valid bits from
7002 decoding the instruction from guest memory (if it's very brave) and continue
7003 executing the guest, or it can decide to suspend, dump, or restart the guest.
7011 Instead, a data abort exception is directly injected in the guest.
7020 __u8 error; /* user -> kernel */
7022 __u32 reason; /* kernel -> user */
7023 __u32 index; /* kernel -> user */
7024 __u64 data; /* kernel <-> user */
7038 KVM_MSR_EXIT_REASON_INVAL access to invalid MSRs or reserved bits
7042 For KVM_EXIT_X86_RDMSR, the "index" field tells userspace which MSR the guest
7044 writes the respective data into the "data" field and must continue guest
7045 execution to ensure the read data is transferred into guest register state.
7048 the "error" field. This will inject a #GP into the guest when the VCPU is
7051 For KVM_EXIT_X86_WRMSR, the "index" field tells userspace which MSR the guest
7082 - KVM_EXIT_XEN_HCALL -- synchronously notify user-space about Xen hypercall.
7097 done a SBI call which is not handled by KVM RISC-V kernel module. The details
7103 values of SBI call before resuming the VCPU. For more details on RISC-V SBI
7104 spec refer, https://github.com/riscv/riscv-sbi-doc.
7118 guest physical address range [gpa, gpa + size) of the fault. The 'flags' field
7121 - KVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred
7126 accompanies a return code of '-1', not '0'! errno will always be set to EFAULT
7139 enabled, a VM exit generated if no event window occurs in VM non-root mode
7147 - KVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid
7161 * bits for kvm_valid_regs and kvm_dirty_regs
7171 certain guest registers without having to call SET/GET_*REGS. Thus we can
7174 kvm_valid_regs for specific bits. These bits are architecture specific
7202 whether this is a per-vcpu or per-vm capability.
7213 -------------------
7218 :Returns: 0 on success; -1 on error
7221 be treated as normal system calls to be injected into the guest. OSI hypercalls
7222 were invented by Mac-on-Linux to have a standardized communication mechanism
7223 between the guest and the host.
7229 --------------------
7234 :Returns: 0 on success; -1 on error
7239 It also sets the guest privilege level to "supervisor" mode. Usually the guest
7244 HTAB invisible to the guest.
7250 ------------------
7255 :Returns: 0 on success; -1 on error
7268 addresses of mmu-type-specific data structures. The "array_len" field is an
7278 the guest's TLB. If userspace makes any changes, it must call KVM_DIRTY_TLB
7284 - The "params" field is of type "struct kvm_book3e_206_tlb_params".
7285 - The "array" field points to an array of type "struct
7287 - The array consists of all entries in the first TLB, followed by all
7289 - Within a TLB, entries are ordered first by increasing set number. Within a
7291 - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1)
7293 - The tsize field of mas1 shall be set to 4K on TLB0, even though the
7297 ----------------------------
7302 :Returns: 0 on success; -1 on error
7307 handled in-kernel, while the other I/O instructions are passed to userspace.
7312 Note that even though this capability is enabled per-vcpu, the complete
7316 -------------------
7321 :Returns: 0 on success; -1 on error
7326 When enabled (args[0] != 0), every time the guest gets an external interrupt
7335 --------------------
7341 This capability connects the vcpu to an in-kernel MPIC device.
7344 --------------------
7351 This capability connects the vcpu to an in-kernel XICS device.
7354 ------------------------
7360 This capability enables the in-kernel irqchip for s390. Please refer to
7364 --------------------
7370 This capability allows the use of the host Floating Point Unit by the guest. It
7371 allows the Config1.FP bit to be set to enable the FPU in the guest. Once this is
7373 accessed (depending on the current guest FPU register mode), and the Status.FR,
7374 Config5.FRE bits are accessible via the KVM API and also from the guest,
7378 ---------------------
7384 This capability allows the use of the MIPS SIMD Architecture (MSA) by the guest.
7385 It allows the Config3.MSAP bit to be set to enable the use of MSA by the guest.
7388 KVM API and also from the guest.
7391 ----------------------
7396 :Returns: x86: KVM_CHECK_EXTENSION returns a bit-array indicating which register
7401 KVM_CAP_SYNC_REGS "allow[s] userspace to access certain guest registers
7404 particularly important when userspace is making synchronous guest state
7412 - the register sets to be copied out to kvm_run are selectable
7414 - vcpu_events are available in addition to regs and sregs.
7417 function as an input bit-array field set by userspace to indicate the
7437 -------------------------
7444 This capability connects the vcpu to an in-kernel XIVE device.
7471 ----------------------------
7475 args[1] is 0 to disable, 1 to enable in-kernel handling
7478 get handled by the kernel or not. Enabling or disabling in-kernel
7480 initial set of hcalls are enabled for in-kernel handling, which
7481 consists of those hcalls for which in-kernel handlers were implemented
7488 If the hcall number specified is not one that has an in-kernel
7493 --------------------------
7502 - SENSE
7503 - SENSE RUNNING
7504 - EXTERNAL CALL
7505 - EMERGENCY SIGNAL
7506 - CONDITIONAL EMERGENCY SIGNAL
7515 ---------------------------------
7523 return -EINVAL if the machine does not support vectors.
7526 --------------------------
7531 This capability allows post-handlers for the STSI instruction. After
7536 vcpu->run::
7547 @addr - guest address of STSI SYSIB
7548 @fc - function code
7549 @sel1 - selector 1
7550 @sel2 - selector 2
7551 @ar - access register number
7553 KVM handlers should exit to userspace with rc = -EREMOTE.
7556 -------------------------
7559 :Parameters: args[0] - number of routes reserved for userspace IOAPICs
7560 :Returns: 0 on success, -1 on error
7577 -------------------
7582 Allows use of runtime-instrumentation introduced with zEC12 processor.
7583 Will return -EINVAL if the machine does not support runtime-instrumentation.
7584 Will return -EBUSY if a VCPU has already been created.
7587 ----------------------
7590 :Parameters: args[0] - features that should be enabled
7591 :Returns: 0 on success, -EINVAL when args[0] contains invalid features
7600 allowing the use of 32-bit APIC IDs. See KVM_CAP_X2APIC_API in their
7607 where 0xff represents CPUs 0-7 in cluster 0.
7610 ----------------------------
7617 mechanism e.g. to realize 2-byte software breakpoints. The kernel will
7625 -------------------
7629 :Returns: 0 on success; -EINVAL if the machine does not support
7630 guarded storage; -EBUSY if a VCPU has already been created.
7632 Allows use of guarded storage for the KVM guest.
7635 ---------------------
7640 Allow use of adapter-interruption suppression.
7641 :Returns: 0 on success; -EBUSY if a VCPU has already been created.
7644 --------------------
7662 ----------------------
7667 With this capability a machine check exception in the guest address
7668 space will cause KVM to exit the guest with NMI exit reason. This
7669 enables QEMU to build error log and branch to guest kernel registered
7674 ------------------------------
7678 :Returns: 0 on success, -EINVAL when args[0] contains invalid exits
7681 Valid bits in args[0] are::
7691 physical CPUs. More bits can be added in the future; userspace can
7698 --------------------------
7702 :Returns: 0 on success, -EINVAL if hpage module parameter was not set
7710 hpage module parameter is not set to 1, -EINVAL is returned.
7716 ------------------------------
7721 With this capability, a guest may read the MSR_PLATFORM_INFO MSR. Otherwise,
7722 a #GP would be raised when the guest tries to access. Currently, this
7723 capability does not enable write permissions of this MSR for the guest.
7726 --------------------------
7730 :Returns: 0 on success, -EINVAL when the implementation doesn't support
7731 nested-HV virtualization.
7733 HV-KVM on POWER9 and later systems allows for "nested-HV"
7734 virtualization, which provides a way for a guest VM to run guests that
7735 can run using the CPU's supervisor mode (privileged non-hypervisor
7738 kvm-hv module parameter.
7741 ------------------------------
7747 emulated VM-exit when L1 intercepts a #PF exception that occurs in
7748 L2. Similarly, for kvm-intel only, DR6 will not be modified prior to
7749 the emulated VM-exit when L1 intercepts a #DB exception that occurs in
7752 faulting address (or the new DR6 bits*) will be reported in the
7755 exception.has_payload and to put the faulting address - or the new DR6
7756 bits\ [#]_ - in the exception_payload field.
7763 .. [#] For the new DR6 bits, note that bit 16 is set iff the #DB exception
7767 --------------------------------------
7778 automatically clear and write-protect all pages that are returned as dirty.
7784 KVM_CLEAR_DIRTY_LOG ioctl can operate on a 64-page granularity rather
7789 during this time, which is inefficient for both the guest and userspace:
7790 the guest will incur a higher penalty due to write protection faults,
7792 helps reducing this time, improving guest performance and reducing the
7795 With KVM_DIRTY_LOG_INITIALLY_SET set, all the bits of the dirty bitmap
7809 ------------------------------
7814 ultravisor firmware and thus can support a secure guest. On such a
7815 system, a guest can ask the ultravisor to make it a secure guest,
7818 notifies KVM when a guest requests to become a secure guest, and KVM
7822 will allow the transition to secure guest mode. Otherwise KVM will
7826 ----------------------
7831 :Returns: 0 on success; -1 on error
7834 maximum halt-polling time for all vCPUs in the target VM. This capability can
7836 maximum halt-polling time.
7838 See Documentation/virt/kvm/halt-polling.rst for more information on halt
7842 -------------------------------
7847 :Returns: 0 on success; -1 on error
7852 When a guest requests to read or write an MSR, KVM may not implement all MSRs
7858 args[0] and would trigger a #GP inside the guest will instead trigger
7874 -------------------------------
7878 :Parameters: args[0] defines the policy used when bus locks detected in guest
7879 :Returns: 0 on success, -EINVAL when args[0] contains invalid bits
7881 Valid bits in args[0] are::
7887 policy to handle the bus locks detected in guest. Userspace can obtain the
7889 the KVM_ENABLE_CAP. The supported modes are mutually-exclusive.
7892 guest, irrespective whether or not the host has enabled split-lock detection
7894 intended to mitigate attacks where a malicious/buggy guest can exploit bus
7897 If KVM_BUS_LOCK_DETECTION_OFF is set, KVM doesn't force guest bus locks to VM
7898 exit, although the host kernel's split-lock #AC detection still applies, if
7902 bus locks in the guest trigger a VM exit, and KVM exits to userspace for all
7903 such VM exits, e.g. to allow userspace to throttle the offending guest and/or
7904 apply some other policy-based mitigation. When exiting to userspace, KVM sets
7905 KVM_RUN_X86_BUS_LOCK in vcpu-run->flags, and conditionally sets the exit_reason
7913 ----------------------
7917 :Returns: 0 on success, -EINVAL when CPU doesn't support 2nd DAWR
7924 -------------------------------------
7934 This is intended to support in-guest workloads scheduled by the host. This
7935 allows the in-guest workload to maintain its own NPTs and keeps the two vms
7940 --------------------------
7945 :Returns: 0 on success, -EINVAL if the file handle is invalid or if a requested
7963 -------------------------------
7972 In order to enable the use of H_RPT_INVALIDATE in the guest,
7973 user space might have to advertise it for the guest. For example,
7974 IBM pSeries (sPAPR) guest starts using it if "hcall-rpt-invalidate" is
7975 present in the "ibm,hypertas-functions" device-tree property.
7981 --------------------------------------
7999 --------------------
8005 Memory Tagging Extensions (MTE) to the guest. It must also be enabled by the
8006 VMM before creating any VCPUs to allow the guest access. Note that MTE is only
8007 available to a guest running in AArch64 mode and enabling this capability will
8010 When enabled the guest is able to access tags associated with any memory given
8011 to the guest. KVM will ensure that the tags are maintained during swap or
8016 ``MAP_ANONYMOUS`` or with a RAM-based file mapping (``tmpfs``, ``memfd``),
8018 -EINVAL return.
8021 perform a bulk copy of tags to/from the guest.
8024 -------------------------------------
8034 This is intended to support intra-host migration of VMs between userspace VMMs,
8035 upgrading the VMM process without interrupting the guest.
8038 -------------------------------
8048 This capability allows a guest kernel to use a better-performance mode for
8052 ----------------------------
8055 :Parameters: args[0] - set of KVM quirks to disable
8069 The valid bits in cap.args[0] are:
8078 AMD CPUs to workaround buggy guest firmware
8091 KVM_X86_QUIRK_OUT_7E_INC_RIP By default, KVM pre-increments %rip before
8094 KVM does not pre-increment %rip before
8104 KVM_X86_QUIRK_FIX_HYPERCALL_INSN By default, KVM rewrites guest
8108 will no longer rewrite invalid guest
8111 generate a #UD within the guest.
8116 according to guest CPUID. When this quirk
8120 they're unsupported per guest CPUID. Note,
8122 guest CPUID on writes to MISC_ENABLE if
8144 AMD). Lastly, when guest CPUID is set (by
8146 fields to force consistency between guest
8156 guest CPUID, for safety purposes).
8160 ------------------------
8164 :Parameters: args[0] - maximum APIC ID value set for current VM
8165 :Returns: 0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS
8181 ------------------------------
8186 :Returns: 0 on success, -EINVAL if args[0] contains invalid flags or notify
8189 Bits 63:32 of args[0] are used for notify window.
8190 Bits 31:0 of args[0] are for some flags. Valid bits are::
8196 in per-VM scope during VM creation. Notify VM exit is disabled by default.
8199 a VM exit if no event window occurs in VM non-root mode for a specified of
8210 ------------------------------
8213 :Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
8216 kvm_run.memory_fault if KVM cannot resolve a guest page fault VM-Exit, e.g. if
8231 -----------------------------------
8236 :Returns: 0 on success, -EINVAL if args[0] contains an invalid value for the
8237 frequency or if any vCPUs have been created, -ENXIO if a virtual
8240 This capability sets the VM's APIC bus clock frequency, used by KVM's in-kernel
8245 core crystal clock frequency, if a non-zero CPUID 0x15 is exposed to the guest.
8248 ------------------------------
8251 :Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
8255 vCPU was executing nested guest code when it exited.
8257 KVM exits with the register state of either the L1 or L2 guest
8268 ---------------------
8274 H_RANDOM hypercall backed by a hardware random-number generator.
8275 If present, the kernel H_RANDOM handler can be enabled for guest use
8279 ------------------------
8285 Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is
8286 used to support Windows Hyper-V based guest paravirt drivers(VMBus).
8291 by the CPU, as it's incompatible with SynIC auto-EOI behavior.
8294 -------------------------
8304 ---------------------------
8311 the POWER9 processor), including in-memory segment tables.
8314 -------------------
8335 0 The trap & emulate implementation is in use to run guest code in user
8336 mode. Guest virtual memory segments are rearranged to fit the guest in the
8340 virtualization, including standard guest virtual memory segments.
8344 -------------------
8350 run guest code in user mode, even if KVM_CAP_MIPS_VZ indicates that hardware
8358 ----------------------
8362 This capability indicates the supported architecture type of the guest, i.e. the
8372 Both registers and addresses are 32-bits wide.
8373 It will only be possible to run 32-bit guest code.
8375 1 MIPS64 or microMIPS64 with access only to 32-bit compatibility segments.
8376 Registers are 64-bits wide, but addresses are 32-bits wide.
8377 64-bit guest code may run but cannot access MIPS64 memory segments.
8378 It will also be possible to run 32-bit guest code.
8381 Both registers and addresses are 64-bits wide.
8382 It will be possible to run 64-bit or 32-bit guest code.
8386 ------------------------
8391 that if userspace creates a VM without an in-kernel interrupt controller, it
8392 will be notified of changes to the output level of in-kernel emulated devices,
8395 updates the vcpu's run->s.regs.device_irq_level field to represent the actual
8401 userspace can always sample the device output level and re-compute the state of
8403 of run->s.regs.device_irq_level on every kvm exit.
8404 The value in run->s.regs.device_irq_level can represent both level and edge
8406 signals will exit to userspace with the bit in run->s.regs.device_irq_level
8409 The field run->s.regs.device_irq_level is available independent of
8410 run->kvm_valid_regs or run->kvm_dirty_regs bits.
8414 and thereby which bits in run->s.regs.device_irq_level can signal values.
8416 Currently the following bits are defined for the device_irq_level bitmap::
8420 KVM_ARM_DEV_EL1_VTIMER - EL1 virtual timer
8421 KVM_ARM_DEV_EL1_PTIMER - EL1 physical timer
8422 KVM_ARM_DEV_PMU - ARM PMU overflow interrupt signal
8429 -----------------------------
8439 --------------------------
8443 This capability enables a newer version of Hyper-V Synthetic interrupt
8449 ----------------------------
8455 compatibility, KVM initializes this msr to KVM's internal vcpu index. When this
8459 -------------------------------
8469 ---------------------
8476 ----------------------
8480 This capability indicates that the user space memory used as guest mapping can
8485 ---------------------
8489 This capability indicates that the user space memory used as guest mapping can
8490 use copy-on-write semantics as well as dirty pages tracking via read-only page
8494 ---------------------
8500 facility 82 should not be provided to the guest without this capability.
8503 ----------------------------
8507 This capability indicates that KVM supports paravirtualized Hyper-V TLB Flush
8513 ----------------------------------
8518 KVM_SET_VCPU_EVENTS ioctl) the syndrome value reported to the guest when it
8528 ----------------------------
8532 This capability indicates that KVM supports paravirtualized Hyper-V IPI send
8537 -----------------------------------
8541 This capability indicates that KVM running on top of Hyper-V hypervisor
8543 hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM.
8544 Due to the different ABI for hypercall parameters between Hyper-V and
8547 flush hypercalls by Hyper-V) so userspace should disable KVM identification
8548 in CPUID and only exposes Hyper-V identification. In this case, guest
8549 thinks it's running on Hyper-V and only use Hyper-V hypercalls.
8552 -----------------------------
8560 ---------------------------
8571 -----------------------
8577 architecture-specific interfaces. This capability and the architecture-
8584 -------------------------
8588 This capability enables a guest to set information about its control program
8589 (i.e. guest kernel type and version). The information is helpful during
8590 system/firmware service events, providing additional data about the guest
8594 an 8-byte value consisting of a one-byte Control Program Name Code (CPNC) and
8595 a 7-byte Control Program Version Code (CPVC). The CPNC determines what
8604 -------------------------------
8610 accesses that would usually trigger a #GP by KVM into the guest will
8615 ---------------------------
8629 -------------------------------------
8634 guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf
8635 (0x40000001). Otherwise, a guest may use the paravirtual features
8641 ----------------------------------------------------------
8644 :Parameters: args[0] - size of the dirty log ring
8666 ioctl to enable this capability for the new guest and set the size of
8679 An entry in the ring buffer can be unused (flag bits ``00``),
8680 dirty (flag bits ``01``) or harvested (flag bits ``1X``). The
8684 00 -----------> 01 -------------> 1X -------+
8687 +------------------------------------------+
8701 using load-acquire/store-release accessors when available, or any
8729 Architecture with TSO-like ordering (such as x86) are allowed to
8735 ring structures can be backed by per-slot bitmaps. With this capability
8736 advertised, it means the architecture can dirty guest pages without
8745 context. Otherwise, the stand-alone per-slot bitmap mechanism needs to
8748 To collect dirty bits in the backup bitmap, userspace can use the same
8750 the generation of the dirty bits is done in a single pass. Collecting
8758 KVM device "kvm-arm-vgic-its". (2) restore vgic/its tables through
8760 "kvm-arm-vgic-its". VGICv3 LPI pending status is restored. (3) save
8762 command on KVM device "kvm-arm-vgic-v3".
8765 --------------------
8782 ioctl is available, for the guest to set its hypercall page.
8787 and also enable interception of guest hypercalls with KVM_EXIT_XEN.
8795 The KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related
8804 injecting event channel events directly into the guest with the
8814 XEN_RUNSTATE_UPDATE flag in guest memory mapped vcpu_runstate_info during
8817 always set the XEN_RUNSTATE_UPDATE flag when updating the guest structure,
8820 specifically enabled (by the guest making the hypercall, causing the VMM
8829 -------------------------
8842 In order to enable H_PUT_TCE_INDIRECT and H_STUFF_TCE use in the guest,
8843 user space might have to advertise it for the guest. For example,
8844 IBM pSeries (sPAPR) guest starts using them if "hcall-multi-tce" is
8845 present in the "ibm,hypertas-functions" device-tree property.
8855 --------------------
8861 available to the guest on migration.
8864 ---------------------------------
8868 When enabled, KVM will disable emulated Hyper-V features provided to the
8869 guest according to the bits Hyper-V CPUID feature leaves. Otherwise, all
8870 currently implemented Hyper-V features are provided unconditionally when
8871 Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001)
8875 ---------------------------
8894 ---------------------------
8900 :Returns: 0 on success, -EINVAL when arg[0] contains invalid bits
8916 -------------------------------
8923 type KVM_SYSTEM_EVENT_SUSPEND to process the guest suspend request.
8926 --------------------------------
8939 -------------------------------------
8945 :Returns: 0 on success, -EPERM if the userspace process does not
8946 have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been
8956 ------------------------------
8969 to the guest without this capability.
8977 When getting the Modified Change Topology Report value, the attr->addr
8981 ---------------------------------------
8987 :Returns: 0 on success, -EINVAL if any memslot was already created.
8991 Eager Page Splitting improves the performance of dirty-logging (used
8992 in live migrations) when guest memory is backed by huge-pages. It
8993 avoids splitting huge-pages (into PAGE_SIZE pages) on fault, by doing
9004 64-bit bitmap (each bit describing a block size). The default value is
9008 ---------------------
9014 This capability returns a bitmap of support VM types. The 1-setting of bit @n
9024 production. The behavior and effective ABI for software-protected VMs is
9038 --------
9052 ``KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)`` are used to enable in-kernel emulation of
9059 has enabled in-kernel emulation of the local APIC.
9069 If userspace wishes to set up a guest topology, it should be careful that
9072 for 0x8000001e; the latter also encodes the core id and node id in bits