Lines Matching +full:no +full:- +full:ref +full:- +full:high +full:- +full:z
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
55 be checked with :ref:`KVM_CHECK_EXTENSION <KVM_CHECK_EXTENSION>`. Some
57 functionality is desired (see :ref:`cap_enable` and :ref:`cap_enable_vm`).
90 As of Linux 2.6.22, the KVM ABI has been stabilized: no backward
92 facility that allows backward-compatible extensions to the API to be
111 API version 12 (see :ref:`KVM_GET_API_VERSION <KVM_GET_API_VERSION>`),
113 :ref:`KVM_CHECK_EXTENSION <KVM_CHECK_EXTENSION>`.
133 -----------------------
150 -----------------
158 The new VM has no virtual cpus and no memory.
189 address used by the VM. The IPA_Bits is encoded in bits[7-0] of the
207 ioctl() at run-time.
219 ----------------------------------------------------------
225 :Returns: 0 on success; -1 on error
263 -----------------------
274 Generally 0 means no and 1 means yes, but some extensions may report
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
304 KVM_CAP_DIRTY_LOG_RING, see :ref:`KVM_CAP_DIRTY_LOG_RING`.
308 -------------------
314 :Returns: vcpu fd on success, -1 on error
316 This API adds a vcpu to a virtual machine. No more than max_vcpus may be added.
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.
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
393 ------------
399 :Returns: 0 on success, -1 on error
407 ENOSYS data abort outside memslots with no syndrome info and
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.
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
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
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
723 - Using heterogeneous CPUID configurations, modulo APIC IDs, topology, etc...
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
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
1000 page of a blob (32- or 64-bit, depending on the vcpu mode) to guest
1032 No other flags are currently valid in the struct kvm_xen_hvm_config.
1035 ------------------
1041 :Returns: 0 on success, -1 on error
1085 ------------------
1091 :Returns: 0 on success, -1 on error
1120 ------------------------
1127 :Returns: 0 on success, -1 on error
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
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
1207 should be read first, to ensure no existing SError is pending. If an existing
1215 always have a non-zero value when read, and the agent making an SError pending
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
1263 suppress overwriting the current in-kernel state. The bits are:
1268 KVM_VCPUEVENT_VALID_SMM transfer the smi sub-struct.
1296 information or because there is no device mapped at the accessed IPA, then
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
1370 memory slot. Bits 0-15 of "slot" specify the slot id and this value
1375 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot"
1402 to make a new slot read-only. In this case, writes to this memory will be
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
1422 Returns -EINVAL 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
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
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
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
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
1789 Dynamically-enabled feature bits need to be requested with
1799 with the 'nent' field indicating the number of entries in the variable-size
1801 capabilities, an error (E2BIG) is returned. If the number is too high,
1839 -----------------------
1869 ------------------------
1875 :Returns: 0 on success, -1 on error
1881 - GSI routing does not apply to KVM_IRQ_LINE but only to KVM_IRQFD.
1891 No flags are specified so far, the corresponding field must be set to zero.
1918 error -EINVAL.
1922 - KVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry
1923 type, specifies that the devid field contains a valid value. The per-VM
1927 - zero otherwise
1952 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
1986 --------------------
1992 :Returns: 0 on success, -1 on error
2002 --------------------
2008 :Returns: virtual tsc-khz on success, negative value on error
2011 KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
2016 ------------------
2022 :Returns: 0 on success, -1 on error
2037 the APIC_ID register (bytes 32-35). xAPIC only allows an 8-bit APIC ID
2038 which is stored in bits 31-24 of the APIC register, or equivalently in
2047 ------------------
2053 :Returns: 0 on success, -1 on error
2065 The format of the APIC ID register (bytes 32-35 of struct kvm_lapic_state's
2071 ------------------
2094 For the special case of virtio-ccw devices on s390, the ioevent is matched
2108 For virtio-ccw devices, addr contains the subchannel id and datamatch the
2117 ------------------
2123 :Returns: 0 on success, -1 on error
2143 The array is little-endian: the bit 0 is the least significant bit of the
2153 -------------------------
2162 is an IOMMU for PAPR-style virtual I/O. It is used to translate
2176 which this TCE table will translate - the table will contain one 64
2186 the entries written by kernel-handled H_PUT_TCE calls, and also lets
2192 ------------
2198 :Returns: 0 on success, -1 on error
2208 - pause the vcpu
2209 - read the local APIC's state (KVM_GET_LAPIC)
2210 - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1)
2211 - if so, issue KVM_NMI
2212 - resume the vcpu
2219 ----------------------
2241 ------------------------
2263 ------------------------
2281 --------------------
2292 ENOENT no such register
2293 EINVAL invalid register ID, or no such register or used with VMs in
2524 ARM 32-bit CP15 registers have the following id bit patterns::
2528 ARM 64-bit CP15 registers have the following id bit patterns::
2536 ARM 32-bit VFP control registers have the following id bit patterns::
2540 ARM 64-bit FP registers have the following id bit patterns::
2544 ARM firmware pseudo-registers have the following bit pattern::
2552 arm64 core/FP-SIMD registers have the following id bit patterns. Note
2586 .. [1] These encodings are not accepted for SVE-enabled vcpus. See
2587 :ref:`KVM_ARM_VCPU_INIT`.
2611 arm64 firmware pseudo-registers have the following bit pattern::
2620 0x6060 0000 0015 ffff KVM_REG_ARM64_SVE_VLS pseudo-register
2623 ENOENT. max_vq is the vcpu's maximum supported vector length in 128-bit
2634 KVM_REG_ARM64_SVE_VLS is a pseudo-register that allows the set of vector
2644 ((vector_lengths[(vq - KVM_ARM64_SVE_VQ_MIN) / 64] >>
2645 ((vq - KVM_ARM64_SVE_VQ_MIN) % 64)) & 1))
2667 is hardware-dependent and may not be available. Attempting to configure
2674 arm64 bitmap feature firmware pseudo-registers have the following bit pattern::
2688 a -EBUSY to userspace.
2701 patterns depending on whether they're 32-bit or 64-bit registers::
2703 0x7020 0000 0001 00 <reg:5> <sel:3> (32-bit)
2704 0x7030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2729 0x7020 0000 0003 00 <0:3> <reg:5> (32-bit FPU registers)
2730 0x7030 0000 0003 00 <0:3> <reg:5> (64-bit FPU registers)
2731 0x7040 0000 0003 00 <0:3> <reg:5> (128-bit MSA vector registers)
2743 RISC-V registers are mapped using the lower 32 bits. The upper 8 bits of
2746 RISC-V config registers are meant for configuring a Guest VCPU and it has
2752 Following are the RISC-V config registers:
2764 RISC-V core registers represent the general execution state of a Guest VCPU
2770 Following are the RISC-V core registers:
2807 0x80x0 0000 0200 0020 mode Privilege mode (1 = S-mode or 0 = U-mode)
2810 RISC-V csr registers represent the supervisor mode control/status registers
2816 Following are the RISC-V csr registers:
2832 RISC-V timer registers represent the timer state of a Guest VCPU and it has
2837 Following are the RISC-V timer registers:
2842 0x8030 0000 0400 0000 frequency Time base frequency (read-only)
2848 RISC-V F-extension registers represent the single precision floating point
2853 Following are the RISC-V F-extension registers:
2864 RISC-V D-extension registers represent the double precision floating point
2868 0x8030 0000 06 <index into the __riscv_d_ext_state struct:24> (non-fcsr)
2870 Following are the RISC-V D-extension registers:
2887 0x9030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2896 --------------------
2907 ENOENT no such register
2908 EINVAL invalid register ID, or no such register or used with VMs in
2926 ----------------------
2932 :Returns: 0 on success, -1 on error
2943 load-link/store-conditional, or equivalent must be used. There are two cases
2950 -------------------
2956 :Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error
2958 Directly inject a MSI message. Only valid with in-kernel irqchip that handles
2973 KVM_MSI_VALID_DEVID: devid contains a valid value. The per-VM
2984 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
2989 --------------------
2995 :Returns: 0 on success, -1 on error
2997 Creates an in-kernel device model for the i8254 PIT. This call is only valid
2998 after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following
3010 PIT timer interrupts may use a per-VM kernel thread for injection. If it
3013 kvm-pit/<owner-process-pid>
3022 -----------------
3028 :Returns: 0 on success, -1 on error
3030 Retrieves the state of the in-kernel PIT model. Only valid after
3050 -----------------
3056 :Returns: 0 on success, -1 on error
3058 Sets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2.
3065 --------------------------
3071 :Returns: 0 on success, -1 on error
3076 device-tree properties for the guest operating system.
3090 - KVM_PPC_PAGE_SIZES_REAL:
3095 - KVM_PPC_1T_SEGMENTS
3099 - KVM_PPC_NO_HASH
3140 --------------
3146 :Returns: 0 on success, -1 on error
3156 With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify
3157 mechanism allowing emulation of level-triggered, irqfd-based
3162 as from an EOI, the gsi is de-asserted and the user is notified via
3163 kvm_irqfd.resamplefd. It is the user's responsibility to re-queue
3171 - in case no routing entry is associated to this gsi, injection fails
3172 - in case the gsi is associated to an irqchip routing entry,
3174 - in case the gsi is associated to an MSI routing entry, the MSI
3176 to GICv3 ITS in-kernel emulation).
3179 --------------------------
3185 :Returns: 0 on success, -1 on error
3194 There must be no vcpus running when this ioctl is called; if there
3197 The parameter is a pointer to a 32-bit unsigned integer variable
3202 If no hash table has been allocated when any vcpu is asked to run
3204 default-sized hash table (16 MB).
3212 real-mode area (VRMA) facility, the kernel will re-create the VMRA
3216 -----------------------
3222 :Returns: 0 on success, -1 on error
3238 - sigp stop; optional flags in parm
3240 - program check; code in parm
3242 - sigp set prefix; prefix address in parm
3244 - restart
3246 - clock comparator interrupt
3248 - CPU timer interrupt
3250 - virtio external interrupt; external interrupt
3253 - sclp external interrupt; sclp parameter in parm
3255 - sigp emergency; source cpu in parm
3257 - sigp external call; source cpu in parm
3259 - compound value to indicate an
3260 I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel);
3264 - machine check interrupt; cr 14 bits in parm, machine check interrupt
3271 ------------------------
3277 :Returns: file descriptor number (>= 0) on success, -1 on error
3326 ----------------------
3332 :Returns: 0 on success, -1 on error
3365 --------------------------------------------
3369 KVM_CAP_SYS_ATTRIBUTES for system (/dev/kvm) device (no set)
3373 :Returns: 0 on success, -1 on error
3381 (e.g. read-only attribute, or attribute that only makes
3388 semantics are device-specific. See individual device documentation in
3395 __u32 flags; /* no flags currently defined */
3396 __u32 group; /* device-defined */
3397 __u64 attr; /* group-defined */
3402 ------------------------
3409 :Returns: 0 on success, -1 on error
3426 ----------------------
3432 :Returns: 0 on success; -1 on error
3447 - Processor state:
3452 - General Purpose registers, including PC and SP: set to 0
3453 - FPSIMD/NEON registers: set to 0
3454 - SVE registers: set to 0
3455 - System registers: Reset to their architecturally defined
3468 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
3471 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
3473 - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision
3476 - KVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU.
3479 - KVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication
3487 - KVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication
3495 - KVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only).
3501 - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the
3502 initial value of this pseudo-register indicates the best set of
3507 - KVM_RUN and KVM_GET_REG_LIST are not available;
3509 - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access
3514 - KVM_REG_ARM64_SVE_VLS may optionally be written using
3520 - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can
3521 no longer be written using KVM_SET_ONE_REG.
3524 -----------------------------
3530 :Returns: 0 on success; -1 on error
3535 ENODEV no preferred target available for the host
3543 kvm_vcpu_init->features bitmap returned will have feature bits set if
3553 ---------------------
3559 :Returns: 0 on success; -1 on error
3581 - KVM_REG_S390_TODPR
3583 - KVM_REG_S390_EPOCHDIFF
3585 - KVM_REG_S390_CPU_TIMER
3587 - KVM_REG_S390_CLOCK_COMP
3589 - KVM_REG_S390_PFTOKEN
3591 - KVM_REG_S390_PFCOMPARE
3593 - KVM_REG_S390_PFSELECT
3595 - KVM_REG_S390_PP
3597 - KVM_REG_S390_GBEA
3601 -----------------------------------------
3607 :Returns: 0 on success, -1 on error
3637 arm64 currently only require this when using the in-kernel GIC
3643 base addresses will return -EEXIST.
3650 ------------------------------
3656 :Returns: 0 on success, -1 on error
3661 of a service that has a kernel-side implementation. If the token
3662 value is non-zero, it will be associated with that service, and
3670 ------------------------
3676 :Returns: 0 on success; -1 on error
3691 - KVM_GUESTDBG_ENABLE: guest debugging is enabled
3692 - KVM_GUESTDBG_SINGLESTEP: the next run should single-step
3697 - KVM_GUESTDBG_USE_SW_BP: using software breakpoints [x86, arm64]
3698 - KVM_GUESTDBG_USE_HW_BP: using hardware breakpoints [x86, s390]
3699 - KVM_GUESTDBG_USE_HW: using hardware debug events [arm64]
3700 - KVM_GUESTDBG_INJECT_DB: inject DB type exception [x86]
3701 - KVM_GUESTDBG_INJECT_BP: inject BP type exception [x86]
3702 - KVM_GUESTDBG_EXIT_PENDING: trigger an immediate guest exit [s390]
3703 - KVM_GUESTDBG_BLOCKIRQ: avoid injecting interrupts/NMI/SMI [x86]
3721 the single-step debug event (KVM_GUESTDBG_SINGLESTEP) is supported.
3731 ---------------------------
3737 :Returns: 0 on success, -1 on error
3772 the variable-size array 'entries'. If the number of entries is too low
3774 number is too high, the 'nent' field is adjusted and an error (ENOMEM)
3806 --------------------
3813 < 0 on generic error (e.g. -EFAULT or -ENOMEM),
3871 Logical accesses are permitted for non-protected guests only.
3880 no actual access to the data in memory at the destination is performed.
3889 translation-exception identifier (TEID) indicates suppression.
3912 Absolute accesses are permitted for non-protected guests only.
3948 No flags are supported.
3951 -----------------------
3977 will cause the ioctl to return -EINVAL.
3983 -----------------------
4001 will cause the ioctl to return -EINVAL.
4008 the ioctl will return -EINVAL.
4011 -----------------
4017 :Returns: 0 on success, -1 on error
4058 - KVM_S390_SIGP_STOP - sigp stop; parameter in .stop
4059 - KVM_S390_PROGRAM_INT - program check; parameters in .pgm
4060 - KVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefix
4061 - KVM_S390_RESTART - restart; no parameters
4062 - KVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parameters
4063 - KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parameters
4064 - KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emerg
4065 - KVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcall
4066 - KVM_S390_MCHK - machine check interrupt; parameters in .mchk
4071 ---------------------------
4078 -EINVAL if buffer size is 0,
4079 -ENOBUFS if buffer size is too small to fit all pending interrupts,
4080 -EFAULT if the buffer address was invalid
4098 the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and
4102 If -ENOBUFS is returned the buffer provided was too small and userspace
4106 ---------------------------
4113 -EFAULT if the buffer address was invalid,
4114 -EINVAL for an invalid buffer length (see below),
4115 -EBUSY if there were already interrupts pending,
4119 This ioctl allows userspace to set the complete state of all cpu-local
4141 which is the maximum number of possibly pending cpu-local interrupts.
4144 ------------
4150 :Returns: 0 on success, -1 on error
4155 ----------------------------
4202 If no filter range matches an MSR index that is getting accessed, KVM will
4207 If no filter range matches an MSR index that is getting accessed, KVM will
4229 By default, KVM operates in KVM_MSR_FILTER_DEFAULT_ALLOW mode with no MSR range
4244 part of VM-Enter/VM-Exit emulation.
4247 of VM-Enter/VM-Exit emulation. If an MSR access is denied on VM-Enter, KVM
4248 synthesizes a consistency check VM-Exit(EXIT_REASON_MSR_LOAD_FAIL). If an
4249 MSR access is denied on VM-Exit, KVM synthesizes a VM-Abort. In short, KVM
4251 the VM-Enter/VM-Exit MSR list. It is platform owner's responsibility to
4268 ----------------------------
4301 -------------------------
4308 -EFAULT if struct kvm_reinject_control cannot be read,
4309 -ENXIO if KVM_CREATE_PIT or KVM_CREATE_PIT2 didn't succeed earlier.
4328 ------------------------------
4335 -EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read,
4336 -EINVAL if the configuration is invalid
4362 ---------------------------
4369 -EFAULT if struct kvm_ppc_rmmu_info cannot be written,
4370 -EINVAL if no useful information can be returned
4399 --------------------------------
4408 -EFAULT if struct kvm_reinject_control cannot be read,
4409 -EINVAL if the supplied shift or flags are invalid,
4410 -ENOMEM if unable to allocate the new HPT,
4425 If called with shift > 0 when there is no pending HPT for the guest,
4443 returns 0 (i.e. cancels any in-progress preparation).
4446 flags will result in an -EINVAL.
4453 -------------------------------
4460 -EFAULT if struct kvm_reinject_control cannot be read,
4461 -EINVAL if the supplied shift or flags are invalid,
4462 -ENXIO is there is no pending HPT, or the pending HPT doesn't
4464 -EBUSY if the pending HPT is not fully prepared,
4465 -ENOSPC if there was a hash collision when moving existing
4467 -EIO on other error conditions
4484 KVM_PPC_RESIZE_HPT_COMMIT will return an error (usually -ENXIO or
4485 -EBUSY, though others may be possible if the preparation was started,
4489 placed itself in a quiescent state where no vcpu will make MMU enabled
4498 -----------------------------------
4504 :Returns: 0 on success, -1 on error
4511 -----------------------
4518 -EFAULT if u64 mcg_cap cannot be read,
4519 -EINVAL if the requested number of banks is invalid,
4520 -EINVAL if requested MCE capability is not supported.
4525 supported number of error-reporting banks can be retrieved when
4530 ---------------------
4537 -EFAULT if struct kvm_x86_mce cannot be read,
4538 -EINVAL if the bank number is invalid,
4539 -EINVAL if VAL bit is not set in status field.
4564 ----------------------------
4580 EFAULT if the userspace address is invalid or if no page table is
4587 - During live migration to save the CMMA values. Live migration needs
4589 - To non-destructively peek at the CMMA values, with the flag
4620 KVM_S390_SKEYS_MAX. KVM_S390_SKEYS_MAX is re-used for consistency with
4648 mode, and no other action is performed;
4665 ----------------------------
4675 the CMMA values, but there are no restrictions on its use.
4704 This ioctl can fail with -ENOMEM if not enough memory can be allocated to
4705 complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if
4707 if the flags field was not 0, with -EFAULT if the userspace address is
4709 or if no page table is present for the addresses (e.g. when using
4713 --------------------------
4720 -EFAULT if struct kvm_ppc_cpu_char cannot be written
4725 CVE-2017-5715, CVE-2017-5753 and CVE-2017-5754). The information is
4742 with preventing inadvertent information disclosure - specifically,
4743 whether there is an instruction to flash-invalidate the L1 data cache
4760 ---------------------------
4766 :Returns: 0 on success; -1 on error
4769 for issuing platform-specific memory encryption commands to manage those
4774 Documentation/virt/kvm/x86/amd-memory-encryption.rst.
4777 -----------------------------------
4783 :Returns: 0 on success; -1 on error
4788 It is used in the SEV-enabled guest. When encryption is enabled, a guest
4801 -------------------------------------
4807 :Returns: 0 on success; -1 on error
4813 ------------------------
4821 the specified Hyper-V connection id through the SIGNAL_EVENT hypercall, without
4822 causing a user exit. SIGNAL_EVENT hypercall with non-zero event flag number
4823 (bits 24-31) still triggers a KVM_EXIT_HYPERV_HCALL user exit.
4843 -EINVAL if conn_id or flags is outside the allowed range,
4844 -ENOENT on deassign if the conn_id isn't registered,
4845 -EEXIST on assign if the conn_id is already registered
4848 --------------------------
4854 :Returns: 0 on success, -1 on error
4922 --------------------------
4928 :Returns: 0 on success, -1 on error
4934 -------------------------------------
4963 -------------------------
4969 :Returns: 0 on success, -1 on error
4991 in KVM's dirty bitmap, and dirty tracking is re-enabled for that page
4992 (for example via write-protection, or by clearing the dirty bit in
4995 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of slot field specifies
5005 --------------------------------
5011 :Returns: 0 on success, -1 on error
5032 This ioctl returns x86 cpuid features leaves related to Hyper-V emulation in
5034 cpuid information presented to guests consuming Hyper-V enlightenments (e.g.
5035 Windows or Hyper-V guests).
5037 CPUID feature leaves returned by this ioctl are defined by Hyper-V Top Level
5044 - HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS
5045 - HYPERV_CPUID_INTERFACE
5046 - HYPERV_CPUID_VERSION
5047 - HYPERV_CPUID_FEATURES
5048 - HYPERV_CPUID_ENLIGHTMENT_INFO
5049 - HYPERV_CPUID_IMPLEMENT_LIMITS
5050 - HYPERV_CPUID_NESTED_FEATURES
5051 - HYPERV_CPUID_SYNDBG_VENDOR_AND_MAX_FUNCTIONS
5052 - HYPERV_CPUID_SYNDBG_INTERFACE
5053 - HYPERV_CPUID_SYNDBG_PLATFORM_CAPABILITIES
5056 with the 'nent' field indicating the number of entries in the variable-size
5057 array 'entries'. If the number of entries is too low to describe all Hyper-V
5059 to the number of Hyper-V feature leaves, the 'nent' field is adjusted to the
5069 - HYPERV_CPUID_NESTED_FEATURES leaf and HV_X64_ENLIGHTENED_VMCS_RECOMMENDED
5072 - HV_STIMER_DIRECT_MODE_AVAILABLE bit is only exposed with in-kernel LAPIC.
5076 ---------------------------
5081 :Returns: 0 on success, -1 on error
5099 means of a successful :ref:`KVM_ARM_VCPU_INIT <KVM_ARM_VCPU_INIT>` call with the
5107 that should be performed and how to do it are feature-dependent.
5111 -EPERM unless the feature has already been finalized by means of a
5118 ------------------------------
5124 :Returns: 0 on success, -1 on error
5177 ---- -----------
5181 35:32 event select (high bits)
5206 When setting a new pmu event filter, -EINVAL will be returned if any of the
5207 unused fields are set or if any of the high bits (35:32) in the event
5218 Specifically, KVM follows the following pseudo-code when determining whether to
5219 allow the guest FixCtr[i] to count its pre-defined fixed event::
5234 ---------------------
5251 is reset. This has no effect if called for a normal guest.
5258 ---------------------------
5270 ----------------------------
5283 --------------------------
5297 -------------------------
5342 All registered VCPUs are converted back to non-protected ones. If a
5443 not succeed all other subcommands will fail with -EINVAL. This
5444 subcommand will return -EINVAL if a dump process has not yet been
5475 resume execution immediately as non-protected. There can be at most
5500 --------------------------
5546 Sets the ABI mode of the VM to 32-bit or 64-bit (long mode). This
5580 re-mapped in guest physcial address space.
5586 This is the HVM-wide vector injected directly by the hypervisor
5608 the 32-bit version code returned to the guest when it invokes the
5623 --------------------------
5636 ---------------------------
5721 other four times. The state field must be set to -1, or to a valid
5729 vCPU ID of the given vCPU, to allow timer-related VCPU operations to
5742 per-vCPU local APIC upcall vector, configured by a Xen guest with
5744 used by Windows guests, and is distinct from the HVM-wide upcall
5750 ---------------------------
5765 ---------------------------
5771 :Returns: number of bytes copied, < 0 on error (-EINVAL for incorrect
5772 arguments, -EFAULT if memory cannot be accessed).
5786 ``length`` must not be bigger than 2^31 - PAGE_SIZE bytes. The ``addr``
5803 --------------------
5809 :Returns: 0 on success, -1 on error
5836 --------------------
5842 :Returns: 0 on success, -1 on error
5849 ----------------------
5868 +-------------+
5870 +-------------+
5872 +-------------+
5874 +-------------+
5876 +-------------+
5966 Bits 0-3 of ``flags`` encode the type:
5988 is [``hist_param``*(N-1), ``hist_param``*N), while the range of the last
5989 bucket is [``hist_param``*(``size``-1), +INF). (+INF means positive infinity
5994 [0, 1), while the range of the last bucket is [pow(2, ``size``-2), +INF).
5996 [pow(2, N-2), pow(2, N-1)).
5998 Bits 4-7 of ``flags`` encode the unit:
6001 There is no unit for the value of statistics data. This usually means that
6021 Bits 8-11 of ``flags``, together with ``exponent``, encode the scale of the
6026 CPU clock cycles. For example, an exponent of -9 can be used with
6042 bucket in the unit expressed by bits 4-11 of ``flags`` together with ``exponent``.
6048 The Stats Data block contains an array of 64-bit values in the same order
6052 --------------------
6058 :Returns: 0 on success, -1 on error
6079 -----------------------------
6099 -----------------------------
6108 for vcpus. It re-uses the kvm_s390_pv_dmp struct and hence also shares
6124 ----------------------
6132 Used to manage hardware-assisted virtualization features for zPCI devices.
6171 --------------------------------
6179 This capability indicates that userspace is able to apply a single VM-wide
6200 (-EINVAL) being returned. This ioctl can also return -EBUSY if any vcpu
6205 interface. No error will be returned, but the resulting offset will not be
6211 ------------------------------------
6250 op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, op2=={0-7}.
6259 ---------------------------------
6265 :Returns: 0 on success, -1 on error
6295 on-demand.
6306 Returns -EINVAL if the VM has the KVM_VM_S390_UCONTROL flag set.
6307 Returns -EINVAL if called on a protected VM.
6310 -------------------------------
6340 Note, there is no "get" API. Userspace is responsible for explicitly tracking
6346 ----------------------------
6389 ---------------------------
6403 EINTR An unmasked signal is pending and no page was processed.
6421 KVM_PRE_FAULT_MEMORY populates KVM's stage-2 page tables used to map memory
6423 stage-2 read page fault, e.g. faults in memory as needed, but doesn't break
6424 CoW. However, KVM does not mark any newly created stage-2 PTE as Accessed.
6473 This field is polled once when KVM_RUN starts; if non-zero, KVM_RUN
6474 exits immediately, returning -EINTR. In the common scenario where a
6478 a signal handler that sets run->immediate_exit to a non-zero value.
6504 The value of the current interrupt flag. Only valid if in-kernel
6511 More architecture-specific flags detailing state of the VCPU that may
6529 The value of the cr8 register. Only valid if in-kernel local APIC is
6536 The value of the APIC BASE msr. Only valid if in-kernel local
6548 reasons. Further architecture-specific information is available in
6560 to unknown reasons. Further architecture-specific information is
6613 executed a memory-mapped I/O instruction which could not be satisfied
6626 has re-entered the kernel with KVM_RUN. The kernel side will first finish
6631 completed before performing a live migration. Userspace can re-enter the
6654 ----------
6665 - ``KVM_HYPERCALL_EXIT_SMC``: Indicates that the guest used the SMC
6669 - ``KVM_HYPERCALL_EXIT_16BIT``: Indicates that the guest used a 16bit
6725 in the cpu's lowcore are presented here as defined by the z Architecture
6738 Deprecated - was used for 440 KVM.
6764 This is used on 64-bit PowerPC when emulating a pSeries partition,
6768 the arguments (from the guest R4 - R12). Userspace should put the
6829 a system-level event using some architecture specific mechanism (hypercall
6833 The 'type' field describes the system-level event type.
6836 - KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the
6840 - KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM.
6843 - KVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest
6847 - KVM_SYSTEM_EVENT_SEV_TERM -- an AMD SEV guest requested termination.
6849 - KVM_SYSTEM_EVENT_WAKEUP -- the exiting vCPU is in a suspended state and
6852 - KVM_SYSTEM_EVENT_SUSPEND -- the guest has requested a suspension of
6856 architecture specific information for the system-level event. Only
6859 - for arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if
6863 - for arm64, data[0] is set to KVM_SYSTEM_EVENT_SHUTDOWN_FLAG_PSCI_OFF2
6867 - for RISC-V, data[0] is set to the value of the second argument of the
6875 --------------
6885 the call parameters are left in-place in the vCPU registers.
6890 - Honor the guest request to suspend the VM. Userspace can request
6891 in-kernel emulation of suspension by setting the calling vCPU's
6897 - Deny the guest request to suspend the VM. See ARM DEN0022D.b 5.19.2
6913 Indicates that the VCPU's in-kernel local APIC received an EOI for a
6914 level-triggered IOAPIC interrupt. This exit only triggers when the
6956 related to Hyper-V emulation.
6960 - KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space about
6962 Hyper-V SynIC state change. Notification is used to remap SynIC
6966 - KVM_EXIT_HYPERV_SYNDBG -- synchronously notify user-space about
6968 Hyper-V Synthetic debugger state change. Notification is used to either update
6982 behalf. However, for certain classes of instructions, no instruction decode
6987 the VM. KVM assumed that if the guest accessed non-memslot memory, it was
7017 __u8 error; /* user -> kernel */
7019 __u32 reason; /* kernel -> user */
7020 __u32 index; /* kernel -> user */
7021 __u64 data; /* kernel <-> user */
7079 - KVM_EXIT_XEN_HCALL -- synchronously notify user-space about Xen hypercall.
7094 done a SBI call which is not handled by KVM RISC-V kernel module. The details
7100 values of SBI call before resuming the VCPU. For more details on RISC-V SBI
7101 spec refer, https://github.com/riscv/riscv-sbi-doc.
7118 - KVM_MEMORY_EXIT_FLAG_PRIVATE - When set, indicates the memory fault occurred
7123 accompanies a return code of '-1', not '0'! errno will always be set to EFAULT
7136 enabled, a VM exit generated if no event window occurs in VM non-root mode
7144 - KVM_NOTIFY_CONTEXT_INVALID -- the VM context is corrupted and not valid
7187 :ref:`KVM_ENABLE_CAP`.
7199 whether this is a per-vcpu or per-vm capability.
7210 -------------------
7215 :Returns: 0 on success; -1 on error
7219 were invented by Mac-on-Linux to have a standardized communication mechanism
7226 --------------------
7231 :Returns: 0 on success; -1 on error
7247 ------------------
7252 :Returns: 0 on success; -1 on error
7265 addresses of mmu-type-specific data structures. The "array_len" field is an
7281 - The "params" field is of type "struct kvm_book3e_206_tlb_params".
7282 - The "array" field points to an array of type "struct
7284 - The array consists of all entries in the first TLB, followed by all
7286 - Within a TLB, entries are ordered first by increasing set number. Within a
7288 - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1)
7290 - The tsize field of mas1 shall be set to 4K on TLB0, even though the
7294 ----------------------------
7299 :Returns: 0 on success; -1 on error
7304 handled in-kernel, while the other I/O instructions are passed to userspace.
7309 Note that even though this capability is enabled per-vcpu, the complete
7313 -------------------
7318 :Returns: 0 on success; -1 on error
7332 --------------------
7338 This capability connects the vcpu to an in-kernel MPIC device.
7341 --------------------
7348 This capability connects the vcpu to an in-kernel XICS device.
7351 ------------------------
7357 This capability enables the in-kernel irqchip for s390. Please refer to
7361 --------------------
7375 ---------------------
7388 ----------------------
7393 :Returns: x86: KVM_CHECK_EXTENSION returns a bit-array indicating which register
7397 As described above in the kvm_sync_regs struct info in section :ref:`kvm_run`,
7409 - the register sets to be copied out to kvm_run are selectable
7411 - vcpu_events are available in addition to regs and sregs.
7414 function as an input bit-array field set by userspace to indicate the
7434 -------------------------
7441 This capability connects the vcpu to an in-kernel XIVE device.
7450 :ref:`KVM_ENABLE_CAP`. Below you can find a list of capabilities and
7468 ----------------------------
7472 args[1] is 0 to disable, 1 to enable in-kernel handling
7475 get handled by the kernel or not. Enabling or disabling in-kernel
7477 initial set of hcalls are enabled for in-kernel handling, which
7478 consists of those hcalls for which in-kernel handlers were implemented
7485 If the hcall number specified is not one that has an in-kernel
7490 --------------------------
7499 - SENSE
7500 - SENSE RUNNING
7501 - EXTERNAL CALL
7502 - EMERGENCY SIGNAL
7503 - CONDITIONAL EMERGENCY SIGNAL
7512 ---------------------------------
7520 return -EINVAL if the machine does not support vectors.
7523 --------------------------
7528 This capability allows post-handlers for the STSI instruction. After
7533 vcpu->run::
7544 @addr - guest address of STSI SYSIB
7545 @fc - function code
7546 @sel1 - selector 1
7547 @sel2 - selector 2
7548 @ar - access register number
7550 KVM handlers should exit to userspace with rc = -EREMOTE.
7553 -------------------------
7556 :Parameters: args[0] - number of routes reserved for userspace IOAPICs
7557 :Returns: 0 on success, -1 on error
7574 -------------------
7579 Allows use of runtime-instrumentation introduced with zEC12 processor.
7580 Will return -EINVAL if the machine does not support runtime-instrumentation.
7581 Will return -EBUSY if a VCPU has already been created.
7584 ----------------------
7587 :Parameters: args[0] - features that should be enabled
7588 :Returns: 0 on success, -EINVAL when args[0] contains invalid features
7597 allowing the use of 32-bit APIC IDs. See KVM_CAP_X2APIC_API in their
7604 where 0xff represents CPUs 0-7 in cluster 0.
7607 ----------------------------
7614 mechanism e.g. to realize 2-byte software breakpoints. The kernel will
7622 -------------------
7626 :Returns: 0 on success; -EINVAL if the machine does not support
7627 guarded storage; -EBUSY if a VCPU has already been created.
7632 ---------------------
7637 Allow use of adapter-interruption suppression.
7638 :Returns: 0 on success; -EBUSY if a VCPU has already been created.
7641 --------------------
7649 between 1 and 8. On POWER8, vsmt_mode must also be no greater than
7659 ----------------------
7671 ------------------------------
7675 :Returns: 0 on success, -EINVAL when args[0] contains invalid exits
7684 Enabling this capability on a VM provides userspace with a way to no
7694 --------------------------
7698 :Returns: 0 on success, -EINVAL if hpage module parameter was not set
7706 hpage module parameter is not set to 1, -EINVAL is returned.
7712 ------------------------------
7722 --------------------------
7726 :Returns: 0 on success, -EINVAL when the implementation doesn't support
7727 nested-HV virtualization.
7729 HV-KVM on POWER9 and later systems allows for "nested-HV"
7731 can run using the CPU's supervisor mode (privileged non-hypervisor
7734 kvm-hv module parameter.
7737 ------------------------------
7743 emulated VM-exit when L1 intercepts a #PF exception that occurs in
7744 L2. Similarly, for kvm-intel only, DR6 will not be modified prior to
7745 the emulated VM-exit when L1 intercepts a #DB exception that occurs in
7751 exception.has_payload and to put the faulting address - or the new DR6
7752 bits\ [#]_ - in the exception_payload field.
7763 --------------------------------------
7774 automatically clear and write-protect all pages that are returned as dirty.
7780 KVM_CLEAR_DIRTY_LOG ioctl can operate on a 64-page granularity rather
7805 ------------------------------
7822 ----------------------
7827 :Returns: 0 on success; -1 on error
7830 maximum halt-polling time for all vCPUs in the target VM. This capability can
7832 maximum halt-polling time.
7834 See Documentation/virt/kvm/halt-polling.rst for more information on halt
7838 -------------------------------
7843 :Returns: 0 on success; -1 on error
7870 -------------------------------
7875 :Returns: 0 on success, -EINVAL when args[0] contains invalid bits
7885 the KVM_ENABLE_CAP. The supported modes are mutually-exclusive.
7888 guest, irrespective whether or not the host has enabled split-lock detection
7894 exit, although the host kernel's split-lock #AC detection still applies, if
7900 apply some other policy-based mitigation. When exiting to userspace, KVM sets
7901 KVM_RUN_X86_BUS_LOCK in vcpu-run->flags, and conditionally sets the exit_reason
7909 ----------------------
7913 :Returns: 0 on success, -EINVAL when CPU doesn't support 2nd DAWR
7920 -------------------------------------
7930 This is intended to support in-guest workloads scheduled by the host. This
7931 allows the in-guest workload to maintain its own NPTs and keeps the two vms
7936 --------------------------
7941 :Returns: 0 on success, -EINVAL if the file handle is invalid or if a requested
7959 -------------------------------
7970 IBM pSeries (sPAPR) guest starts using it if "hcall-rpt-invalidate" is
7971 present in the "ibm,hypertas-functions" device-tree property.
7977 --------------------------------------
7995 --------------------
8012 ``MAP_ANONYMOUS`` or with a RAM-based file mapping (``tmpfs``, ``memfd``),
8014 -EINVAL return.
8020 -------------------------------------
8030 This is intended to support intra-host migration of VMs between userspace VMMs,
8034 -------------------------------
8044 This capability allows a guest kernel to use a better-performance mode for
8048 ----------------------------
8051 :Parameters: args[0] - set of KVM quirks to disable
8076 with caches in "no fill" mode.
8087 KVM_X86_QUIRK_OUT_7E_INC_RIP By default, KVM pre-increments %rip before
8090 KVM does not pre-increment %rip before
8104 will no longer rewrite invalid guest
8156 ------------------------
8160 :Parameters: args[0] - maximum APIC ID value set for current VM
8161 :Returns: 0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS
8177 ------------------------------
8182 :Returns: 0 on success, -EINVAL if args[0] contains invalid flags or notify
8192 in per-VM scope during VM creation. Notify VM exit is disabled by default.
8195 a VM exit if no event window occurs in VM non-root mode for a specified of
8206 ------------------------------
8209 :Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
8212 kvm_run.memory_fault if KVM cannot resolve a guest page fault VM-Exit, e.g. if
8213 there is a valid memslot but no backing VMA for the corresponding host virtual
8227 -----------------------------------
8232 :Returns: 0 on success, -EINVAL if args[0] contains an invalid value for the
8233 frequency or if any vCPUs have been created, -ENXIO if a virtual
8236 This capability sets the VM's APIC bus clock frequency, used by KVM's in-kernel
8241 core crystal clock frequency, if a non-zero CPUID 0x15 is exposed to the guest.
8244 ------------------------------
8247 :Returns: Informational only, -EINVAL on direct KVM_ENABLE_CAP.
8264 ---------------------
8270 H_RANDOM hypercall backed by a hardware random-number generator.
8275 ------------------------
8281 Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is
8282 used to support Windows Hyper-V based guest paravirt drivers(VMBus).
8287 by the CPU, as it's incompatible with SynIC auto-EOI behavior.
8290 -------------------------
8300 ---------------------------
8307 the POWER9 processor), including in-memory segment tables.
8310 -------------------
8340 -------------------
8354 ----------------------
8368 Both registers and addresses are 32-bits wide.
8369 It will only be possible to run 32-bit guest code.
8371 1 MIPS64 or microMIPS64 with access only to 32-bit compatibility segments.
8372 Registers are 64-bits wide, but addresses are 32-bits wide.
8373 64-bit guest code may run but cannot access MIPS64 memory segments.
8374 It will also be possible to run 32-bit guest code.
8377 Both registers and addresses are 64-bits wide.
8378 It will be possible to run 64-bit or 32-bit guest code.
8382 ------------------------
8387 that if userspace creates a VM without an in-kernel interrupt controller, it
8388 will be notified of changes to the output level of in-kernel emulated devices,
8391 updates the vcpu's run->s.regs.device_irq_level field to represent the actual
8397 userspace can always sample the device output level and re-compute the state of
8399 of run->s.regs.device_irq_level on every kvm exit.
8400 The value in run->s.regs.device_irq_level can represent both level and edge
8402 signals will exit to userspace with the bit in run->s.regs.device_irq_level
8405 The field run->s.regs.device_irq_level is available independent of
8406 run->kvm_valid_regs or run->kvm_dirty_regs bits.
8410 and thereby which bits in run->s.regs.device_irq_level can signal values.
8416 KVM_ARM_DEV_EL1_VTIMER - EL1 virtual timer
8417 KVM_ARM_DEV_EL1_PTIMER - EL1 physical timer
8418 KVM_ARM_DEV_PMU - ARM PMU overflow interrupt signal
8425 -----------------------------
8435 --------------------------
8439 This capability enables a newer version of Hyper-V Synthetic interrupt
8445 ----------------------------
8455 -------------------------------
8465 ---------------------
8472 ----------------------
8481 ---------------------
8486 use copy-on-write semantics as well as dirty pages tracking via read-only page
8490 ---------------------
8499 ----------------------------
8503 This capability indicates that KVM supports paravirtualized Hyper-V TLB Flush
8509 ----------------------------------
8524 ----------------------------
8528 This capability indicates that KVM supports paravirtualized Hyper-V IPI send
8533 -----------------------------------
8537 This capability indicates that KVM running on top of Hyper-V hypervisor
8539 hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM.
8540 Due to the different ABI for hypercall parameters between Hyper-V and
8543 flush hypercalls by Hyper-V) so userspace should disable KVM identification
8544 in CPUID and only exposes Hyper-V identification. In this case, guest
8545 thinks it's running on Hyper-V and only use Hyper-V hypercalls.
8548 -----------------------------
8556 ---------------------------
8567 -----------------------
8573 architecture-specific interfaces. This capability and the architecture-
8580 -------------------------
8590 an 8-byte value consisting of a one-byte Control Program Name Code (CPNC) and
8591 a 7-byte Control Program Version Code (CPVC). The CPNC determines what
8592 environment the control program is running in (e.g. Linux, z/VM...), and the
8600 -------------------------------
8611 ---------------------------
8625 -------------------------------------
8637 ----------------------------------------------------------
8640 :Parameters: args[0] - size of the dirty log ring
8680 00 -----------> 01 -------------> 1X -------+
8683 +------------------------------------------+
8697 using load-acquire/store-release accessors when available, or any
8725 Architecture with TSO-like ordering (such as x86) are allowed to
8731 ring structures can be backed by per-slot bitmaps. With this capability
8741 context. Otherwise, the stand-alone per-slot bitmap mechanism needs to
8754 KVM device "kvm-arm-vgic-its". (2) restore vgic/its tables through
8756 "kvm-arm-vgic-its". VGICv3 LPI pending status is restored. (3) save
8758 command on KVM device "kvm-arm-vgic-v3".
8761 --------------------
8791 The KVM_XEN_HVM_CONFIG_RUNSTATE flag indicates that the runstate-related
8825 -------------------------
8840 IBM pSeries (sPAPR) guest starts using them if "hcall-multi-tce" is
8841 present in the "ibm,hypertas-functions" device-tree property.
8851 --------------------
8860 ---------------------------------
8864 When enabled, KVM will disable emulated Hyper-V features provided to the
8865 guest according to the bits Hyper-V CPUID feature leaves. Otherwise, all
8866 currently implemented Hyper-V features are provided unconditionally when
8867 Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001)
8871 ---------------------------
8890 ---------------------------
8896 :Returns: 0 on success, -EINVAL when arg[0] contains invalid bits
8912 -------------------------------
8922 --------------------------------
8935 -------------------------------------
8941 :Returns: 0 on success, -EPERM if the userspace process does not
8942 have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been
8947 The capability has no effect if the nx_huge_pages module parameter is not set.
8952 ------------------------------
8973 When getting the Modified Change Topology Report value, the attr->addr
8977 ---------------------------------------
8983 :Returns: 0 on success, -EINVAL if any memslot was already created.
8987 Eager Page Splitting improves the performance of dirty-logging (used
8988 in live migrations) when guest memory is backed by huge-pages. It
8989 avoids splitting huge-pages (into PAGE_SIZE pages) on fault, by doing
9000 64-bit bitmap (each bit describing a block size). The default value is
9004 ---------------------
9010 This capability returns a bitmap of support VM types. The 1-setting of bit @n
9020 production. The behavior and effective ABI for software-protected VMs is
9034 --------
9048 ``KVM_ENABLE_CAP(KVM_CAP_IRQCHIP_SPLIT)`` are used to enable in-kernel emulation of
9055 has enabled in-kernel emulation of the local APIC.