• Home
  • Raw
  • Download

Lines Matching +full:0 +full:x86

108       x86 includes both i386 and x86_64.
148 You probably want to use 0 as machine type.
150 X86:
153 Supported X86 VM types can be queried via KVM_CAP_VM_TYPES.
178 address used by the VM. The IPA_Bits is encoded in bits[7-0] of the
188 0 Implies default size, 40bits (for backward compatibility)
211 :Architectures: x86
214 :Returns: 0 on success; -1 on error
228 __u32 indices[0];
256 :Returns: 0 if unsupported; 1 (or some other positive integer) if supported
261 Generally 0 means no and 1 means yes, but some extensions may report
300 :Parameters: vcpu id (apic id on x86)
304 The vcpu id is an integer in the range [0, max_vcpu_id).
348 :Returns: 0 on success, -1 on error
363 since the last call to this ioctl. Bit 0 is the first page in the
386 :Returns: 0 on success, -1 on error
401 obtained by mmap()ing the vcpu fd at offset 0, with the size given by
413 :Returns: 0 on success, -1 on error
419 /* x86 */
453 :Returns: 0 on success, -1 on error
464 :Architectures: x86, ppc
467 :Returns: 0 on success, -1 on error
473 /* x86 */
495 :Architectures: x86, ppc
498 :Returns: 0 on success, -1 on error
508 :Architectures: x86
511 :Returns: 0 on success, -1 on error
535 :Architectures: x86, ppc, mips, riscv, loongarch
538 :Returns: 0 on success, negative on failure.
550 X86:
556 0 on success,
634 :Architectures: x86
656 struct kvm_msr_entry entries[0];
674 :Architectures: x86
696 :Architectures: x86
699 :Returns: 0 on success, -1 on error
728 struct kvm_cpuid_entry entries[0];
739 :Returns: 0 on success, -1 on error
754 __u8 sigset[0];
762 :Architectures: x86, loongarch
765 :Returns: 0 on success, -1 on error
771 /* x86: for KVM_GET_FPU and KVM_SET_FPU */
800 :Architectures: x86, loongarch
803 :Returns: 0 on success, -1 on error
809 /* x86: for KVM_GET_FPU and KVM_SET_FPU */
838 :Architectures: x86, arm64, s390
841 :Returns: 0 on success, -1 on error
844 On x86, creates a virtual ioapic, a virtual PIC (two PICs, nested), and sets up
845 future vcpus to have a local APIC. IRQ routing for GSIs 0-15 is set to both
860 :Architectures: x86, arm64
863 :Returns: 0 on success, -1 on error
868 interrupts require the level to be set to 1 and then back to 0.
872 means active (asserted), 0 means inactive (deasserted).
874 x86 allows the operating system to program the interrupt polarity
877 active-low interrupts, the above convention is now valid on x86 too.
889 bits: | 31 ... 28 | 27 ... 24 | 23 ... 16 | 15 ... 0 |
895 out-of-kernel GIC: irq_id 0 is IRQ, irq_id 1 is FIQ
921 __u32 level; /* 0 or 1 */
929 :Architectures: x86
932 :Returns: 0 on success, -1 on error
940 __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */
954 :Architectures: x86
957 :Returns: 0 on success, -1 on error
965 __u32 chip_id; /* 0 = PIC1, 1 = PIC2, 2 = IOAPIC */
979 :Architectures: x86
982 :Returns: 0 on success, -1 on error
1025 :Architectures: x86
1028 :Returns: 0 on success, -1 on error
1075 :Architectures: x86
1078 :Returns: 0 on success, -1 on error
1111 :Architectures: x86, arm64
1114 :Returns: 0 on success, -1 on error
1116 X86:
1234 :Architectures: x86, arm64
1237 :Returns: 0 on success, -1 on error
1239 X86:
1300 :Architectures: x86
1303 :Returns: 0 on success, -1 on error
1322 :Architectures: x86
1325 :Returns: 0 on success, -1 on error
1340 :Returns: 0 on success, -1 on error
1353 #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0)
1357 memory slot. Bits 0-15 of "slot" specify the slot id and this value
1416 :Architectures: x86
1419 :Returns: 0 on success, -1 on error
1436 :Architectures: mips, ppc, s390, x86, loongarch
1439 :Returns: 0 on success; -1 on error
1445 :Returns: 0 on success; -1 on error
1470 A bitfield indicating future enhancements. Has to be 0 for now.
1491 :Architectures: x86, s390, arm64, riscv, loongarch
1494 :Returns: 0 on success; -1 on error
1509 [x86,arm64,riscv,loongarch]
1511 which has not yet received an INIT signal [x86]
1513 now ready for a SIPI [x86]
1515 is waiting for an interrupt [x86]
1517 accessible via KVM_GET_VCPU_EVENTS) [x86]
1528 On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1572 :Architectures: x86, s390, arm64, riscv, loongarch
1575 :Returns: 0 on success; -1 on error
1580 On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1597 :Architectures: x86
1600 :Returns: 0 on success, -1 on error
1608 Setting the address to 0 will result in resetting the address to its default
1609 (0xfffbc000).
1621 :Architectures: x86
1624 :Returns: 0 on success, -1 on error
1628 is vcpu 0. This ioctl has to be called before vcpu creation,
1636 :Architectures: x86
1639 :Returns: 0 on success, -1 on error
1646 __u32 extra[0];
1656 :Architectures: x86
1659 :Returns: 0 on success, -1 on error
1666 __u32 extra[0];
1677 contents of CPUID leaf 0xD on the host.
1684 :Architectures: x86
1687 :Returns: 0 on success, -1 on error
1711 :Architectures: x86
1714 :Returns: 0 on success, -1 on error
1738 :Architectures: x86
1741 :Returns: 0 on success, -1 on error
1748 struct kvm_cpuid_entry2 entries[0];
1751 #define KVM_CPUID_FLAG_SIGNIFCANT_INDEX BIT(0)
1766 This ioctl returns x86 cpuid features which are supported by both the
1830 :Returns: 0 on success, !0 on error
1851 #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)
1857 :Architectures: x86 s390 arm64
1860 :Returns: 0 on success, -1 on error
1873 struct kvm_irq_routing_entry entries[0];
1932 On x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS
1934 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
1971 :Architectures: x86
1974 :Returns: 0 on success, -1 on error
1987 :Architectures: x86
2001 :Architectures: x86
2004 :Returns: 0 on success, -1 on error
2008 #define KVM_APIC_REG_SIZE 0x400
2032 :Architectures: x86
2035 :Returns: 0 on success, -1 on error
2039 #define KVM_APIC_REG_SIZE 0x400
2059 :Returns: 0 on success, !0 on error
2070 __u32 len; /* 0, 1, 2, 4, or 8 bytes */
2105 :Returns: 0 on success, -1 on error
2125 The array is little-endian: the bit 0 is the least significant bit of the
2213 :Architectures: x86
2216 :Returns: 0 on success, -1 on error
2243 :Returns: 0 in case of success
2265 :Returns: 0 in case of success
2287 :Returns: 0 in case of success
2305 :Returns: 0 on success, negative value on failure
2522 MIPS KVM_REG_MIPS_CP0_MAAR(0..63) 64
2526 MIPS KVM_REG_MIPS_FPR_32(0..31) 32
2527 MIPS KVM_REG_MIPS_FPR_64(0..31) 64
2528 MIPS KVM_REG_MIPS_VEC_128(0..31) 128
2540 0x4020 0000 0010 <index into the kvm_regs struct:16>
2544 0x4020 0000 000F <zero:1> <crn:4> <crm:4> <opc1:4> <opc2:3>
2548 0x4030 0000 000F <zero:1> <zero:4> <crm:4> <opc1:4> <zero:3>
2552 0x4020 0000 0011 00 <csselr:8>
2556 0x4020 0000 0012 1 <regno:12>
2560 0x4030 0000 0012 0 <regno:12>
2564 0x4030 0000 0014 <regno:16>
2575 0x60x0 0000 0010 <index into the kvm_regs struct:16>
2582 0x6030 0000 0010 0000 X0 64 regs.regs[0]
2583 0x6030 0000 0010 0002 X1 64 regs.regs[1]
2585 0x6030 0000 0010 003c X30 64 regs.regs[30]
2586 0x6030 0000 0010 003e SP 64 regs.sp
2587 0x6030 0000 0010 0040 PC 64 regs.pc
2588 0x6030 0000 0010 0042 PSTATE 64 regs.pstate
2589 0x6030 0000 0010 0044 SP_EL1 64 sp_el1
2590 0x6030 0000 0010 0046 ELR_EL1 64 elr_el1
2591 0x6030 0000 0010 0048 SPSR_EL1 64 spsr[KVM_SPSR_EL1] (alias SPSR_SVC)
2592 0x6030 0000 0010 004a SPSR_ABT 64 spsr[KVM_SPSR_ABT]
2593 0x6030 0000 0010 004c SPSR_UND 64 spsr[KVM_SPSR_UND]
2594 0x6030 0000 0010 004e SPSR_IRQ 64 spsr[KVM_SPSR_IRQ]
2595 0x6030 0000 0010 0050 SPSR_FIQ 64 spsr[KVM_SPSR_FIQ]
2596 0x6040 0000 0010 0054 V0 128 fp_regs.vregs[0] [1]_
2597 0x6040 0000 0010 0058 V1 128 fp_regs.vregs[1] [1]_
2599 0x6040 0000 0010 00d0 V31 128 fp_regs.vregs[31] [1]_
2600 0x6020 0000 0010 00d4 FPSR 32 fp_regs.fpsr
2601 0x6020 0000 0010 00d5 FPCR 32 fp_regs.fpcr
2607 The equivalent register content can be accessed via bits [127:0] of
2613 0x6020 0000 0011 00 <csselr:8>
2617 0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
2631 0x6030 0000 0014 <regno:16>
2635 0x6080 0000 0015 00 <n:5> <slice:5> Zn bits[2048*slice + 2047 : 2048*slice]
2636 0x6050 0000 0015 04 <n:4> <slice:5> Pn bits[256*slice + 255 : 256*slice]
2637 0x6050 0000 0015 060 <slice:5> FFR bits[256*slice + 255 : 256*slice]
2638 0x6060 0000 0015 ffff KVM_REG_ARM64_SVE_VLS pseudo-register
2694 0x6030 0000 0016 <regno:16>
2716 0x7030 0000 0000 <reg:16>
2721 0x7020 0000 0001 00 <reg:5> <sel:3> (32-bit)
2722 0x7030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2733 0x7030 0000 0001 01 <reg:8>
2737 0x7030 0000 0002 <reg:16>
2747 0x7020 0000 0003 00 <0:3> <reg:5> (32-bit FPU registers)
2748 0x7030 0000 0003 00 <0:3> <reg:5> (64-bit FPU registers)
2749 0x7040 0000 0003 00 <0:3> <reg:5> (128-bit MSA vector registers)
2754 0x7020 0000 0003 01 <0:3> <reg:5>
2759 0x7020 0000 0003 02 <0:3> <reg:5>
2767 0x8020 0000 01 <index into the kvm_riscv_config struct:24> (32bit Host)
2768 0x8030 0000 01 <index into the kvm_riscv_config struct:24> (64bit Host)
2775 0x80x0 0000 0100 0000 isa ISA feature bitmap of Guest VCPU
2785 0x8020 0000 02 <index into the kvm_riscv_core struct:24> (32bit Host)
2786 0x8030 0000 02 <index into the kvm_riscv_core struct:24> (64bit Host)
2793 0x80x0 0000 0200 0000 regs.pc Program counter
2794 0x80x0 0000 0200 0001 regs.ra Return address
2795 0x80x0 0000 0200 0002 regs.sp Stack pointer
2796 0x80x0 0000 0200 0003 regs.gp Global pointer
2797 0x80x0 0000 0200 0004 regs.tp Task pointer
2798 0x80x0 0000 0200 0005 regs.t0 Caller saved register 0
2799 0x80x0 0000 0200 0006 regs.t1 Caller saved register 1
2800 0x80x0 0000 0200 0007 regs.t2 Caller saved register 2
2801 0x80x0 0000 0200 0008 regs.s0 Callee saved register 0
2802 0x80x0 0000 0200 0009 regs.s1 Callee saved register 1
2803 0x80x0 0000 0200 000a regs.a0 Function argument (or return value) 0
2804 0x80x0 0000 0200 000b regs.a1 Function argument (or return value) 1
2805 0x80x0 0000 0200 000c regs.a2 Function argument 2
2806 0x80x0 0000 0200 000d regs.a3 Function argument 3
2807 0x80x0 0000 0200 000e regs.a4 Function argument 4
2808 0x80x0 0000 0200 000f regs.a5 Function argument 5
2809 0x80x0 0000 0200 0010 regs.a6 Function argument 6
2810 0x80x0 0000 0200 0011 regs.a7 Function argument 7
2811 0x80x0 0000 0200 0012 regs.s2 Callee saved register 2
2812 0x80x0 0000 0200 0013 regs.s3 Callee saved register 3
2813 0x80x0 0000 0200 0014 regs.s4 Callee saved register 4
2814 0x80x0 0000 0200 0015 regs.s5 Callee saved register 5
2815 0x80x0 0000 0200 0016 regs.s6 Callee saved register 6
2816 0x80x0 0000 0200 0017 regs.s7 Callee saved register 7
2817 0x80x0 0000 0200 0018 regs.s8 Callee saved register 8
2818 0x80x0 0000 0200 0019 regs.s9 Callee saved register 9
2819 0x80x0 0000 0200 001a regs.s10 Callee saved register 10
2820 0x80x0 0000 0200 001b regs.s11 Callee saved register 11
2821 0x80x0 0000 0200 001c regs.t3 Caller saved register 3
2822 0x80x0 0000 0200 001d regs.t4 Caller saved register 4
2823 0x80x0 0000 0200 001e regs.t5 Caller saved register 5
2824 0x80x0 0000 0200 001f regs.t6 Caller saved register 6
2825 0x80x0 0000 0200 0020 mode Privilege mode (1 = S-mode or 0 = U-mode)
2831 0x8020 0000 03 <index into the kvm_riscv_csr struct:24> (32bit Host)
2832 0x8030 0000 03 <index into the kvm_riscv_csr struct:24> (64bit Host)
2839 0x80x0 0000 0300 0000 sstatus Supervisor status
2840 0x80x0 0000 0300 0001 sie Supervisor interrupt enable
2841 0x80x0 0000 0300 0002 stvec Supervisor trap vector base
2842 0x80x0 0000 0300 0003 sscratch Supervisor scratch register
2843 0x80x0 0000 0300 0004 sepc Supervisor exception program counter
2844 0x80x0 0000 0300 0005 scause Supervisor trap cause
2845 0x80x0 0000 0300 0006 stval Supervisor bad address or instruction
2846 0x80x0 0000 0300 0007 sip Supervisor interrupt pending
2847 0x80x0 0000 0300 0008 satp Supervisor address translation and protection
2853 0x8030 0000 04 <index into the kvm_riscv_timer struct:24>
2860 0x8030 0000 0400 0000 frequency Time base frequency (read-only)
2861 0x8030 0000 0400 0001 time Time value visible to Guest
2862 0x8030 0000 0400 0002 compare Time compare programmed by Guest
2863 0x8030 0000 0400 0003 state Time compare state (1 = ON or 0 = OFF)
2869 0x8020 0000 05 <index into the __riscv_f_ext_state struct:24>
2876 0x8020 0000 0500 0000 f[0] Floating point register 0
2878 0x8020 0000 0500 001f f[31] Floating point register 31
2879 0x8020 0000 0500 0020 fcsr Floating point control and status register
2885 0x8020 0000 06 <index into the __riscv_d_ext_state struct:24> (fcsr)
2886 0x8030 0000 06 <index into the __riscv_d_ext_state struct:24> (non-fcsr)
2893 0x8030 0000 0600 0000 f[0] Floating point register 0
2895 0x8030 0000 0600 001f f[31] Floating point register 31
2896 0x8020 0000 0600 0020 fcsr Floating point control and status register
2905 0x9030 0000 0001 00 <reg:5> <sel:3> (64-bit)
2910 0x9030 0000 0002 <reg:16>
2920 :Returns: 0 on success, negative value on failure
2947 :Architectures: Any that implement pvclocks (currently x86 only)
2950 :Returns: 0 on success, -1 on error
2971 :Architectures: x86 arm64
2974 :Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error
3000 On x86, address_hi is ignored unless the KVM_X2APIC_API_USE_32BIT_IDS
3002 address_hi bits 31-8 provide bits 31-8 of the destination id. Bits 7-0 of
3010 :Architectures: x86
3013 :Returns: 0 on success, -1 on error
3043 :Architectures: x86
3046 :Returns: 0 on success, -1 on error
3060 #define KVM_PIT_FLAGS_HPET_LEGACY 0x00000001
3062 #define KVM_PIT_FLAGS_SPEAKER_DATA_ON 0x00000002
3071 :Architectures: x86
3074 :Returns: 0 on success, -1 on error
3089 :Returns: 0 on success, -1 on error
3128 __u32 page_shift; /* Base page shift of segment (or 0) */
3133 An entry with a "page_shift" of 0 is unused. Because the array is
3145 8 entries sorted by increasing sizes and an entry with a "0" shift
3149 __u32 page_shift; /* Page shift (or 0) */
3161 :Architectures: x86 s390 arm64
3164 :Returns: 0 on success, -1 on error
3203 :Returns: 0 on success, -1 on error
3240 :Returns: 0 on success, -1 on error
3295 :Returns: file descriptor number (>= 0) on success, -1 on error
3312 #define KVM_GET_HTAB_BOLTED_ONLY ((__u64)0x1)
3313 #define KVM_GET_HTAB_WRITE ((__u64)0x2)
3350 :Returns: 0 on success, -1 on error
3388 :Architectures: x86, arm64, s390
3391 :Returns: 0 on success, -1 on error
3427 :Returns: 0 on success, -1 on error
3450 :Returns: 0 on success; -1 on error
3470 - General Purpose registers, including PC and SP: set to 0
3471 - FPSIMD/NEON registers: set to 0
3472 - SVE registers: set to 0
3548 :Returns: 0 on success; -1 on error
3577 :Returns: 0 on success; -1 on error
3590 __u64 reg[0];
3604 :Returns: 0 on success, -1 on error
3631 bits: | 63 ... 32 | 31 ... 16 | 15 ... 0 |
3632 field: | 0x00000000 | device id | addr type id |
3653 :Returns: 0 on success, -1 on error
3661 handled by the kernel. If the token value is 0, then any token
3670 :Architectures: x86, s390, ppc, arm64
3673 :Returns: 0 on success; -1 on error
3694 - KVM_GUESTDBG_USE_SW_BP: using software breakpoints [x86, arm64]
3695 - KVM_GUESTDBG_USE_HW_BP: using hardware breakpoints [x86, s390]
3697 - KVM_GUESTDBG_INJECT_DB: inject DB type exception [x86]
3698 - KVM_GUESTDBG_INJECT_BP: inject BP type exception [x86]
3700 - KVM_GUESTDBG_BLOCKIRQ: avoid injecting interrupts/NMI/SMI [x86]
3731 :Architectures: x86
3734 :Returns: 0 on success, -1 on error
3741 struct kvm_cpuid_entry2 entries[0];
3748 #define KVM_CPUID_FLAG_SIGNIFCANT_INDEX BIT(0)
3763 This ioctl returns x86 cpuid features which are emulated by
3809 :Returns: = 0 on success,
3810 < 0 on generic error (e.g. -EFAULT or -ENOMEM),
3839 be 0). The maximum value for "size" can be obtained by checking the
3849 be set to 0.
3866 range is 0..15.
3890 prohibited given the access key designated by "key"; the valid range is 0..15.
3892 is > 0.
3954 :Returns: 0 on success, KVM_S390_GET_SKEYS_NONE if guest is not using storage
3986 :Returns: 0 on success, negative value on error
4014 :Returns: 0 on success, -1 on error
4075 -EINVAL if buffer size is 0,
4095 the kernel never checked for flags == 0 and QEMU never pre-zeroed flags and
4109 :Returns: 0 on success,
4136 len must be a multiple of sizeof(struct kvm_s390_irq). It must be > 0
4144 :Architectures: x86
4147 :Returns: 0 on success, -1 on error
4155 :Architectures: x86
4158 :Returns: 0 on success, < 0 on error
4163 #define KVM_MSR_FILTER_READ (1 << 0)
4168 __u8 *bitmap; /* a 1 bit allows the operations in flags, 0 denies */
4173 #define KVM_MSR_FILTER_DEFAULT_ALLOW (0 << 0)
4174 #define KVM_MSR_FILTER_DEFAULT_DENY (1 << 0)
4183 Filter read accesses to MSRs using the given bitmap. A 0 in the bitmap
4190 Filter write accesses to MSRs using the given bitmap. A 0 in the bitmap
4229 Calling this ioctl with an empty set of ranges (all nmsrs == 0) disables MSR
4301 :Architectures: x86
4304 :Returns: 0 on success,
4321 pit_reinject = 0 (!reinject mode) is recommended, unless running an old
4331 :Returns: 0 on success,
4365 :Returns: 0 on success,
4389 will have 0 in the page_shift field.
4402 :Returns: 0 on successful completion,
4403 >0 if a new HPT is being prepared, the value is an estimated
4422 If called with shift > 0 when there is no pending HPT for the guest,
4433 * If preparation of the pending HPT is already complete, return 0
4439 If called with shift == 0, discards any currently pending HPT and
4440 returns 0 (i.e. cancels any in-progress preparation).
4446 it returns <= 0. The first call will initiate preparation, subsequent
4456 :Returns: 0 on successful completion,
4480 returned 0 with the same parameters. In other cases
4498 :Architectures: x86
4501 :Returns: 0 on success, -1 on error
4511 :Architectures: x86
4514 :Returns: 0 on success,
4530 :Architectures: x86
4533 :Returns: 0 on success,
4567 :Returns: 0 on success, a negative value on error
4654 still remaining, or 0 if KVM_S390_CMMA_PEEK is set and migration mode is
4668 :Returns: 0 on success, a negative value on error
4693 flags is not used and must be 0.
4704 if the flags field was not 0, with -EFAULT if the userspace address is
4716 :Returns: 0 on successful completion,
4741 (ori 30,30,0 or mtspr SPRN_TRIG2,rN), whether the L1 data cache is set
4744 whether a speculation barrier instruction (ori 31,31,0) is provided.
4760 :Architectures: x86
4763 :Returns: 0 on success; -1 on error
4771 Documentation/virt/kvm/x86/amd-memory-encryption.rst.
4777 :Architectures: x86
4780 :Returns: 0 on success; -1 on error
4801 :Architectures: x86
4804 :Returns: 0 on success; -1 on error
4813 :Architectures: x86
4833 #define KVM_HYPERV_CONN_ID_MASK 0x00ffffff
4837 #define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)
4839 :Returns: 0 on success,
4848 :Architectures: x86
4851 :Returns: 0 on success, -1 on error
4876 struct kvm_vmx_nested_state_data vmx[0];
4877 struct kvm_svm_nested_state_data svm[0];
4881 #define KVM_STATE_NESTED_GUEST_MODE 0x00000001
4882 #define KVM_STATE_NESTED_RUN_PENDING 0x00000002
4883 #define KVM_STATE_NESTED_EVMCS 0x00000004
4885 #define KVM_STATE_NESTED_FORMAT_VMX 0
4888 #define KVM_STATE_NESTED_VMX_VMCS_SIZE 0x1000
4890 #define KVM_STATE_NESTED_VMX_SMM_GUEST_MODE 0x00000001
4891 #define KVM_STATE_NESTED_VMX_SMM_VMXON 0x00000002
4893 #define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
4922 :Architectures: x86
4925 :Returns: 0 on success, -1 on error
4938 :Returns: 0 on success, < 0 on error
4963 :Architectures: x86, arm64, mips
4966 :Returns: 0 on success, -1 on error
4983 field. Bit 0 of the bitmap corresponds to page "first_page" in the
5005 :Architectures: x86
5008 :Returns: 0 on success, -1 on error
5015 struct kvm_cpuid_entry2 entries[0];
5029 This ioctl returns x86 cpuid features leaves related to Hyper-V emulation in
5037 leaves (0x40000000, 0x40000001).
5078 :Returns: 0 on success, -1 on error
5118 :Architectures: x86
5121 :Returns: 0 on success, -1 on error
5126 EFAULT args[0] cannot be accessed
5127 EINVAL args[0] contains invalid data in the filter or filter events
5140 __u64 events[0];
5153 ``0``
5175 7:0 event select (low bits)
5209 #define KVM_PMU_EVENT_ALLOW 0
5237 :Returns: 0 on successful completion,
5261 :Returns: 0
5273 :Returns: 0
5286 :Returns: 0
5300 :Returns: 0 on success, < 0 on error
5309 __u32 flags; /* flags for future extensions. Must be 0 for now */
5317 code. If KVM changes `rc`, its value will always be greater than 0
5318 hence setting it to 0 before issuing a PV command is advised to be
5500 :Architectures: x86
5503 :Returns: 0 on success, < 0 on error
5623 :Architectures: x86
5626 :Returns: 0 on success, < 0 on error
5636 :Architectures: x86
5639 :Returns: 0 on success, < 0 on error
5750 :Architectures: x86
5753 :Returns: 0 on success, < 0 on error
5768 :Returns: number of bytes copied, < 0 on error (-EINVAL for incorrect
5803 :Architectures: x86
5806 :Returns: 0 on success, -1 on error
5836 :Architectures: x86
5839 :Returns: 0 on success, -1 on error
5852 :Returns: statistics file descriptor on success, < 0 on error
5875 Apart from the header starting at offset 0, please be aware that it is
5898 The ``flags`` field is not used at the moment. It is always read as 0.
5901 (including trailing '\0') which is contained in the "id string" block and
5919 trailing ``'\0'``, is indicated by the ``name_size`` field in the header.
5926 #define KVM_STATS_TYPE_SHIFT 0
5927 #define KVM_STATS_TYPE_MASK (0xF << KVM_STATS_TYPE_SHIFT)
5928 #define KVM_STATS_TYPE_CUMULATIVE (0x0 << KVM_STATS_TYPE_SHIFT)
5929 #define KVM_STATS_TYPE_INSTANT (0x1 << KVM_STATS_TYPE_SHIFT)
5930 #define KVM_STATS_TYPE_PEAK (0x2 << KVM_STATS_TYPE_SHIFT)
5931 #define KVM_STATS_TYPE_LINEAR_HIST (0x3 << KVM_STATS_TYPE_SHIFT)
5932 #define KVM_STATS_TYPE_LOG_HIST (0x4 << KVM_STATS_TYPE_SHIFT)
5936 #define KVM_STATS_UNIT_MASK (0xF << KVM_STATS_UNIT_SHIFT)
5937 #define KVM_STATS_UNIT_NONE (0x0 << KVM_STATS_UNIT_SHIFT)
5938 #define KVM_STATS_UNIT_BYTES (0x1 << KVM_STATS_UNIT_SHIFT)
5939 #define KVM_STATS_UNIT_SECONDS (0x2 << KVM_STATS_UNIT_SHIFT)
5940 #define KVM_STATS_UNIT_CYCLES (0x3 << KVM_STATS_UNIT_SHIFT)
5941 #define KVM_STATS_UNIT_BOOLEAN (0x4 << KVM_STATS_UNIT_SHIFT)
5945 #define KVM_STATS_BASE_MASK (0xF << KVM_STATS_BASE_SHIFT)
5946 #define KVM_STATS_BASE_POW10 (0x0 << KVM_STATS_BASE_SHIFT)
5947 #define KVM_STATS_BASE_POW2 (0x1 << KVM_STATS_BASE_SHIFT)
5963 Bits 0-3 of ``flags`` encode the type:
5991 [0, 1), while the range of the last bucket is [pow(2, ``size``-2), +INF).
6009 It indicates that the statistic will always be either 0 or 1. Boolean
6010 statistics of "peak" type will never go back from 1 to 0. Boolean
6043 the trailing ``'\0'``, is indicated by ``name_size`` in the header.
6052 :Architectures: x86
6055 :Returns: 0 on success, -1 on error
6062 __u32 extra[0];
6073 of CPUID leaf 0xD on the host.
6079 :Architectures: x86
6082 :Returns: 0 on success, < 0 on error
6102 :Returns: 0 on success, < 0 on error
6127 :Returns: 0 on success, <0 on error
6165 set to 0s by userspace.
6174 :Returns: 0 on success, < 0 on error
6196 Any value other than 0 for the "reserved" field may result in an error
6214 :Returns: 0 on success, < 0 on error
6219 #define KVM_ARM_FEATURE_ID_RANGE 0
6240 The ``reserved[13]`` array is reserved for future use and should be 0, or
6243 KVM_ARM_FEATURE_ID_RANGE (0)
6247 op0==3, op1=={0, 1, 3}, CRn==0, CRm=={0-7}, op2=={0-7}.
6262 :Returns: 0 on success, -1 on error
6297 is '0' for all gfns. Userspace can control whether memory is shared/private by
6310 :Architectures: x86
6313 :Returns: 0 on success, <0 on error
6340 The "flags" field is reserved for future extensions and must be '0'.
6349 :Returns: A file descriptor on success, <0 on error
6392 :Returns: 0 if at least one page is processed, < 0 on error
6433 remaining range. If `size` > 0 on return, the caller can just issue
6484 When KVM_RUN has returned successfully (return value 0), this informs
6509 /* x86, set if the VCPU is in system management mode */
6510 #define KVM_RUN_X86_SMM (1 << 0)
6511 /* x86, set if bus lock detected in VM */
6513 /* x86, set if the VCPU is executing a nested (L2) guest */
6517 #define KVM_DEBUG_ARCH_HSR_HIGH_VALID (1 << 0)
6572 #define KVM_EXIT_IO_IN 0
6642 It is strongly recommended that userspace use ``KVM_EXIT_IO`` (x86) or
6661 conduit to initiate the SMCCC call. If this bit is 0 then the guest
6665 instruction to initiate the SMCCC call. If this bit is 0 then the
6667 bit set to 0.
6843 The guest physical address of the guest's GHCB is stored in `data[0]`.
6854 - for arm64, data[0] is set to KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 if
6858 - for RISC-V, data[0] is set to the value of the second argument of the
6862 field is now aliased to `data[0]`. Userspace can assume that it is only
6863 written if ndata is greater than 0.
7009 Used on x86 systems. When the VM capability KVM_CAP_X86_USER_SPACE_MSR is
7108 accompanies a return code of '-1', not '0'! errno will always be set to EFAULT
7116 #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0)
7120 Used on x86 systems. When the VM capability KVM_CAP_X86_NOTIFY_VMEXIT is
7177 x86 includes both i386 and x86_64.
7196 :Returns: 0 on success; -1 on error
7212 :Returns: 0 on success; -1 on error
7232 :Parameters: args[0] is the address of a struct kvm_config_tlb
7233 :Returns: 0 on success; -1 on error
7280 :Returns: 0 on success; -1 on error
7298 :Parameters: args[0] defines whether the proxy facility is active
7299 :Returns: 0 on success; -1 on error
7304 When enabled (args[0] != 0), every time the guest gets an external interrupt
7308 When disabled (args[0] == 0), behavior is as if this facility is unsupported.
7316 :Parameters: args[0] is the MPIC device fd;
7326 :Parameters: args[0] is the XICS device fd;
7346 :Parameters: args[0] is reserved for future use (should be 0).
7360 :Parameters: args[0] is reserved for future use (should be 0).
7371 :Architectures: s390, x86
7372 :Target: s390: always enabled, x86: vcpu
7374 :Returns: x86: KVM_CHECK_EXTENSION returns a bit-array indicating which register
7376 (bitfields defined in arch/x86/include/uapi/asm/kvm.h).
7388 For x86:
7394 For x86, the 'kvm_valid_regs' field of struct kvm_run is overloaded to
7419 :Parameters: args[0] is the XIVE device fd;
7436 x86 includes both i386 and x86_64.
7450 :Parameters: args[0] is the sPAPR hcall number;
7451 args[1] is 0 to disable, 1 to enable in-kernel handling
7495 :Returns: 0 on success, negative value on error
7534 :Architectures: x86
7535 :Parameters: args[0] - number of routes reserved for userspace IOAPICs
7536 :Returns: 0 on success, -1 on error
7545 used in the IRQ routing table. The first args[0] MSI routes are reserved
7565 :Architectures: x86
7566 :Parameters: args[0] - features that should be enabled
7567 :Returns: 0 on success, -EINVAL when args[0] contains invalid features
7569 Valid feature flags in args[0] are::
7571 #define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0)
7580 in logical mode or with more than 255 VCPUs. Otherwise, KVM treats 0xff
7583 where 0xff represents CPUs 0-7 in cluster 0.
7591 With this capability enabled, all illegal instructions 0x0000 (2 bytes) will
7605 :Returns: 0 on success; -EINVAL if the machine does not support
7617 :Returns: 0 on success; -EBUSY if a VCPU has already been created.
7630 be 0. A successful call to enable this capability will result in
7647 branch to guests' 0x200 interrupt vector.
7652 :Architectures: x86
7653 :Parameters: args[0] defines which exits are disabled
7654 :Returns: 0 on success, -EINVAL when args[0] contains invalid exits
7656 Valid bits in args[0] are::
7658 #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
7677 :Returns: 0 on success, -EINVAL if hpage module parameter was not set
7693 :Architectures: x86
7694 :Parameters: args[0] whether feature should be enabled or not
7705 :Returns: 0 on success, -EINVAL when the implementation doesn't support
7718 :Architectures: x86
7719 :Parameters: args[0] whether feature should be enabled or not
7744 :Architectures: x86, arm64, mips
7745 :Parameters: args[0] whether feature should be enabled or not
7749 #define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0)
7775 x86 and arm64 for now).
7805 :Parameters: args[0] is the maximum poll time in nanoseconds
7806 :Returns: 0 on success; -1 on error
7819 :Architectures: x86
7821 :Parameters: args[0] contains the mask of KVM_MSR_EXIT_REASON_* events to report
7822 :Returns: 0 on success; -1 on error
7833 args[0] and would trigger a #GP inside the guest will instead trigger
7851 :Architectures: x86
7853 :Parameters: args[0] defines the policy used when bus locks detected in guest
7854 :Returns: 0 on success, -EINVAL when args[0] contains invalid bits
7856 Valid bits in args[0] are::
7858 #define KVM_BUS_LOCK_DETECTION_OFF (1 << 0)
7892 :Returns: 0 on success, -EINVAL when CPU doesn't support 2nd DAWR
7901 Architectures: x86 SEV enabled
7903 Parameters: args[0] is the fd of the source vm
7904 Returns: 0 on success; ENOTTY on error
7917 :Architectures: x86
7919 :Parameters: args[0] is a file handle of a SGX attribute file in securityfs
7920 :Returns: 0 on success, -EINVAL if the file handle is invalid or if a requested
7924 more privileged enclave attributes. args[0] must hold a file handle to a valid
7935 See Documentation/arch/x86/sgx.rst for more details.
7958 :Architectures: x86
7959 :Parameters: args[0] whether the feature should be enabled or not
8001 :Architectures: x86 SEV enabled
8003 :Parameters: args[0] is the fd of the source vm
8004 :Returns: 0 on success
8030 :Parameters: args[0] - set of KVM quirks to disable
8031 :Architectures: x86
8044 The valid bits in cap.args[0] are:
8048 LINT0 register is 0x700 (APIC_MODE_EXTINT).
8050 is 0x10000 (APIC_LVT_MASKED).
8068 to port 0x7e. When this quirk is disabled,
8115 :Architectures: x86
8117 :Parameters: args[0] - maximum APIC ID value set for current VM
8118 :Returns: 0 on success, -EINVAL if args[0] is beyond KVM_MAX_VCPU_IDS
8136 :Architectures: x86
8138 :Parameters: args[0] is the value of notify window as well as some flags
8139 :Returns: 0 on success, -EINVAL if args[0] contains invalid flags or notify
8142 Bits 63:32 of args[0] are used for notify window.
8143 Bits 31:0 of args[0] are for some flags. Valid bits are::
8145 #define KVM_X86_NOTIFY_VMEXIT_ENABLED (1 << 0)
8150 When userspace sets KVM_X86_NOTIFY_VMEXIT_ENABLED bit in args[0], VMM will
8155 If KVM_X86_NOTIFY_VMEXIT_USER is set in args[0], upon notify VM exits happen,
8165 :Architectures: x86
8186 :Architectures: x86
8188 :Parameters: args[0] is the desired APIC bus clock rate, in nanoseconds
8189 :Returns: 0 on success, -EINVAL if args[0] contains an invalid value for the
8197 Note: Userspace is responsible for correctly configuring CPUID 0x15, a.k.a. the
8198 core crystal clock frequency, if a non-zero CPUID 0x15 is exposed to the guest.
8203 :Architectures: x86
8234 :Architectures: x86
8288 0 The trap & emulate implementation is in use to run guest code in user
8304 assisted virtualisation is also available. KVM_VM_MIPS_TE (0) must be passed
8324 0 MIPS32 or microMIPS32.
8366 number larger than 0 indicating the version of this capability is implemented
8394 :Architectures: x86
8404 :Architectures: x86
8458 :Architectures: x86
8483 :Architectures: x86
8492 :Architectures: x86
8496 hypercalls are handled by Level 0 hypervisor (Hyper-V) bypassing KVM.
8526 :Architectures: arm64, x86
8534 For x86 see Documentation/virt/kvm/x86/msr.rst "MSR_KVM_STEAL_TIME".
8546 The information is associated with the DIAGNOSE 0x318 instruction, which sets
8559 :Architectures: x86
8570 :Architectures: x86
8584 Architectures: x86
8588 (0x40000001). Otherwise, a guest may use the paravirtual features
8594 :Architectures: x86, arm64
8595 :Parameters: args[0] - size of the dirty log ring
8612 #define KVM_DIRTY_GFN_F_DIRTY BIT(0)
8614 #define KVM_DIRTY_GFN_F_MASK 0x3
8644 ``01b`` to ``1Xb`` (bit 0 will be ignored by KVM, but bit 1 must be set
8680 Architecture with TSO-like ordering (such as x86) are allowed to
8718 :Architectures: x86
8723 #define KVM_XEN_HVM_CONFIG_HYPERCALL_MSR (1 << 0)
8817 Architectures: x86
8822 Hyper-V identification is set in the HYPERV_CPUID_INTERFACE (0x40000001)
8829 :Architectures: x86
8848 :Architectures: x86
8850 :Parameters: arg[0] is bitmask of PMU virtualization capabilities.
8851 :Returns: 0 on success, -EINVAL when arg[0] contains invalid bits
8864 should adjust CPUID leaf 0xA to reflect that the PMU is disabled.
8893 :Architectures: x86
8895 :Parameters: arg[0] must be 0.
8896 :Returns: 0 on success, -EPERM if the userspace process does not
8897 have CAP_SYS_BOOT, -EINVAL if args[0] is not 0 or any vCPUs have been
8916 PTF instruction with function codes 0 or 1 and the STSI(15,1,x)
8937 :Parameters: arg[0] is the new split chunk size.
8938 :Returns: 0 on success, -EINVAL if any memslot was already created.
8956 0, to disable the eager page splitting.
8962 :Architectures: x86
8968 #define KVM_X86_DEFAULT_VM 0
8988 9.1. x86
9016 0x0b and 0x1f for Intel systems, 0x8000001e for AMD systems. Different
9022 the APIC ID is found in EDX for all subleaves of 0x0b and 0x1f, and in EAX
9023 for 0x8000001e; the latter also encodes the core id and node id in bits
9024 7:0 of EBX and ECX respectively.