From 58474fc3a56058e6db818eabd8b0adfa5b2f077e Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Fri, 10 Oct 2025 11:54:20 +0200 Subject: executor: fix setup_cpuid() declaration Make sure setup_cpuid() is only declared together with install_user_code() --- executor/common_kvm_amd64.h | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit mrf-deployment