diff options
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_kvm_ppc64.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/executor/common_kvm_ppc64.h b/executor/common_kvm_ppc64.h index 26ccc118d..1063e587b 100644 --- a/executor/common_kvm_ppc64.h +++ b/executor/common_kvm_ppc64.h @@ -391,14 +391,14 @@ static volatile long syz_kvm_setup_cpu(volatile long a0, volatile long a1, volat // Hypercalls need to be enable so we enable them all here to // allow fuzzing #define MAX_HCALL 0x450 - for (unsigned hcall = 4; hcall < MAX_HCALL; hcall += 4) { - struct kvm_enable_cap cap = { - .cap = KVM_CAP_PPC_ENABLE_HCALL, - .flags = 0, - .args = {hcall, 1}, - }; - ioctl(vmfd, KVM_ENABLE_CAP, &cap); - } + for (unsigned hcall = 4; hcall < MAX_HCALL; hcall += 4) + kvm_vm_enable_cap(vmfd, KVM_CAP_PPC_ENABLE_HCALL, hcall, 1); + + for (unsigned hcall = 0xf000; hcall < 0xf810; hcall += 4) + kvm_vm_enable_cap(vmfd, KVM_CAP_PPC_ENABLE_HCALL, hcall, 1); + + for (unsigned hcall = 0xef00; hcall < 0xef20; hcall += 4) + kvm_vm_enable_cap(vmfd, KVM_CAP_PPC_ENABLE_HCALL, hcall, 1); // Only a few of many RTAS calls are actually in the KVM and the rest // are handled in QEMU, enable the KVM handling for those 4 here. |
