aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2025-10-10 11:54:20 +0200
committerAlexander Potapenko <glider@google.com>2025-10-17 06:51:20 +0000
commit58474fc3a56058e6db818eabd8b0adfa5b2f077e (patch)
treeef5847afde722f1c71ada6ba1d883747c477f7ea /executor
parente69835fc40b5e00c0996ce3a85d8287eea57d162 (diff)
executor: fix setup_cpuid() declaration
Make sure setup_cpuid() is only declared together with install_user_code()
Diffstat (limited to 'executor')
-rw-r--r--executor/common_kvm_amd64.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/executor/common_kvm_amd64.h b/executor/common_kvm_amd64.h
index 3e5200137..e0c4a68a2 100644
--- a/executor/common_kvm_amd64.h
+++ b/executor/common_kvm_amd64.h
@@ -462,7 +462,9 @@ static void setup_gdt_ldt_pg(struct kvm_syz_vm* vm, int cpufd)
ioctl(cpufd, KVM_SET_SREGS, &sregs);
}
+#endif
+#if SYZ_EXECUTOR || __NR_syz_kvm_add_vcpu
static void setup_cpuid(int cpufd)
{
int kvmfd = open("/dev/kvm", O_RDWR);