From af24b0505c748561efb50f1d03c824d6642f6c0b Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Fri, 16 Feb 2024 15:45:33 +0100 Subject: executor: arm64: call KVM_ARM_PREFERRED_TARGET on vmfd instead of cpufd --- executor/common_kvm_arm64.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'executor') diff --git a/executor/common_kvm_arm64.h b/executor/common_kvm_arm64.h index 201fa87e9..6369cdd81 100644 --- a/executor/common_kvm_arm64.h +++ b/executor/common_kvm_arm64.h @@ -66,8 +66,10 @@ static volatile long syz_kvm_setup_cpu(volatile long a0, volatile long a1, volat } struct kvm_vcpu_init init; - ioctl(cpufd, KVM_ARM_PREFERRED_TARGET, &init); + // Queries KVM for preferred CPU target type. + ioctl(vmfd, KVM_ARM_PREFERRED_TARGET, &init); init.features[0] = features; + // Use the modified struct kvm_vcpu_init to initialize the virtual CPU. ioctl(cpufd, KVM_ARM_VCPU_INIT, &init); if (text_size > 1000) -- cgit mrf-deployment