• Home
  • Raw
  • Download

Lines Matching +full:message +full:- +full:handling +full:- +full:unit

1 The Definitive KVM (Kernel-based Virtual Machine) API Documentation
5 ----------------------
10 - System ioctls: These query and set global attributes which affect the
14 - VM ioctls: These query and set attributes that affect an entire virtual
21 - vcpu ioctls: These query and set attributes that control the operation
29 - device ioctls: These query and set attributes that control the operation
36 -------------------
73 -------------
77 facility that allows backward-compatible extensions to the API to be
87 ------------------
100 the ioctl returns -ENOTTY.
155 address used by the VM. The IPA_Bits is encoded in bits[7-0] of the
163 0 - Implies default size, 40bits (for backward compatibility)
167 N - Implies N bits, where N is a positive integer such that,
173 ioctl() at run-time.
187 Returns: 0 on success; -1 on error
253 Returns: 0 on success, -1 on error
264 Returns: vcpu fd on success, -1 on error
270 the KVM_CHECK_EXTENSION ioctl() at run-time.
272 KVM_CAP_MAX_VCPUS of the KVM_CHECK_EXTENSION ioctl() at run-time.
280 KVM_CAP_MAX_VCPU_ID of the KVM_CHECK_EXTENSION ioctl() at run-time.
295 single-threaded guest vcpus, it should make all vcpu ids be a multiple
310 Returns: 0 on success, -1 on error
327 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 specifies
342 Returns: 0 (success), -1 (error)
353 Returns: 0 on success, -1 on error
370 Returns: 0 on success, -1 on error
400 Returns: 0 on success, -1 on error
413 Returns: 0 on success, -1 on error
428 /* ppc -- see arch/powerpc/include/uapi/asm/kvm.h */
441 Returns: 0 on success, -1 on error
453 Returns: 0 on success, -1 on error
490 -EEXIST if an interrupt is already enqueued
491 -EINVAL the the irq number is invalid
492 -ENXIO if the PIC is in the kernel
493 -EFAULT if the pointer is invalid
496 ioctl is useful if the in-kernel PIC is not used.
541 Returns: -1 on error
553 -1 on error
556 Reads the values of MSR-based features that are available for the VM. This
558 The list of msr-based features can be obtained using KVM_GET_MSR_FEATURE_INDEX_LIST
562 Reads model-specific registers from the vcpu. Supported msr indices can
589 Returns: number of msrs successfully set (see below), -1 on error
591 Writes model-specific registers to the vcpu. See KVM_GET_MSRS for the
610 Returns: 0 on success, -1 on error
639 Returns: 0 on success, -1 on error
644 their traditional behaviour) will cause KVM_RUN to return with -EINTR.
662 Returns: 0 on success, -1 on error
688 Returns: 0 on success, -1 on error
714 Returns: 0 on success, -1 on error
718 future vcpus to have a local APIC. IRQ routing for GSIs 0-15 is set to both
719 PIC and IOAPIC; GSI 16-23 only go to the IOAPIC.
735 Returns: 0 on success, -1 on error
739 been previously created with KVM_CREATE_IRQCHIP. Note that edge-triggered
742 On real hardware, interrupt pins can be active-low or active-high. This
747 (active-low/active-high) for level-triggered interrupts, and KVM used
748 to consider the polarity. However, due to bitrot in the handling of
749 active-low interrupts, the above convention is now valid on x86 too.
751 should not present interrupts to the guest as active-low unless this
752 capability is present (or unless it is not using the in-kernel irqchip,
757 in-kernel irqchip (GIC), and for in-kernel irqchip can tell the GIC to
765 - irq_type[0]: out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
766 - irq_type[1]: in-kernel GIC: SPI, irq_id between 32 and 1019 (incl.)
768 - irq_type[2]: in-kernel GIC: PPI, irq_id between 16 and 31 (incl.)
779 injection of interrupts for the in-kernel irqchip. KVM_IRQ_LINE can always
797 Returns: 0 on success, -1 on error
819 Returns: 0 on success, -1 on error
841 Returns: 0 on success, -1 on error
846 page of a blob (32- or 64-bit, depending on the vcpu mode) to guest
866 Returns: 0 on success, -1 on error
896 Returns: 0 on success, -1 on error
916 Returns: 0 on success, -1 on error
958 - KVM_VCPUEVENT_VALID_SHADOW may be set to signal that
961 - KVM_VCPUEVENT_VALID_SMM may be set to signal that smi contains a
964 - KVM_VCPUEVENT_VALID_PAYLOAD may be set to signal that the
983 guest-visible registers. It is not possible to 'cancel' an SError that has been
986 A device being emulated in user-space may also wish to generate an SError. To do
987 this the events structure can be populated by user-space. The current state
996 always have a non-zero value when read, and the agent making an SError pending
998 the system supports KVM_CAP_ARM_INJECT_SERROR_ESR, but user-space sets the events
1002 -EINVAL. Setting anything other than the lower 24bits of exception.serror_esr
1003 will return -EINVAL.
1023 Returns: 0 on success, -1 on error
1035 suppress overwriting the current in-kernel state. The bits are:
1037 KVM_VCPUEVENT_VALID_NMI_PENDING - transfer nmi.pending to the kernel
1038 KVM_VCPUEVENT_VALID_SIPI_VECTOR - transfer sipi_vector
1039 KVM_VCPUEVENT_VALID_SMM - transfer the smi sub-struct.
1066 Returns: 0 on success, -1 on error
1085 Returns: 0 on success, -1 on error
1099 Returns: 0 on success, -1 on error
1114 memory slot. Bits 0-15 of "slot" specify the slot id and this value
1119 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot"
1143 to make a new slot read-only. In this case, writes to this memory will be
1162 Returns: 0 on success, -1 on error
1164 This ioctl defines the physical address of a three-page region in the guest
1170 This ioctl is required on Intel-based hosts. This is needed on Intel hardware
1181 Returns: 0 on success; -1 on error
1187 Returns: 0 on success; -1 on error
1216 The vcpu ioctl should be used for vcpu-specific capabilities, the vm ioctl
1217 for vm-wide capabilities.
1225 Returns: 0 on success; -1 on error
1236 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86,arm/arm64]
1237 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
1239 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
1241 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
1243 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
1245 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390,arm/arm64]
1246 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390]
1247 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted)
1249 - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state
1253 in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1267 Returns: 0 on success; -1 on error
1273 in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1287 Returns: 0 on success, -1 on error
1289 This ioctl defines the physical address of a one-page region in the guest
1298 This ioctl is required on Intel-based hosts. This is needed on Intel hardware
1310 Returns: 0 on success, -1 on error
1323 Returns: 0 on success, -1 on error
1338 Returns: 0 on success, -1 on error
1353 Returns: 0 on success, -1 on error
1377 Returns: 0 on success, -1 on error
1401 Returns: 0 on success, -1 on error
1438 with the 'nent' field indicating the number of entries in the variable-size
1509 Returns: 0 on success, -1 on error
1514 - GSI routing does not apply to KVM_IRQ_LINE but only to KVM_IRQFD.
1545 - KVM_MSI_VALID_DEVID: used along with KVM_IRQ_ROUTING_MSI routing entry
1546 type, specifies that the devid field contains a valid value. The per-VM
1550 - zero otherwise
1568 for the device that wrote the MSI message. For PCI, this is usually a
1573 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
1596 Returns: 0 on success, -1 on error
1598 Specifies the tsc frequency for the virtual machine. The unit of the
1608 Returns: virtual tsc-khz on success, negative value on error
1610 Returns the tsc frequency of the guest. The unit of the return value is
1611 KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
1621 Returns: 0 on success, -1 on error
1634 the APIC_ID register (bytes 32-35). xAPIC only allows an 8-bit APIC ID
1635 which is stored in bits 31-24 of the APIC register, or equivalently in
1649 Returns: 0 on success, -1 on error
1659 The format of the APIC ID register (bytes 32-35 of struct kvm_lapic_state's
1685 For the special case of virtio-ccw devices on s390, the ioevent is matched
1699 For virtio-ccw devices, addr contains the subchannel id and datamatch the
1713 Returns: 0 on success, -1 on error
1731 The array is little-endian: the bit 0 is the least significant bit of the
1749 is an IOMMU for PAPR-style virtual I/O. It is used to translate
1761 which this TCE table will translate - the table will contain one 64
1771 the entries written by kernel-handled H_PUT_TCE calls, and also lets
1785 time by the kernel. An RMA is a physically-contiguous, aligned region
1787 will be accessed by real-mode (MMU off) accesses in a KVM guest.
1815 Returns: 0 on success, -1 on error
1825 - pause the vcpu
1826 - read the local APIC's state (KVM_GET_LAPIC)
1827 - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1)
1828 - if so, issue KVM_NMI
1829 - resume the vcpu
2114 ARM 32-bit CP15 registers have the following id bit patterns:
2117 ARM 64-bit CP15 registers have the following id bit patterns:
2123 ARM 32-bit VFP control registers have the following id bit patterns:
2126 ARM 64-bit FP registers have the following id bit patterns:
2129 ARM firmware pseudo-registers have the following bit pattern:
2136 arm64 core/FP-SIMD registers have the following id bit patterns. Note
2144 ----------------------------------------------------------------
2166 (*) These encodings are not accepted for SVE-enabled vcpus. See
2179 arm64 firmware pseudo-registers have the following bit pattern:
2186 0x6060 0000 0015 ffff KVM_REG_ARM64_SVE_VLS pseudo-register
2189 ENOENT. max_vq is the vcpu's maximum supported vector length in 128-bit
2200 KVM_REG_ARM64_SVE_VLS is a pseudo-register that allows the set of vector
2210 ((vector_lengths[(vq - KVM_ARM64_SVE_VQ_MIN) / 64] >>
2211 ((vq - KVM_ARM64_SVE_VQ_MIN) % 64)) & 1))
2233 is hardware-dependent and may not be available. Attempting to configure
2248 patterns depending on whether they're 32-bit or 64-bit registers:
2249 0x7020 0000 0001 00 <reg:5> <sel:3> (32-bit)
2250 0x7030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2272 0x7020 0000 0003 00 <0:3> <reg:5> (32-bit FPU registers)
2273 0x7030 0000 0003 00 <0:3> <reg:5> (64-bit FPU registers)
2274 0x7040 0000 0003 00 <0:3> <reg:5> (128-bit MSA vector registers)
2314 Returns: 0 on success, -1 on error
2323 load-link/store-conditional, or equivalent must be used. There are two cases
2335 Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error
2337 Directly inject a MSI message. Only valid with in-kernel irqchip that handles
2349 flags: KVM_MSI_VALID_DEVID: devid contains a valid value. The per-VM
2355 for the device that wrote the MSI message. For PCI, this is usually a
2360 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
2370 Returns: 0 on success, -1 on error
2372 Creates an in-kernel device model for the i8254 PIT. This call is only valid
2373 after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. The following
2385 PIT timer interrupts may use a per-VM kernel thread for injection. If it
2388 kvm-pit/<owner-process-pid>
2402 Returns: 0 on success, -1 on error
2404 Retrieves the state of the in-kernel PIT model. Only valid after
2427 Returns: 0 on success, -1 on error
2429 Sets the state of the in-kernel PIT model. Only valid after KVM_CREATE_PIT2.
2441 Returns: 0 on success, -1 on error
2446 device-tree properties for the guest operating system.
2460 - KVM_PPC_PAGE_SIZES_REAL:
2465 - KVM_PPC_1T_SEGMENTS
2469 - KVM_PPC_NO_HASH
2515 Returns: 0 on success, -1 on error
2525 With KVM_CAP_IRQFD_RESAMPLE, KVM_IRQFD supports a de-assert and notify
2526 mechanism allowing emulation of level-triggered, irqfd-based
2531 as from an EOI, the gsi is de-asserted and the user is notified via
2532 kvm_irqfd.resamplefd. It is the user's responsibility to re-queue
2539 - in case no routing entry is associated to this gsi, injection fails
2540 - in case the gsi is associated to an irqchip routing entry,
2542 - in case the gsi is associated to an MSI routing entry, the MSI
2543 message and device ID are translated into an LPI (support restricted
2544 to GICv3 ITS in-kernel emulation).
2552 Returns: 0 on success, -1 on error
2564 The parameter is a pointer to a 32-bit unsigned integer variable
2571 default-sized hash table (16 MB).
2579 real-mode area (VRMA) facility, the kernel will re-create the VMRA
2588 Returns: 0 on success, -1 on error
2603 KVM_S390_SIGP_STOP (vcpu) - sigp stop; optional flags in parm
2604 KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm
2605 KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm
2606 KVM_S390_RESTART (vcpu) - restart
2607 KVM_S390_INT_CLOCK_COMP (vcpu) - clock comparator interrupt
2608 KVM_S390_INT_CPU_TIMER (vcpu) - CPU timer interrupt
2609 KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt
2611 KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm
2612 KVM_S390_INT_EMERGENCY (vcpu) - sigp emergency; source cpu in parm
2613 KVM_S390_INT_EXTERNAL_CALL (vcpu) - sigp external call; source cpu in parm
2614 KVM_S390_INT_IO(ai,cssid,ssid,schid) (vm) - compound value to indicate an
2615 I/O interrupt (ai - adapter interrupt; cssid,ssid,schid - subchannel);
2618 KVM_S390_MCHK (vm, vcpu) - machine check interrupt; cr 14 bits in parm,
2631 Returns: file descriptor number (>= 0) on success, -1 on error
2684 Returns: 0 on success, -1 on error
2716 Returns: 0 on success, -1 on error
2721 (e.g. read-only attribute, or attribute that only makes
2727 semantics are device-specific. See individual device documentation in
2733 __u32 group; /* device-defined */
2734 __u64 attr; /* group-defined */
2744 Returns: 0 on success, -1 on error
2760 Returns: 0 on success; -1 on error
2779 - KVM_ARM_VCPU_POWER_OFF: Starts the CPU in a power-off state.
2782 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
2784 - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 (or a future revision
2787 - KVM_ARM_VCPU_PMU_V3: Emulate PMUv3 for the CPU.
2790 - KVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication
2798 - KVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication
2806 - KVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only).
2812 - KVM_REG_ARM64_SVE_VLS may be read using KVM_GET_ONE_REG: the
2813 initial value of this pseudo-register indicates the best set of
2818 - KVM_RUN and KVM_GET_REG_LIST are not available;
2820 - KVM_GET_ONE_REG and KVM_SET_ONE_REG cannot be used to access
2825 - KVM_REG_ARM64_SVE_VLS may optionally be written using
2831 - the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can
2840 Returns: 0 on success; -1 on error
2849 kvm_vcpu_init->features bitmap returned will have feature bits set if
2864 Returns: 0 on success; -1 on error
2884 Returns: 0 on success, -1 on error
2908 ARM/arm64 currently only require this when using the in-kernel GIC
2914 base addresses will return -EEXIST.
2926 Returns: 0 on success, -1 on error
2931 of a service that has a kernel-side implementation. If the token
2932 value is non-zero, it will be associated with that service, and
2945 Returns: 0 on success; -1 on error
2954 handling guest debug events. There are two parts to the structure, the
2958 - KVM_GUESTDBG_ENABLE: guest debugging is enabled
2959 - KVM_GUESTDBG_SINGLESTEP: the next run should single-step
2964 - KVM_GUESTDBG_USE_SW_BP: using software breakpoints [x86, arm64]
2965 - KVM_GUESTDBG_USE_HW_BP: using hardware breakpoints [x86, s390, arm64]
2966 - KVM_GUESTDBG_INJECT_DB: inject DB type exception [x86]
2967 - KVM_GUESTDBG_INJECT_BP: inject BP type exception [x86]
2968 - KVM_GUESTDBG_EXIT_PENDING: trigger an immediate guest exit [s390]
2995 Returns: 0 on success, -1 on error
3026 the variable-size array 'entries'. If the number of entries is too low
3066 < 0 on generic error (e.g. -EFAULT or -ENOMEM),
3133 will cause the ioctl to return -EINVAL.
3156 will cause the ioctl to return -EINVAL.
3163 the ioctl will return -EINVAL.
3171 Returns: 0 on success, -1 on error
3207 KVM_S390_SIGP_STOP - sigp stop; parameter in .stop
3208 KVM_S390_PROGRAM_INT - program check; parameters in .pgm
3209 KVM_S390_SIGP_SET_PREFIX - sigp set prefix; parameters in .prefix
3210 KVM_S390_RESTART - restart; no parameters
3211 KVM_S390_INT_CLOCK_COMP - clock comparator interrupt; no parameters
3212 KVM_S390_INT_CPU_TIMER - CPU timer interrupt; no parameters
3213 KVM_S390_INT_EMERGENCY - sigp emergency; parameters in .emerg
3214 KVM_S390_INT_EXTERNAL_CALL - sigp external call; parameters in .extcall
3215 KVM_S390_MCHK - machine check interrupt; parameters in .mchk
3226 -EINVAL if buffer size is 0,
3227 -ENOBUFS if buffer size is too small to fit all pending interrupts,
3228 -EFAULT if the buffer address was invalid
3246 the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and
3250 If -ENOBUFS is returned the buffer provided was too small and userspace
3260 -EFAULT if the buffer address was invalid,
3261 -EINVAL for an invalid buffer length (see below),
3262 -EBUSY if there were already interrupts pending,
3266 This ioctl allows userspace to set the complete state of all cpu-local
3288 which is the maximum number of possibly pending cpu-local interrupts.
3296 Returns: 0 on success, -1 on error
3306 This capability means the kernel is capable of handling hypercalls
3315 IBM pSeries (sPAPR) guest starts using them if "hcall-multi-tce" is
3316 present in the "ibm,hypertas-functions" device-tree property.
3364 -EFAULT if struct kvm_reinject_control cannot be read,
3365 -ENXIO if KVM_CREATE_PIT or KVM_CREATE_PIT2 didn't succeed earlier.
3388 -EFAULT if struct kvm_ppc_mmuv3_cfg cannot be read,
3389 -EINVAL if the configuration is invalid
3419 -EFAULT if struct kvm_ppc_rmmu_info cannot be written,
3420 -EINVAL if no useful information can be returned
3455 -EFAULT if struct kvm_reinject_control cannot be read,
3456 -EINVAL if the supplied shift or flags are invalid
3457 -ENOMEM if unable to allocate the new HPT
3458 -ENOSPC if there was a hash collision when moving existing
3460 -EIO on other error conditions
3484 returns 0 (i.e. cancels any in-progress preparation).
3487 flags will result in an -EINVAL.
3506 -EFAULT if struct kvm_reinject_control cannot be read,
3507 -EINVAL if the supplied shift or flags are invalid
3508 -ENXIO is there is no pending HPT, or the pending HPT doesn't
3510 -EBUSY if the pending HPT is not fully prepared
3511 -ENOSPC if there was a hash collision when moving existing
3513 -EIO on other error conditions
3522 KVM_PPC_RESIZE_HPT_COMMIT will return an error (usually -ENXIO or
3523 -EBUSY, though others may be possible if the preparation was started,
3547 Returns: 0 on success, -1 on error
3560 -EFAULT if u64 mcg_cap cannot be read,
3561 -EINVAL if the requested number of banks is invalid,
3562 -EINVAL if requested MCE capability is not supported.
3567 supported number of error-reporting banks can be retrieved when
3578 -EFAULT if struct kvm_x86_mce cannot be read,
3579 -EINVAL if the bank number is invalid,
3580 -EINVAL if VAL bit is not set in status field.
3614 - During live migration to save the CMMA values. Live migration needs
3616 - To non-destructively peek at the CMMA values, with the flag
3644 KVM_S390_SKEYS_MAX. KVM_S390_SKEYS_MAX is re-used for consistency with
3688 This ioctl can fail with -ENOMEM if not enough memory can be allocated to
3689 complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if
3691 -EFAULT if the userspace address is invalid or if no page table is
3731 This ioctl can fail with -ENOMEM if not enough memory can be allocated to
3732 complete the task, with -ENXIO if CMMA is not enabled, with -EINVAL if
3734 if the flags field was not 0, with -EFAULT if the userspace address is
3746 -EFAULT if struct kvm_ppc_cpu_char cannot be written
3751 CVE-2017-5715, CVE-2017-5753 and CVE-2017-5754). The information is
3768 with preventing inadvertent information disclosure - specifically,
3769 whether there is an instruction to flash-invalidate the L1 data cache
3791 Returns: 0 on success; -1 on error
3794 for issuing platform-specific memory encryption commands to manage those
3799 Documentation/virt/kvm/amd-memory-encryption.rst.
3807 Returns: 0 on success; -1 on error
3812 It is used in the SEV-enabled guest. When encryption is enabled, a guest
3830 Returns: 0 on success; -1 on error
3843 the specified Hyper-V connection id through the SIGNAL_EVENT hypercall, without
3844 causing a user exit. SIGNAL_EVENT hypercall with non-zero event flag number
3845 (bits 24-31) still triggers a KVM_EXIT_HYPERV_HCALL user exit.
3863 -EINVAL if conn_id or flags is outside the allowed range
3864 -ENOENT on deassign if the conn_id isn't registered
3865 -EEXIST on assign if the conn_id is already registered
3873 Returns: 0 on success, -1 on error
3935 Returns: 0 on success, -1 on error
3974 Returns: 0 on success, -1 on error
3994 in KVM's dirty bitmap, and dirty tracking is re-enabled for that page
3995 (for example via write-protection, or by clearing the dirty bit in
3998 If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 specifies
4014 Returns: 0 on success, -1 on error
4033 This ioctl returns x86 cpuid features leaves related to Hyper-V emulation in
4035 cpuid information presented to guests consuming Hyper-V enlightenments (e.g.
4036 Windows or Hyper-V guests).
4038 CPUID feature leaves returned by this ioctl are defined by Hyper-V Top Level
4056 with the 'nent' field indicating the number of entries in the variable-size
4057 array 'entries'. If the number of entries is too low to describe all Hyper-V
4059 to the number of Hyper-V feature leaves, the 'nent' field is adjusted to the
4070 Returns: 0 on success, -1 on error
4089 that should be performaned and how to do it are feature-dependent.
4093 -EPERM unless the feature has already been finalized by means of a
4105 Returns: 0 on success, -1 on error
4131 ------------------------
4148 This field is polled once when KVM_RUN starts; if non-zero, KVM_RUN
4149 exits immediately, returning -EINTR. In the common scenario where a
4153 a signal handler that sets run->immediate_exit to a non-zero value.
4173 The value of the current interrupt flag. Only valid if in-kernel
4178 More architecture-specific flags detailing state of the VCPU that may
4186 The value of the cr8 register. Only valid if in-kernel local APIC is
4191 The value of the APIC BASE msr. Only valid if in-kernel local
4201 reasons. Further architecture-specific information is available in
4210 to unknown reasons. Further architecture-specific information is
4255 executed a memory-mapped I/O instruction which could not be satisfied
4266 has re-entered the kernel with KVM_RUN. The kernel side will first finish
4268 can re-enter the guest with an unmasked signal pending to complete
4335 Deprecated - was used for 440 KVM.
4357 This is used on 64-bit PowerPC when emulating a pSeries partition,
4361 the arguments (from the guest R4 - R12). Userspace should put the
4412 a system-level event using some architecture specific mechanism (hypercall
4415 the system-level event type. The 'flags' field describes architecture
4416 specific flags for the system-level event.
4419 KVM_SYSTEM_EVENT_SHUTDOWN -- the guest has requested a shutdown of the
4423 KVM_SYSTEM_EVENT_RESET -- the guest has requested a reset of the VM.
4426 KVM_SYSTEM_EVENT_CRASH -- the guest crash occurred and the guest
4436 Indicates that the VCPU's in-kernel local APIC received an EOI for a
4437 level-triggered IOAPIC interrupt. This exit only triggers when the
4464 related to Hyper-V emulation.
4466 KVM_EXIT_HYPERV_SYNIC -- synchronously notify user-space about
4467 Hyper-V SynIC state change. Notification is used to remap SynIC
4468 event/message pages and to enable/disable SynIC messages/events processing
4506 --------------------------------------------
4518 Target: whether this is a per-vcpu or per-vm capability.
4531 Returns: 0 on success; -1 on error
4535 were invented by Mac-on-Linux to have a standardized communication mechanism
4546 Returns: 0 on success; -1 on error
4566 Returns: 0 on success; -1 on error
4577 addresses of mmu-type-specific data structures. The "array_len" field is an
4592 - The "params" field is of type "struct kvm_book3e_206_tlb_params".
4593 - The "array" field points to an array of type "struct
4595 - The array consists of all entries in the first TLB, followed by all
4597 - Within a TLB, entries are ordered first by increasing set number. Within a
4599 - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1)
4601 - The tsize field of mas1 shall be set to 4K on TLB0, even though the
4609 Returns: 0 on success; -1 on error
4611 This capability enables support for handling of channel I/O instructions.
4614 handled in-kernel, while the other I/O instructions are passed to userspace.
4619 Note that even though this capability is enabled per-vcpu, the complete
4627 Returns: 0 on success; -1 on error
4646 This capability connects the vcpu to an in-kernel MPIC device.
4655 This capability connects the vcpu to an in-kernel XICS device.
4663 This capability enables the in-kernel irqchip for s390. Please refer to
4672 This capability allows the use of the host Floating Point Unit by the guest. It
4695 Returns: x86: KVM_CHECK_EXTENSION returns a bit-array indicating which register
4709 - the register sets to be copied out to kvm_run are selectable
4711 - vcpu_events are available in addition to regs and sregs.
4714 function as an input bit-array field set by userspace to indicate the
4738 This capability connects the vcpu to an in-kernel XIVE device.
4741 ------------------------------------------
4763 args[1] is 0 to disable, 1 to enable in-kernel handling
4766 get handled by the kernel or not. Enabling or disabling in-kernel
4767 handling of an hcall is effective across the VM. On creation, an
4768 initial set of hcalls are enabled for in-kernel handling, which
4769 consists of those hcalls for which in-kernel handlers were implemented
4776 If the hcall number specified is not one that has an in-kernel
4788 - SENSE
4789 - SENSE RUNNING
4790 - EXTERNAL CALL
4791 - EMERGENCY SIGNAL
4792 - CONDITIONAL EMERGENCY SIGNAL
4798 old way of handling SIGP orders is used (partially in kernel and user space).
4808 return -EINVAL if the machine does not support vectors.
4815 This capability allows post-handlers for the STSI instruction. After
4816 initial handling in the kernel, KVM exits to user space with
4820 vcpu->run:
4830 @addr - guest address of STSI SYSIB
4831 @fc - function code
4832 @sel1 - selector 1
4833 @sel2 - selector 2
4834 @ar - access register number
4836 KVM handlers should exit to userspace with rc = -EREMOTE.
4841 Parameters: args[0] - number of routes reserved for userspace IOAPICs
4842 Returns: 0 on success, -1 on error
4863 Allows use of runtime-instrumentation introduced with zEC12 processor.
4864 Will return -EINVAL if the machine does not support runtime-instrumentation.
4865 Will return -EBUSY if a VCPU has already been created.
4870 Parameters: args[0] - features that should be enabled
4871 Returns: 0 on success, -EINVAL when args[0] contains invalid features
4880 allowing the use of 32-bit APIC IDs. See KVM_CAP_X2APIC_API in their
4887 where 0xff represents CPUs 0-7 in cluster 0.
4896 mechanism e.g. to realize 2-byte software breakpoints. The kernel will
4907 Returns: 0 on success; -EINVAL if the machine does not support
4908 guarded storage; -EBUSY if a VCPU has already been created.
4917 Allow use of adapter-interruption suppression.
4918 Returns: 0 on success; -EBUSY if a VCPU has already been created.
4945 machine check handling routine. Without this capability KVM will
4952 Returns: 0 on success, -EINVAL when args[0] contains invalid exits
4974 Returns: 0 on success, -EINVAL if hpage module parameter was not set
4982 hpage module parameter is not set to 1, -EINVAL is returned.
5000 Returns: 0 on success, -EINVAL when the implementation doesn't support
5001 nested-HV virtualization.
5003 HV-KVM on POWER9 and later systems allows for "nested-HV"
5005 can run using the CPU's supervisor mode (privileged non-hypervisor
5008 kvm-hv module parameter.
5016 emulated VM-exit when L1 intercepts a #PF exception that occurs in
5017 L2. Similarly, for kvm-intel only, DR6 will not be modified prior to
5018 the emulated VM-exit when L1 intercepts a #DB exception that occurs in
5041 clear and write-protect all pages that are returned as dirty.
5047 KVM_CLEAR_DIRTY_LOG ioctl can operate on a 64-page granularity rather
5065 ----------------------
5076 H_RANDOM hypercall backed by a hardware random-number generator.
5085 Hyper-V Synthetic interrupt controller(SynIC). Hyper-V SynIC is
5086 used to support Windows Hyper-V based guest paravirt drivers(VMBus).
5091 by the CPU, as it's incompatible with SynIC auto-EOI behavior.
5109 the POWER9 processor), including in-memory segment tables.
5164 Both registers and addresses are 32-bits wide.
5165 It will only be possible to run 32-bit guest code.
5167 1: MIPS64 or microMIPS64 with access only to 32-bit compatibility segments.
5168 Registers are 64-bits wide, but addresses are 32-bits wide.
5169 64-bit guest code may run but cannot access MIPS64 memory segments.
5170 It will also be possible to run 32-bit guest code.
5173 Both registers and addresses are 64-bits wide.
5174 It will be possible to run 64-bit or 32-bit guest code.
5180 that if userspace creates a VM without an in-kernel interrupt controller, it
5181 will be notified of changes to the output level of in-kernel emulated devices,
5184 updates the vcpu's run->s.regs.device_irq_level field to represent the actual
5190 userspace can always sample the device output level and re-compute the state of
5192 of run->s.regs.device_irq_level on every kvm exit.
5193 The value in run->s.regs.device_irq_level can represent both level and edge
5195 signals will exit to userspace with the bit in run->s.regs.device_irq_level
5198 The field run->s.regs.device_irq_level is available independent of
5199 run->kvm_valid_regs or run->kvm_dirty_regs bits.
5203 and thereby which bits in in run->s.regs.device_irq_level can signal values.
5209 KVM_ARM_DEV_EL1_VTIMER - EL1 virtual timer
5210 KVM_ARM_DEV_EL1_PTIMER - EL1 physical timer
5211 KVM_ARM_DEV_PMU - ARM PMU overflow interrupt signal
5230 This capability enables a newer version of Hyper-V Synthetic interrupt
5232 doesn't clear SynIC message and event flags pages when they are enabled by
5272 use copy-on-write semantics as well as dirty pages tracking via read-only page
5287 This capability indicates that KVM supports paravirtualized Hyper-V TLB Flush
5309 This capability indicates that KVM supports paravirtualized Hyper-V IPI send
5316 This capability indicates that KVM running on top of Hyper-V hypervisor
5318 hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM.
5319 Due to the different ABI for hypercall parameters between Hyper-V and
5321 handling by KVM (as some KVM hypercall may be mistakenly treated as TLB
5322 flush hypercalls by Hyper-V) so userspace should disable KVM identification
5323 in CPUID and only exposes Hyper-V identification. In this case, guest
5324 thinks it's running on Hyper-V and only use Hyper-V hypercalls.