From 680688040fc26d17a49a9663fbbd6a716c6247b6 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Thu, 19 Nov 2020 21:01:35 +1100 Subject: pkg/ifuzz/powerpc: add powerpc support This adds KVM's syz_kvm_setup_cpu pseudo syscall. This adds placeholder for options (none implemented yet). This adds instruction generator for ifuzz; this also adds a few pseudo instructions to simulate super/hyper/ultracalls (a PPC64/pseries platform thing). The insns.go is generated from PowerISA_public.v3.0B.pdf [1] by a horrendous python3 script on top of pdftotext. The ISA covers POWER9 which is the latest available POWER CPU at the moment. The next ISA for POWER10 is quite different and we will deal with it later. The // comment after every instruction is a fixed opcode list for verification purposes. This does not define DecodeExt as there is no obvious replacement of the Intel XED library for POWERPC (gapstone-capstone, later, may be). [1] https://openpowerfoundation.org/?resource_lib=power-isa-version-3-0 Signed-off-by: Alexey Kardashevskiy --- executor/common_linux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index acb3acde7..16b78e99a 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -2905,6 +2905,8 @@ error_clear_loop: #include "common_kvm_amd64.h" #elif GOARCH_arm64 #include "common_kvm_arm64.h" +#elif GOARCH_ppc64 || GOARCH_ppc64le +#include "common_kvm_ppc64.h" #elif !GOARCH_arm static long syz_kvm_setup_cpu(volatile long a0, volatile long a1, volatile long a2, volatile long a3, volatile long a4, volatile long a5, volatile long a6, volatile long a7) { -- cgit mrf-deployment