aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/dev_kvm_riscv64.txt
blob: c6ecde793455cfe440beb213224a315dfc509a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright 2026 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

# RISCV64-specific KVM syscall declarations.

meta arches["riscv64"]

include <uapi/linux/kvm.h>

ioctl$KVM_SET_GUEST_DEBUG_riscv64(fd fd_kvmcpu, cmd const[KVM_SET_GUEST_DEBUG], arg ptr[in, kvm_guest_debug[kvm_guest_debug_arch_riscv64]])

kvm_guest_debug_arch_riscv64 {
	reg	array[int64, 8]
}

syz_kvm_setup_cpu$riscv64(fd fd_kvmvm, cpufd fd_kvmcpu, usermem vma[24], text ptr[in, array[kvm_text_riscv64, 1]], ntext len[text], flags const[0], opts ptr[in, array[kvm_setup_opt_riscv64, 1]], nopt len[opts])

kvm_setup_opt_riscv64 [
# unions need at least 2 fields, but we have only 1 now, but we want to have it as union for future extention
	featur1	kvm_setup_opt_riscv64_feature
	featur2	kvm_setup_opt_riscv64_feature
]

kvm_setup_opt_riscv64_feature {
	typ	const[1, int64]
	val	int64
}

kvm_text_riscv64 {
	typ	const[0, intptr]
	text	ptr[in, text[riscv64]]
	size	len[text, intptr]
}