aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_kvm.txt.const
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: rework ioctl$KVM_SET_GUEST_DEBUGAlexander Potapenko2025-09-191-0/+1
| | | | | | | | | | This ioctl accepts an arch-specific struct as an argument, so better split it into several arch-specific ioctls. To avoid compilation errors on exotic arches like MIPS, this patch also adds sys/linux/dev_kvm_extra.txt that takes care of them. While at it, also define KVM_GUESTDBG_USE_HW.
* sys/linux/dev_kvm.txt: define KVM_GET_STATS_FDAlexander Potapenko2025-07-211-0/+1
| | | | | This is mostly for the sake of completeness, other KVM ioctls do not interact with the created FD anyway.
* executor/kvm: separate x86(-64) descriptionsMarios Pomonis2025-04-231-151/+0
| | | | | | This commit moves the various x86/amd64 ioctl descriptions and their relevant structs/flags to the architecture-specific file and updates the corresponding const files.
* sys/linux: update auto descriptions and constsDmitry Vyukov2025-04-091-1/+1
| | | | Update auto.txt and consts on v6.15-rc1.
* sys/linux: update and remove obsolete constsMarios Pomonis2025-04-031-1/+1
| | | | | | | This commit removes CRYPTO_ALG_TYPE_COMPRESS from socket_alg.txt since it was recently removed from the kernel source tree (fce8b8d crypto: remove obsolete 'comp' compression API). It also updates a number of other consts that make extract detected.
* sys/linux: move some ARM-specific descriptions to a separate fileAlexander Potapenko2024-11-261-153/+0
| | | | | | | | | | | | | | This is done to solve a particular test failure running: $ tools/syz-env go test ./prog -run TestSpecialStructs , which failed on PPC64, because prog/rand.go instanciated a call to syz_kvm_setup_syzos_vm(), which requested too much memory (1024 pages) from the allocator (PPC64 uses 64k pages, so the number of available pages is lower). On the other hand, factoring out syzos-related descriptions is probably a nice thing to do anyway.
* sys/linux/dev_kvm.txt: support SYZOS_API_ITS_SEND_CMDAlexander Potapenko2024-11-261-0/+12
|
* sys/linux: use GICD/GICR register offsets in SYZOS_API_MEMWRITEAlexander Potapenko2024-09-271-0/+62
| | | | | In addition to random offsets passed to SYZOS_API_MEMWRITE, use VGICv3 distributor/redistributor base and offsets of the corresponding registers.
* sys/linux/dev_kvm.txt: pass flags to ioctl$KVM_IRQFDAlexander Potapenko2024-09-111-0/+2
| | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-irqfd for more details.
* sys/linux/dev_kvm.txt: minor flag changesAlexander Potapenko2024-09-111-0/+2
| | | | | - use specific flags in kvm_msi and kvm_irq_routing_entry - add KVM_IRQ_ROUTING_XEN_EVTCHN to kvm_irq_routing_entry_type
* sys/linux/dev_kvm.txt: pass clock IDs to KVM_GET_CLOCK/KVM_SET_CLOCKAlexander Potapenko2024-09-111-0/+3
| | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-get-clock for more info.
* sys/linux/dev_kvm.txt: declare ioctl$KVM_ARM_PREFERRED_TARGETAlexander Potapenko2024-09-111-0/+1
| | | | | | Despite it only reads data from the kernel, and CPU creation is anyway handled by syz_kvm_setup_cpu(), adding this ioctl will increase coverage and potentially trigger interactions with KVM_ARM_VCPU_INIT.
* sys/linux/dev_kvm.txt: declare ioctl$KVM_RESET_DIRTY_RINGSAlexander Potapenko2024-09-111-0/+1
| | | | | | This ioctl is mentioned at https://docs.kernel.org/virt/kvm/api.html#kvm-cap-dirty-log-ring-kvm-cap-dirty-log-ring-acq-rel, but doesn't have its own doc entry.
* sys/linux/dev_kvm.txt: declare ioctl$KVM_GET_XSAVE2Alexander Potapenko2024-09-111-0/+1
| | | | This is an x86-only ioctl: https://docs.kernel.org/virt/kvm/api.html#kvm-get-xsave2
* sys/linux/dev_kvm.txt: declare ioctl$KVM_SET_MEMORY_ATTRIBUTESAlexander Potapenko2024-09-111-0/+2
| | | | | According to https://docs.kernel.org/virt/kvm/api.html#kvm-set-memory-attributes, this is an x86-only ioctl.
* sys/linux/dev_kvm.txt: correctly pass ARM64 CPU featuresAlexander Potapenko2024-09-111-0/+7
| | | | | | Certain ioctls accept CPU features as numbers in the range 0..6 (aka KVM_ARM_VCPU_POWER_OFF..KVM_ARM_VCPU_SVE), whereas other ioctls accept them as a bit mask.
* sys/linux/dev_kvm.txt: add PSCI constants from uapi/linux/psci.hAlexander Potapenko2024-09-111-0/+33
|
* sys/linux/dev_kvm.txt: update KVM capabilitiesAlexander Potapenko2024-09-111-0/+37
| | | | | | | | Add the capabilities described in https://docs.kernel.org/virt/kvm/api.html, but previously missing from the descriptions. Most of these are VM capabilities for x86 and arm64, apart from KVM_CAP_SYNC_REGS, which is a VCPU capability. VM/VCPU attribution is poorly documented, so I referred to LXR to figure that out.
* sys/linux/dev_kvm.txt: declare ARM_SMCCC_ constants from arm-smccc.hAlexander Potapenko2024-09-101-0/+16
| | | | | | KVM provides a number of vendor-specific hypercall functions that are hard to discover without explicitly listing their IDs in the descriptions file.
* sys/linux/dev_kvm.txt: declare ioctl$KVM_SET_USER_MEMORY_REGION2Alexander Potapenko2024-09-061-0/+2
| | | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-set-user-memory-region2 for more details
* sys/linux/dev_kvm.txt: declare ioctl$KVM_CREATE_GUEST_MEMFDAlexander Potapenko2024-09-061-0/+1
| | | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-create-guest-memfd for more details
* sys/linux/dev_kvm.txt: declare ioctl$KVM_PRE_FAULT_MEMORYAlexander Potapenko2024-09-061-0/+1
| | | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-pre-fault-memory for details
* sys/linux/dev_kvm.txt: declare ioctl$KVM_ARM_SET_COUNTER_OFFSETAlexander Potapenko2024-09-061-0/+1
| | | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-arm-set-counter-offset for more details.
* sys/linux/dev_kvm.txt: declare ioctl$KVM_ARM_VCPU_FINALIZE()Alexander Potapenko2024-09-061-0/+1
| | | | See https://docs.kernel.org/virt/kvm/api.html#kvm-arm-vcpu-finalize for details
* sys/linux: add missing constants for KVM_ARM_VCPU_INITAlexander Potapenko2024-09-061-0/+3
| | | | | Add KVM_ARM_VCPU_PTRAUTH_ADDRESS, KVM_ARM_VCPU_PTRAUTH_GENERIC, KVM_ARM_VCPU_SVE from https://docs.kernel.org/virt/kvm/api.html#kvm-arm-vcpu-init
* sys/linux/dev_kvm.txt: declare KVM_CLEAR_DIRTY_LOGAlexander Potapenko2024-09-061-0/+1
|
* sys/linux: update kvm_guest_debug_flagsAlexander Potapenko2024-09-061-0/+2
| | | | | Add KVM_GUESTDBG_EXIT_PENDING (s390) and KVM_GUESTDBG_BLOCKIRQ (x86) that were previously missing.
* sys/linux: add ARM VGIC device groups/attributesAlexander Potapenko2024-09-031-0/+20
| | | | Do not specify the attribute input types for now.
* sys/linux: declare KVM_{SET,GET,HAS}_DEVICE_ATTR for VCPUsAlexander Potapenko2024-09-031-0/+12
| | | | | | According to https://docs.kernel.org/virt/kvm/devices/vcpu.html, VCPUs also have device attributes. Add descriptions for ioctls that manipulate those attributes.
* sys/linux: declare KVM_{SET,GET,HAS}_DEVICE_ATTR for VMsAlexander Potapenko2024-08-071-0/+5
| | | | | | | In addition to device FDs, certain arches (s390 and ARM64) allow applying device attributes to VM FDs (https://docs.kernel.org/virt/kvm/devices/vm.html) Add descriptions for the corresponding ioctls on ARM64, including support for setting SMCCC filters via struct kvm_smccc_filter.
* sys/linux/dev_kvm.txt: add new device typesAlexander Potapenko2024-05-151-0/+6
| | | | Update the list of device type flags to match that of Linux 6.9
* sys/linux: run make extractAlexander Potapenko2024-05-151-17/+8
| | | | | | | | | Make the following changes for extraction to succeed: - drop the KVM API constants for features removed in 6.9; - hardcode the three TUNNEL_*_OPT constants that cannot be extracted due to a header change; - hardcode the HCI_OP_* constants removed in 99fca36c8b412 ("Bluetooth: HCI: Remove HCI_AMP support"); - hardcode the L2CAP_* constants removed in e7b02296fb40 ("Bluetooth: Remove BT_HS"); - hardcode LANDLOCK_ACCESS_FS_IOCTL_DEV until it hits upstream.
* sys/linux: run make extractAleksandr Nogikh2024-01-301-7/+7
| | | | | Split out deprecated descriptions from socket_netlink_route_sched.txt. Adjust outdated descriptions.
* pkg/ast, pkg/compiler: support per-file metadataDmitry Vyukov2022-04-291-242/+242
| | | | | | | | | | | | | | | | | | | | | We have a bunch of hacks in syz-extract, syz-sysgen and syz-check with respect to description files unsupported on some arches, or that must not be part of make extract. Add 2 meta attribtues to files: meta noextract Tells `make extract` to not extract constants for this file. Though, `syz-extract` can still be invoked manually on this file. meta arches["arch1", "arch2"] Restricts this file only to the given set of architectures. `make extract` and ``make generate` will not use it on other architectures. Later we can potentially use meta attributes to specify git tree/commit that must be used for extraction. Maybe something else. Fixes #2754
* executor/common_linux: fuzz kvm_runAlexey Kardashevskiy2021-11-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Syzkaller runs KVM until it exits and this is considered the end of the KVM_RUN syscall. We can do a bit more with a VM if the exit was legit (for example MMIO access or a hypercall). In such cases the userspace emulates the request and stores the result in the kvm_run struct (mmaped from vcpu_fd) which the next KVM_RUN checks. This defines specialized mmap and syz_memcpy_off to allow Syzkaller fuzz the kvm_run struct with focus on the part where the huge union is. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com> --- Changes: v4: * defined offset/size constants * re-autogenerated dev_kvm.txt.const v3: * fixed syz_memcpy_off's src size v2: * limited changes to dev_kvm.txt instead of defining all new syz_kvm_run.
* sys/linux: extend KVM caps descriptionsDmitry Vyukov2021-10-131-0/+38
| | | | Add missing VM/CPU caps and specify type of arguments for each cap.
* sys/linux: fix KVM definesDmitry Vyukov2021-09-161-0/+5
| | | | | | We don't support # comments at the end of defines. This never worked and .const file wasn't even re-generated (otherwise it would contain ???).
* sys/linux: regenerate const filesDmitry Vyukov2020-11-131-2/+2
| | | | | Regenerate consts on upstream 585e5b17b92dead8a3aca4e3c9876fbca5f7e0ba. Fix vmw_vmci.txt const extraction.
* sys/linux: switch to the new .const formatDmitry Vyukov2020-08-131-0/+193
This reduces number of const files/lines from 1288/96599 to 158/11603. Const files are generated on next-20200813. Update #1983