5 #include <linux/ioctl.h>
11 static const struct ioctl kvm_ioctls
[] = {
12 IOCTL(KVM_SET_MEMORY_REGION
),
13 IOCTL(KVM_CREATE_VCPU
),
14 IOCTL(KVM_GET_DIRTY_LOG
),
15 IOCTL(KVM_SET_NR_MMU_PAGES
),
16 IOCTL(KVM_GET_NR_MMU_PAGES
),
17 IOCTL(KVM_SET_USER_MEMORY_REGION
),
18 IOCTL(KVM_SET_TSS_ADDR
),
19 IOCTL(KVM_SET_IDENTITY_MAP_ADDR
),
20 IOCTL(KVM_S390_UCAS_MAP
),
21 IOCTL(KVM_S390_UCAS_UNMAP
),
22 IOCTL(KVM_S390_VCPU_FAULT
),
23 IOCTL(KVM_CREATE_IRQCHIP
),
25 IOCTL(KVM_GET_IRQCHIP
),
26 IOCTL(KVM_SET_IRQCHIP
),
27 IOCTL(KVM_CREATE_PIT
),
28 IOCTL(KVM_IRQ_LINE_STATUS
),
29 IOCTL(KVM_REGISTER_COALESCED_MMIO
),
30 IOCTL(KVM_UNREGISTER_COALESCED_MMIO
),
31 IOCTL(KVM_ASSIGN_PCI_DEVICE
),
32 IOCTL(KVM_ASSIGN_IRQ
),
33 IOCTL(KVM_ASSIGN_DEV_IRQ
),
34 IOCTL(KVM_REINJECT_CONTROL
),
35 IOCTL(KVM_DEASSIGN_PCI_DEVICE
),
36 IOCTL(KVM_ASSIGN_SET_MSIX_NR
),
37 IOCTL(KVM_ASSIGN_SET_MSIX_ENTRY
),
38 IOCTL(KVM_DEASSIGN_DEV_IRQ
),
40 IOCTL(KVM_CREATE_PIT2
),
41 IOCTL(KVM_SET_BOOT_CPU_ID
),
45 IOCTL(KVM_PPC_GET_PVINFO
),
46 IOCTL(KVM_SET_TSC_KHZ
),
47 IOCTL(KVM_GET_TSC_KHZ
),
48 IOCTL(KVM_ASSIGN_SET_INTX_MASK
),
49 IOCTL(KVM_SIGNAL_MSI
),
51 IOCTL(KVM_SET_MEMORY_ALIAS
),
56 IOCTL(KVM_SET_GSI_ROUTING
),
57 IOCTL(KVM_XEN_HVM_CONFIG
),
63 IOCTL(KVM_SET_CPUID2
),
64 IOCTL(KVM_GET_CPUID2
),
65 IOCTL(KVM_X86_SET_MCE
),
66 IOCTL(KVM_GET_VCPU_EVENTS
),
67 IOCTL(KVM_SET_VCPU_EVENTS
),
68 IOCTL(KVM_GET_DEBUGREGS
),
69 IOCTL(KVM_SET_DEBUGREGS
),
75 #if defined(__powerpc__)
76 IOCTL(KVM_PPC_GET_SMMU_INFO
),
77 IOCTL(KVM_PPC_ALLOCATE_HTAB
),
78 IOCTL(KVM_CREATE_SPAPR_TCE
),
79 IOCTL(KVM_ALLOCATE_RMA
),
80 IOCTL(KVM_PPC_GET_HTAB_FD
),
82 #if defined(__arm__) || defined(__aarch64__)
83 IOCTL(KVM_ARM_SET_DEVICE_ADDR
),
84 IOCTL(KVM_ARM_VCPU_INIT
),
93 IOCTL(KVM_DEBUG_GUEST
),
94 IOCTL(KVM_SET_SIGNAL_MASK
),
97 IOCTL(KVM_TPR_ACCESS_REPORTING
),
98 IOCTL(KVM_SET_VAPIC_ADDR
),
100 IOCTL(KVM_S390_INTERRUPT
),
101 IOCTL(KVM_S390_STORE_STATUS
),
102 IOCTL(KVM_S390_SET_INITIAL_PSW
),
103 IOCTL(KVM_S390_INITIAL_RESET
),
105 IOCTL(KVM_GET_MP_STATE
),
106 IOCTL(KVM_SET_MP_STATE
),
108 IOCTL(KVM_SET_GUEST_DEBUG
),
109 IOCTL(KVM_X86_SETUP_MCE
),
110 IOCTL(KVM_X86_GET_MCE_CAP_SUPPORTED
),
111 IOCTL(KVM_IA64_VCPU_GET_STACK
),
112 IOCTL(KVM_IA64_VCPU_SET_STACK
),
113 IOCTL(KVM_ENABLE_CAP
),
114 IOCTL(KVM_DIRTY_TLB
),
115 IOCTL(KVM_GET_ONE_REG
),
116 IOCTL(KVM_SET_ONE_REG
),
117 IOCTL(KVM_KVMCLOCK_CTRL
),
118 IOCTL(KVM_GET_REG_LIST
),
121 static const char *const kvm_devs
[] = {
125 static const struct ioctl_group kvm_grp
= {
128 .devs_cnt
= ARRAY_SIZE(kvm_devs
),
129 .sanitise
= pick_random_ioctl
,
130 .ioctls
= kvm_ioctls
,
131 .ioctls_cnt
= ARRAY_SIZE(kvm_ioctls
),
134 REG_IOCTL_GROUP(kvm_grp
)