From d0146e983c25f3614e06561c0bf34c1d1aa70f33 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 12 Nov 2016 12:40:54 -0800 Subject: [PATCH] sys: improve kvm descriptions --- sys/kvm.txt | 260 +++++++++++++++++++++++++++++++++++++----- sys/kvm_amd64.const | 18 +++ sys/kvm_arm64.const | 12 ++ sys/kvm_ppc64le.const | 12 ++ 4 files changed, 273 insertions(+), 29 deletions(-) diff --git a/sys/kvm.txt b/sys/kvm.txt index 96e73d74..81bfda2d 100644 --- a/sys/kvm.txt +++ b/sys/kvm.txt @@ -17,6 +17,7 @@ ioctl$KVM_CHECK_EXTENSION(fd fd_kvm, cmd const[KVM_CHECK_EXTENSION], arg intptr) ioctl$KVM_GET_VCPU_MMAP_SIZE(fd fd_kvm, cmd const[KVM_GET_VCPU_MMAP_SIZE]) ioctl$KVM_GET_SUPPORTED_CPUID(fd fd_kvm, cmd const[KVM_GET_SUPPORTED_CPUID], arg buffer[out]) ioctl$KVM_GET_EMULATED_CPUID(fd fd_kvmvm, cmd const[KVM_GET_EMULATED_CPUID], arg buffer[out]) +ioctl$KVM_X86_GET_MCE_CAP_SUPPORTED(fd fd_kvmvm, cmd const[KVM_X86_GET_MCE_CAP_SUPPORTED], arg buffer[out]) ioctl$KVM_CREATE_VCPU(fd fd_kvmvm, cmd const[KVM_CREATE_VCPU], id intptr) fd_kvmcpu ioctl$KVM_CHECK_EXTENSION_VM(fd fd_kvmvm, cmd const[KVM_CHECK_EXTENSION], arg intptr) @@ -24,15 +25,16 @@ ioctl$KVM_SET_MEMORY_REGION(fd fd_kvmvm, cmd const[KVM_SET_MEMORY_REGION], type ioctl$KVM_GET_DIRTY_LOG(fd fd_kvmvm, cmd const[KVM_GET_DIRTY_LOG], arg ptr[in, kvm_dirty_log]) ioctl$KVM_CREATE_IRQCHIP(fd fd_kvmvm, cmd const[KVM_CREATE_IRQCHIP]) ioctl$KVM_IRQ_LINE(fd fd_kvmvm, cmd const[KVM_IRQ_LINE], arg ptr[in, kvm_irq_level]) -ioctl$KVM_GET_IRQCHIP(fd fd_kvmvm, cmd const[KVM_GET_IRQCHIP], arg buffer[out]) -ioctl$KVM_SET_IRQCHIP(fd fd_kvmvm, cmd const[KVM_SET_IRQCHIP], arg buffer[in]) +ioctl$KVM_IRQ_LINE_STATUS(fd fd_kvmvm, cmd const[KVM_IRQ_LINE_STATUS], arg ptr[in, kvm_irq_level]) +ioctl$KVM_GET_IRQCHIP(fd fd_kvmvm, cmd const[KVM_GET_IRQCHIP], arg ptr[out, kvm_irq_chip]) +ioctl$KVM_SET_IRQCHIP(fd fd_kvmvm, cmd const[KVM_SET_IRQCHIP], arg ptr[in, kvm_irq_chip]) ioctl$KVM_XEN_HVM_CONFIG(fd fd_kvmvm, cmd const[KVM_XEN_HVM_CONFIG], arg ptr[in, kvm_xen_hvm_config]) ioctl$KVM_GET_CLOCK(fd fd_kvmvm, cmd const[KVM_GET_CLOCK], arg ptr[out, kvm_clock_data]) ioctl$KVM_SET_CLOCK(fd fd_kvmvm, cmd const[KVM_SET_CLOCK], arg ptr[in, kvm_clock_data]) ioctl$KVM_SET_USER_MEMORY_REGION(fd fd_kvmvm, cmd const[KVM_SET_USER_MEMORY_REGION], arg ptr[in, kvm_userspace_memory_region]) -ioctl$KVM_SET_TSS_ADDR(fd fd_kvmvm, cmd const[KVM_SET_TSS_ADDR], arg ptr[in, int64]) +ioctl$KVM_SET_TSS_ADDR(fd fd_kvmvm, cmd const[KVM_SET_TSS_ADDR], arg flags[kvm_x86_tss_addr]) ioctl$KVM_ENABLE_CAP(fd fd_kvmvm, cmd const[KVM_ENABLE_CAP], arg ptr[in, kvm_enable_cap]) -ioctl$KVM_SET_IDENTITY_MAP_ADDR(fd fd_kvmvm, cmd const[KVM_SET_IDENTITY_MAP_ADDR], arg ptr[in, intptr]) +ioctl$KVM_SET_IDENTITY_MAP_ADDR(fd fd_kvmvm, cmd const[KVM_SET_IDENTITY_MAP_ADDR], arg ptr[in, flags[kvm_guest_addrs, int64]]) ioctl$KVM_SET_BOOT_CPU_ID(fd fd_kvmvm, cmd const[KVM_SET_BOOT_CPU_ID], arg ptr[in, intptr]) ioctl$KVM_PPC_GET_PVINFO(fd fd_kvmvm, cmd const[KVM_PPC_GET_PVINFO], arg buffer[out]) ioctl$KVM_ASSIGN_PCI_DEVICE(fd fd_kvmvm, cmd const[KVM_ASSIGN_PCI_DEVICE], arg ptr[in, kvm_assigned_pci_dev]) @@ -56,24 +58,31 @@ ioctl$KVM_CREATE_DEVICE(fd fd_kvmvm, cmd const[KVM_CREATE_DEVICE], arg ptr[inout ioctl$KVM_SET_DEVICE_ATTR(fd fd_kvmvm, cmd const[KVM_SET_DEVICE_ATTR], arg ptr[in, kvm_device_attr]) ioctl$KVM_GET_DEVICE_ATTR(fd fd_kvmvm, cmd const[KVM_GET_DEVICE_ATTR], arg ptr[in, kvm_device_attr]) ioctl$KVM_HAS_DEVICE_ATTR(fd fd_kvmvm, cmd const[KVM_HAS_DEVICE_ATTR], arg ptr[in, kvm_device_attr]) +ioctl$KVM_REGISTER_COALESCED_MMIO(fd fd_kvmvm, cmd const[KVM_REGISTER_COALESCED_MMIO], arg ptr[in, kvm_coalesced_mmio_zone]) +ioctl$KVM_UNREGISTER_COALESCED_MMIO(fd fd_kvmvm, cmd const[KVM_UNREGISTER_COALESCED_MMIO], arg ptr[in, kvm_coalesced_mmio_zone]) +ioctl$KVM_SET_NR_MMU_PAGES(fd fd_kvmvm, cmd const[KVM_SET_NR_MMU_PAGES], arg intptr) +ioctl$KVM_GET_NR_MMU_PAGES(fd fd_kvmvm, cmd const[KVM_GET_NR_MMU_PAGES], arg intptr) +ioctl$KVM_REINJECT_CONTROL(fd fd_kvmvm, cmd const[KVM_REINJECT_CONTROL], arg ptr[in, kvm_reinject_control]) ioctl$KVM_RUN(fd fd_kvmcpu, cmd const[KVM_RUN]) -ioctl$KVM_GET_REGS(fd fd_kvmcpu, cmd const[KVM_GET_REGS], arg buffer[out]) -ioctl$KVM_SET_REGS(fd fd_kvmcpu, cmd const[KVM_SET_REGS], arg buffer[in]) -ioctl$KVM_GET_SREGS(fd fd_kvmcpu, cmd const[KVM_GET_SREGS], arg buffer[out]) -ioctl$KVM_SET_SREGS(fd fd_kvmcpu, cmd const[KVM_SET_SREGS], arg buffer[in]) +ioctl$KVM_GET_REGS(fd fd_kvmcpu, cmd const[KVM_GET_REGS], arg ptr[out, kvm_regs]) +ioctl$KVM_SET_REGS(fd fd_kvmcpu, cmd const[KVM_SET_REGS], arg ptr[in, kvm_regs]) +ioctl$KVM_GET_SREGS(fd fd_kvmcpu, cmd const[KVM_GET_SREGS], arg ptr[out, kvm_sregs]) +ioctl$KVM_SET_SREGS(fd fd_kvmcpu, cmd const[KVM_SET_SREGS], arg ptr[in, kvm_sregs]) ioctl$KVM_TRANSLATE(fd fd_kvmcpu, cmd const[KVM_TRANSLATE], arg ptr[in, kvm_translation]) ioctl$KVM_INTERRUPT(fd fd_kvmcpu, cmd const[KVM_INTERRUPT], arg ptr[in, int32]) -ioctl$KVM_GET_MSRS(fd fd_kvmcpu, cmd const[KVM_GET_MSRS], arg buffer[out]) -ioctl$KVM_SET_MSRS(fd fd_kvmcpu, cmd const[KVM_SET_MSRS], arg buffer[in]) +ioctl$KVM_GET_MSRS(fd fd_kvmcpu, cmd const[KVM_GET_MSRS], arg ptr[out, kvm_msrs]) +ioctl$KVM_SET_MSRS(fd fd_kvmcpu, cmd const[KVM_SET_MSRS], arg ptr[in, kvm_msrs]) ioctl$KVM_SET_CPUID(fd fd_kvmcpu, cmd const[KVM_SET_CPUID], arg ptr[in, kvm_cpuid]) +ioctl$KVM_GET_CPUID2(fd fd_kvmcpu, cmd const[KVM_GET_CPUID2], arg ptr[out, kvm_cpuid2]) +ioctl$KVM_SET_CPUID2(fd fd_kvmcpu, cmd const[KVM_SET_CPUID2], arg ptr[in, kvm_cpuid2]) ioctl$KVM_SET_SIGNAL_MASK(fd fd_kvmcpu, cmd const[KVM_SET_SIGNAL_MASK], arg ptr[in, kvm_signal_mask]) -ioctl$KVM_GET_FPU(fd fd_kvmcpu, cmd const[KVM_GET_FPU], arg buffer[out]) -ioctl$KVM_SET_FPU(fd fd_kvmcpu, cmd const[KVM_SET_FPU], arg buffer[in]) +ioctl$KVM_GET_FPU(fd fd_kvmcpu, cmd const[KVM_GET_FPU], arg ptr[out, kvm_fpu]) +ioctl$KVM_SET_FPU(fd fd_kvmcpu, cmd const[KVM_SET_FPU], arg ptr[in, kvm_fpu]) ioctl$KVM_GET_VCPU_EVENTS(fd fd_kvmcpu, cmd const[KVM_GET_VCPU_EVENTS], arg ptr[out, kvm_vcpu_events]) ioctl$KVM_SET_VCPU_EVENTS(fd fd_kvmcpu, cmd const[KVM_SET_VCPU_EVENTS], arg ptr[in, kvm_vcpu_events]) -ioctl$KVM_GET_DEBUGREGS(fd fd_kvmcpu, cmd const[KVM_GET_DEBUGREGS], arg buffer[out]) -ioctl$KVM_SET_DEBUGREGS(fd fd_kvmcpu, cmd const[KVM_SET_DEBUGREGS], arg buffer[in]) +ioctl$KVM_GET_DEBUGREGS(fd fd_kvmcpu, cmd const[KVM_GET_DEBUGREGS], arg ptr[out, kvm_debugregs]) +ioctl$KVM_SET_DEBUGREGS(fd fd_kvmcpu, cmd const[KVM_SET_DEBUGREGS], arg ptr[in, kvm_debugregs]) ioctl$KVM_ENABLE_CAP_CPU(fd fd_kvmcpu, cmd const[KVM_ENABLE_CAP], arg ptr[in, kvm_enable_cap]) ioctl$KVM_GET_MP_STATE(fd fd_kvmcpu, cmd const[KVM_GET_MP_STATE], arg ptr[out, int32]) ioctl$KVM_SET_MP_STATE(fd fd_kvmcpu, cmd const[KVM_SET_MP_STATE], arg ptr[in, flags[kvm_mp_state, int32]]) @@ -97,6 +106,10 @@ ioctl$KVM_S390_INTERRUPT_CPU(fd fd_kvmcpu, cmd const[KVM_S390_INTERRUPT], arg pt ioctl$KVM_GET_REG_LIST(fd fd_kvmcpu, cmd const[KVM_GET_REG_LIST], arg ptr[in, kvm_reg_list]) ioctl$KVM_SET_GUEST_DEBUG(fd fd_kvmcpu, cmd const[KVM_SET_GUEST_DEBUG], arg ptr[in, kvm_guest_debug]) ioctl$KVM_SMI(fd fd_kvmcpu, cmd const[KVM_SMI]) +ioctl$KVM_TPR_ACCESS_REPORTING(fd fd_kvmcpu, cmd const[KVM_TPR_ACCESS_REPORTING], arg ptr[in, kvm_tpr_access_ctl]) +ioctl$KVM_SET_VAPIC_ADDR(fd fd_kvmcpu, cmd const[KVM_SET_VAPIC_ADDR], arg ptr[in, flags[kvm_guest_addrs, int64]]) +ioctl$KVM_X86_SETUP_MCE(fd fd_kvmcpu, cmd const[KVM_X86_SETUP_MCE], arg ptr[in, int64]) +ioctl$KVM_X86_SET_MCE(fd fd_kvmcpu, cmd const[KVM_X86_SET_MCE], arg ptr[in, kvm_x86_mce]) # TODO: extend support (there are some ioctls) openat$xenevtchn(fd const[AT_FDCWD], file ptr[in, string["/dev/xen/evtchn"]], flags flags[open_flags], mode const[0]) fd @@ -106,9 +119,21 @@ kvm_mp_state = KVM_MP_STATE_RUNNABLE, KVM_MP_STATE_UNINITIALIZED, KVM_MP_STATE_I kvm_assigned_irq_flags = KVM_DEV_IRQ_HOST_INTX, KVM_DEV_IRQ_HOST_MSI, KVM_DEV_IRQ_HOST_MSIX, KVM_DEV_IRQ_GUEST_INTX, KVM_DEV_IRQ_GUEST_MSI, KVM_DEV_IRQ_GUEST_MSIX kvm_irq_routing_entry_type = KVM_IRQ_ROUTING_IRQCHIP, KVM_IRQ_ROUTING_MSI kvm_ioeventfd_flags = KVM_IOEVENTFD_FLAG_DATAMATCH, KVM_IOEVENTFD_FLAG_PIO, KVM_IOEVENTFD_FLAG_DEASSIGN, KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY -kvm_ioeventfd_len = 1, 2, 4, 8 -kvm_device_type = KVM_DEV_TYPE_FSL_MPIC_20, KVM_DEV_TYPE_FSL_MPIC_42, KVM_DEV_TYPE_XICS, KVM_DEV_TYPE_VFIO +kvm_ioeventfd_len = 0, 1, 2, 4, 8 +kvm_device_type = KVM_DEV_TYPE_FSL_MPIC_20, KVM_DEV_TYPE_FSL_MPIC_42, KVM_DEV_TYPE_XICS, KVM_DEV_TYPE_VFIO, KVM_DEV_TYPE_FLIC +kvm_device_flags = 0, KVM_CREATE_DEVICE_TEST kvm_guest_debug_flags = KVM_GUESTDBG_ENABLE, KVM_GUESTDBG_SINGLESTEP, KVM_GUESTDBG_USE_SW_BP, KVM_GUESTDBG_USE_HW_BP, KVM_GUESTDBG_INJECT_DB, KVM_GUESTDBG_INJECT_BP +kvm_chip_id = KVM_IRQCHIP_PIC_MASTER, KVM_IRQCHIP_PIC_SLAVE, KVM_IRQCHIP_IOAPIC + +kvm_mem_slots = 0, 1, 2, 3, 4, 5, 509, 510, 511, 10000, 65536, 65537, 65538, 65539, 65540, 66047, 66048, 66049 +kvm_guest_addrs = 0x1000, 0x8000, 0xf000, 0x100000, 0x10000 +kvm_guest_addr_size = 0x1000, 0x2000, 0x4000, 0x8000, 0x10000, 0x100000 +kvm_x86_tss_addr = 0xffffffffffffd000 +kvm_x86_selector_type = 0, 1 +kvm_x86_cr0 = 1, 2, 4, 8, 16, 32, 65536, 262144, 536870912, 1073741824, 2147483648 +kvm_x86_cr4 = 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 8192, 16384, 65536, 131072, 262144, 1048576, 2097152, 4194304 +kvm_x86_efer = 1, 256, 1024, 2048, 4096, 8192, 16384, 32768 +kvm_x86_dr7 = 1, 2, 4, 8, 16, 32, 64, 128 kvm_guest_debug { ctrl flags[kvm_guest_debug_flags, int32] @@ -136,7 +161,7 @@ kvm_device_attr { kvm_create_device { type flags[kvm_device_type, int32] fd fd - flags int32 + flags flags[kvm_device_flags, int32] } kvm_s390_interrupt { @@ -181,10 +206,12 @@ kvm_pit_config { } kvm_msi { - addrlo int32 - addrhi int32 + addrlo flags[kvm_guest_addrs, int32] + addrhi flags[kvm_guest_addrs, int32] data int32 flags int32 + devid int32 + pad array[const[0, int8], 12] } kvm_one_reg { @@ -204,7 +231,7 @@ kvm_dirty_tlb { } kvm_ioeventfd { - datam int64 + datam flags[kvm_guest_addrs, int64] addr ptr[out, int64] len flags[kvm_ioeventfd_len, int32] fd fd_event @@ -282,7 +309,7 @@ kvm_assigned_pci_dev { kvm_xcr { xcr int32 - reserv int32 + reserv const[0, int32] val int64 } @@ -304,9 +331,9 @@ kvm_enable_cap { } kvm_userspace_memory_region { - slot int32 + slot flags[kvm_mem_slots, int32] flags flags[kvm_mem_region_flags, int32] - paddr int64 + paddr flags[kvm_guest_addrs, int64] size len[addr, int64] addr vma } @@ -378,28 +405,203 @@ kvm_cpuid { entries array[kvm_cpuid_entry] } +kvm_cpuid_entry2 { + func int32 + index int32 + flags int32 + eax int32 + ebx int32 + ecx int32 + edx int32 + pad array[const[0, int32], 3] +} + +kvm_cpuid2 { + n len[entries, int32] + pad const[0, int32] + entries array[kvm_cpuid_entry2] +} + kvm_translation { - laddr int64 - paddr int64 + laddr flags[kvm_guest_addrs, int64] + paddr flags[kvm_guest_addrs, int64] valid int8 write int8 umode int8 } kvm_dirty_log { - slot int32 + slot flags[kvm_mem_slots, int32] pad const[0, int32] bitmap vma } kvm_memory_region { - slot int32 + slot flags[kvm_mem_slots, int32] flags flags[kvm_mem_region_flags, int32] - pa int64 - size int64 + paddr flags[kvm_guest_addrs, int64] + size flags[kvm_guest_addr_size, int64] } kvm_msr_list { n len[indices, int32] indices array[int32] } + +kvm_regs { + gp array[int64, 16] + rip flags[kvm_guest_addrs, int64] + rflags int64 +} + +kvm_sregs { + cs kvm_segment + ds kvm_segment + es kvm_segment + fs kvm_segment + gs kvm_segment + ss kvm_segment + tr kvm_segment + ldt kvm_segment + gdt kvm_dtable + idt kvm_dtable + cr0 flags[kvm_x86_cr0, int64] + cr2 const[0, int64] +#TODO: this should point to page table + cr3 flags[kvm_guest_addrs, int64] + cr4 flags[kvm_x86_cr4, int64] + cr8 int64[0:15] + efer flags[kvm_x86_efer, int64] + apic flags[kvm_guest_addrs, int64] + intr array[int64, 4] +} + +kvm_segment { + base flags[kvm_guest_addrs, int64] + limit flags[kvm_guest_addrs, int32] + select flags[kvm_guest_addrs, int16] + type flags[kvm_x86_selector_type, int8] + preset int8 + dpl int8 + db int8 + s int8 + l int8 + g int8 + avl int8 + unusabl int8 + padding const[0, int8] +} + +kvm_dtable { + base flags[kvm_guest_addrs, int64] + limit flags[kvm_guest_addrs, int16] + pad array[const[0, int16], 3] +} + +kvm_fpu { + fpr array[const[0, int64], 16] + fcw int16 + fsw int8 + ftws int8 + pad1 const[0, int8] + opcode int16 + lastip flags[kvm_guest_addrs, int64] + lastdp flags[kvm_guest_addrs, int64] + xmm array[const[0, int64], 32] + mxcsr int32 + pad2 const[0, int32] +} + +kvm_debugregs { + db array[flags[kvm_guest_addrs, int64], 4] + dr6 int64 + dr7 flags[kvm_x86_dr7, int64] + flags int64 + reserv array[const[0, int64], 9] +} + +kvm_msrs { + nmsrs len[entries, int32] + pad const[0, int32] + entries array[kvm_msr_entry] +} [packed] + +kvm_msr_entry { + index int32 + reserv const[0, int32] + data int64 +} + +kvm_irqchip { + chipid flags[kvm_chip_id, int32] + pad const[0, int32] + chip kvm_irq_chip +} + +kvm_irq_chip [ + pic kvm_pic_state + ioapic kvm_ioapic_state +] + +kvm_pic_state { + lastirr int8 + irr int8 + imr int8 + isr int8 + padd int8 + irqbase int8 + readreg int8 + poll int8 + special int8 + initst int8 + autoeoi int8 + rotate int8 + nestedm int8 + init4 int8 + elcr int8 + elcrmas int8 +} + +kvm_ioapic_state { + base flags[kvm_guest_addrs, int64] + ioregs int32 + id int32 + irr int32 + pad const[0, int32] + redir array[kvm_ioapic_redir, 24] +} + +kvm_ioapic_redir { + vector int8 + f0 int8 + f1 int8 + reserv array[const[0, int8], 4] + destid int8 +} + +kvm_tpr_access_ctl { + enabled int32 + flags int32 + reserv array[const[0, int32], 8] +} + +kvm_x86_mce { + status int64 + addr flags[kvm_guest_addrs, int64] + misc int64 + mcg int64 + bank int8 + pad1 array[const[0, int8], 7] + pad2 array[const[0, int64], 3] +} + +kvm_reinject_control { + reinjec int8 + reserv array[const[0, int8], 31] +} + +kvm_coalesced_mmio_zone { + addr flags[kvm_guest_addrs, int64] + size flags[kvm_guest_addr_size, int32] + pad const[0, int32] +} diff --git a/sys/kvm_amd64.const b/sys/kvm_amd64.const index e52456ba..370cd54a 100644 --- a/sys/kvm_amd64.const +++ b/sys/kvm_amd64.const @@ -7,6 +7,7 @@ KVM_ASSIGN_SET_MSIX_ENTRY = 1074835060 KVM_ASSIGN_SET_MSIX_NR = 1074310771 KVM_CHECK_EXTENSION = 44547 KVM_CREATE_DEVICE = 3222056672 +KVM_CREATE_DEVICE_TEST = 1 KVM_CREATE_IRQCHIP = 44640 KVM_CREATE_PIT2 = 1077980791 KVM_CREATE_VCPU = 44609 @@ -19,6 +20,7 @@ KVM_DEV_IRQ_GUEST_MSIX = 1024 KVM_DEV_IRQ_HOST_INTX = 1 KVM_DEV_IRQ_HOST_MSI = 2 KVM_DEV_IRQ_HOST_MSIX = 4 +KVM_DEV_TYPE_FLIC = 6 KVM_DEV_TYPE_FSL_MPIC_20 = 1 KVM_DEV_TYPE_FSL_MPIC_42 = 2 KVM_DEV_TYPE_VFIO = 4 @@ -26,6 +28,7 @@ KVM_DEV_TYPE_XICS = 3 KVM_DIRTY_TLB = 1074835114 KVM_ENABLE_CAP = 1080602275 KVM_GET_CLOCK = 2150674044 +KVM_GET_CPUID2 = 3221794449 KVM_GET_DEBUGREGS = 2155916961 KVM_GET_DEVICE_ATTR = 1075359458 KVM_GET_DIRTY_LOG = 1074835010 @@ -36,6 +39,7 @@ KVM_GET_LAPIC = 2214637198 KVM_GET_MP_STATE = 2147790488 KVM_GET_MSRS = 3221794440 KVM_GET_MSR_INDEX_LIST = 3221532162 +KVM_GET_NR_MMU_PAGES = 44613 KVM_GET_ONE_REG = 1074835115 KVM_GET_PIT2 = 2154868383 KVM_GET_REGS = 2156965505 @@ -60,8 +64,12 @@ KVM_IOEVENTFD_FLAG_DATAMATCH = 1 KVM_IOEVENTFD_FLAG_DEASSIGN = 4 KVM_IOEVENTFD_FLAG_PIO = 2 KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY = 8 +KVM_IRQCHIP_IOAPIC = 2 +KVM_IRQCHIP_PIC_MASTER = 0 +KVM_IRQCHIP_PIC_SLAVE = 1 KVM_IRQFD = 1075883638 KVM_IRQ_LINE = 1074310753 +KVM_IRQ_LINE_STATUS = 3221794407 KVM_IRQ_ROUTING_IRQCHIP = 1 KVM_IRQ_ROUTING_MSI = 2 KVM_KVMCLOCK_CTRL = 44717 @@ -82,6 +90,8 @@ KVM_NMI = 44698 KVM_PPC_ALLOCATE_HTAB = 3221532327 KVM_PPC_GET_PVINFO = 1082175137 KVM_PPC_GET_SMMU_INFO = 2186325670 +KVM_REGISTER_COALESCED_MMIO = 1074835047 +KVM_REINJECT_CONTROL = 44657 KVM_RUN = 44672 KVM_S390_INTERRUPT = 1074835092 KVM_S390_UCAS_MAP = 1075359312 @@ -90,6 +100,7 @@ KVM_S390_VCPU_FAULT = 1074310738 KVM_SET_BOOT_CPU_ID = 44664 KVM_SET_CLOCK = 1076932219 KVM_SET_CPUID = 1074310794 +KVM_SET_CPUID2 = 1074310800 KVM_SET_DEBUGREGS = 1082175138 KVM_SET_DEVICE_ATTR = 1075359457 KVM_SET_FPU = 1101049485 @@ -101,6 +112,7 @@ KVM_SET_LAPIC = 1140895375 KVM_SET_MEMORY_REGION = 1075359296 KVM_SET_MP_STATE = 1074048665 KVM_SET_MSRS = 1074310793 +KVM_SET_NR_MMU_PAGES = 44612 KVM_SET_ONE_REG = 1074835116 KVM_SET_PIT2 = 1081126560 KVM_SET_REGS = 1083223682 @@ -109,12 +121,18 @@ KVM_SET_SREGS = 1094233732 KVM_SET_TSC_KHZ = 44706 KVM_SET_TSS_ADDR = 44615 KVM_SET_USER_MEMORY_REGION = 1075883590 +KVM_SET_VAPIC_ADDR = 1074310803 KVM_SET_VCPU_EVENTS = 1077980832 KVM_SET_XCRS = 1099476647 KVM_SET_XSAVE = 1342221989 KVM_SIGNAL_MSI = 1075883685 KVM_SMI = 44727 +KVM_TPR_ACCESS_REPORTING = 3223891602 KVM_TRANSLATE = 3222843013 +KVM_UNREGISTER_COALESCED_MMIO = 1074835048 +KVM_X86_GET_MCE_CAP_SUPPORTED = 2148052637 +KVM_X86_SETUP_MCE = 1074310812 +KVM_X86_SET_MCE = 1077980830 KVM_XEN_HVM_CONFIG = 1077456506 __NR_ioctl = 16 __NR_openat = 257 diff --git a/sys/kvm_arm64.const b/sys/kvm_arm64.const index df7a4b1a..b78cc8db 100644 --- a/sys/kvm_arm64.const +++ b/sys/kvm_arm64.const @@ -7,6 +7,7 @@ KVM_ASSIGN_SET_MSIX_ENTRY = 1074835060 KVM_ASSIGN_SET_MSIX_NR = 1074310771 KVM_CHECK_EXTENSION = 44547 KVM_CREATE_DEVICE = 3222056672 +KVM_CREATE_DEVICE_TEST = 1 KVM_CREATE_IRQCHIP = 44640 KVM_CREATE_PIT2 = 1077980791 KVM_CREATE_VCPU = 44609 @@ -19,6 +20,7 @@ KVM_DEV_IRQ_GUEST_MSIX = 1024 KVM_DEV_IRQ_HOST_INTX = 1 KVM_DEV_IRQ_HOST_MSI = 2 KVM_DEV_IRQ_HOST_MSIX = 4 +KVM_DEV_TYPE_FLIC = 6 KVM_DEV_TYPE_FSL_MPIC_20 = 1 KVM_DEV_TYPE_FSL_MPIC_42 = 2 KVM_DEV_TYPE_VFIO = 4 @@ -31,6 +33,7 @@ KVM_GET_DIRTY_LOG = 1074835010 KVM_GET_FPU = 2147528332 KVM_GET_IRQCHIP = 3255348834 KVM_GET_MP_STATE = 2147790488 +KVM_GET_NR_MMU_PAGES = 44613 KVM_GET_ONE_REG = 1074835115 KVM_GET_REGS = 2204151425 KVM_GET_REG_LIST = 3221794480 @@ -49,6 +52,7 @@ KVM_IOEVENTFD_FLAG_PIO = 2 KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY = 8 KVM_IRQFD = 1075883638 KVM_IRQ_LINE = 1074310753 +KVM_IRQ_LINE_STATUS = 3221794407 KVM_IRQ_ROUTING_IRQCHIP = 1 KVM_IRQ_ROUTING_MSI = 2 KVM_KVMCLOCK_CTRL = 44717 @@ -69,6 +73,8 @@ KVM_NMI = 44698 KVM_PPC_ALLOCATE_HTAB = 3221532327 KVM_PPC_GET_PVINFO = 1082175137 KVM_PPC_GET_SMMU_INFO = 2186325670 +KVM_REGISTER_COALESCED_MMIO = 1074835047 +KVM_REINJECT_CONTROL = 44657 KVM_RUN = 44672 KVM_S390_INTERRUPT = 1074835092 KVM_S390_UCAS_MAP = 1075359312 @@ -84,6 +90,7 @@ KVM_SET_IDENTITY_MAP_ADDR = 1074310728 KVM_SET_IRQCHIP = 2181607011 KVM_SET_MEMORY_REGION = 1075359296 KVM_SET_MP_STATE = 1074048665 +KVM_SET_NR_MMU_PAGES = 44612 KVM_SET_ONE_REG = 1074835116 KVM_SET_REGS = 1130409602 KVM_SET_SIGNAL_MASK = 1074048651 @@ -91,8 +98,13 @@ KVM_SET_SREGS = 1073786500 KVM_SET_TSC_KHZ = 44706 KVM_SET_TSS_ADDR = 44615 KVM_SET_USER_MEMORY_REGION = 1075883590 +KVM_SET_VAPIC_ADDR = 1074310803 KVM_SIGNAL_MSI = 1075883685 KVM_SMI = 44727 +KVM_TPR_ACCESS_REPORTING = 3223891602 KVM_TRANSLATE = 3222843013 +KVM_UNREGISTER_COALESCED_MMIO = 1074835048 +KVM_X86_GET_MCE_CAP_SUPPORTED = 2148052637 +KVM_X86_SETUP_MCE = 1074310812 __NR_ioctl = 29 __NR_openat = 56 diff --git a/sys/kvm_ppc64le.const b/sys/kvm_ppc64le.const index eb449d71..ef765c8f 100644 --- a/sys/kvm_ppc64le.const +++ b/sys/kvm_ppc64le.const @@ -7,6 +7,7 @@ KVM_ASSIGN_SET_MSIX_ENTRY = 2148576884 KVM_ASSIGN_SET_MSIX_NR = 2148052595 KVM_CHECK_EXTENSION = 536915459 KVM_CREATE_DEVICE = 3222056672 +KVM_CREATE_DEVICE_TEST = 1 KVM_CREATE_IRQCHIP = 536915552 KVM_CREATE_PIT2 = 2151722615 KVM_CREATE_VCPU = 536915521 @@ -19,6 +20,7 @@ KVM_DEV_IRQ_GUEST_MSIX = 1024 KVM_DEV_IRQ_HOST_INTX = 1 KVM_DEV_IRQ_HOST_MSI = 2 KVM_DEV_IRQ_HOST_MSIX = 4 +KVM_DEV_TYPE_FLIC = 6 KVM_DEV_TYPE_FSL_MPIC_20 = 1 KVM_DEV_TYPE_FSL_MPIC_42 = 2 KVM_DEV_TYPE_VFIO = 4 @@ -31,6 +33,7 @@ KVM_GET_DIRTY_LOG = 2148576834 KVM_GET_FPU = 1090563724 KVM_GET_IRQCHIP = 3255348834 KVM_GET_MP_STATE = 1074048664 +KVM_GET_NR_MMU_PAGES = 536915525 KVM_GET_ONE_REG = 2148576939 KVM_GET_REGS = 1099476609 KVM_GET_REG_LIST = 3221794480 @@ -50,6 +53,7 @@ KVM_IOEVENTFD_FLAG_PIO = 2 KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY = 8 KVM_IRQFD = 2149625462 KVM_IRQ_LINE = 2148052577 +KVM_IRQ_LINE_STATUS = 3221794407 KVM_IRQ_ROUTING_IRQCHIP = 1 KVM_IRQ_ROUTING_MSI = 2 KVM_KVMCLOCK_CTRL = 536915629 @@ -70,6 +74,8 @@ KVM_NMI = 536915610 KVM_PPC_ALLOCATE_HTAB = 3221532327 KVM_PPC_GET_PVINFO = 2155916961 KVM_PPC_GET_SMMU_INFO = 1112583846 +KVM_REGISTER_COALESCED_MMIO = 2148576871 +KVM_REINJECT_CONTROL = 536915569 KVM_RUN = 536915584 KVM_S390_INTERRUPT = 2148576916 KVM_S390_UCAS_MAP = 2149101136 @@ -85,6 +91,7 @@ KVM_SET_IDENTITY_MAP_ADDR = 2148052552 KVM_SET_IRQCHIP = 1107865187 KVM_SET_MEMORY_REGION = 2149101120 KVM_SET_MP_STATE = 2147790489 +KVM_SET_NR_MMU_PAGES = 536915524 KVM_SET_ONE_REG = 2148576940 KVM_SET_REGS = 2173218434 KVM_SET_SIGNAL_MASK = 2147790475 @@ -92,8 +99,13 @@ KVM_SET_SREGS = 2228268676 KVM_SET_TSC_KHZ = 536915618 KVM_SET_TSS_ADDR = 536915527 KVM_SET_USER_MEMORY_REGION = 2149625414 +KVM_SET_VAPIC_ADDR = 2148052627 KVM_SIGNAL_MSI = 2149625509 KVM_SMI = 536915639 +KVM_TPR_ACCESS_REPORTING = 3223891602 KVM_TRANSLATE = 3222843013 +KVM_UNREGISTER_COALESCED_MMIO = 2148576872 +KVM_X86_GET_MCE_CAP_SUPPORTED = 1074310813 +KVM_X86_SETUP_MCE = 2148052636 __NR_ioctl = 54 __NR_openat = 286