aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_kvm_arm64.h
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2024-02-16 15:45:33 +0100
committerAlexander Potapenko <glider@google.com>2024-04-18 06:27:32 +0000
commitaf24b0505c748561efb50f1d03c824d6642f6c0b (patch)
tree39f9bc6c2b0b2e559d96bb19f176b230af9afa19 /executor/common_kvm_arm64.h
parentbd38b692cfb82df95728b979e5f3572112aa005b (diff)
executor: arm64: call KVM_ARM_PREFERRED_TARGET on vmfd instead of cpufd
Diffstat (limited to 'executor/common_kvm_arm64.h')
-rw-r--r--executor/common_kvm_arm64.h4
1 files changed, 3 insertions, 1 deletions
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)