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/test.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'executor/test.h') diff --git a/executor/test.h b/executor/test.h index bd30fb372..37d03b65a 100644 --- a/executor/test.h +++ b/executor/test.h @@ -1,7 +1,7 @@ // Copyright 2017 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. -#if GOOS_linux && GOARCH_amd64 +#if GOOS_linux && (GOARCH_amd64 | GOARCH_ppc64 | GOARCH_ppc64le) #include "test_linux.h" #endif @@ -208,7 +208,7 @@ static struct { {"test_copyin", test_copyin}, {"test_csum_inet", test_csum_inet}, {"test_csum_inet_acc", test_csum_inet_acc}, -#if GOOS_linux && GOARCH_amd64 +#if GOOS_linux && (GOARCH_amd64 || GOARCH_ppc64 || GOARCH_ppc64le) {"test_kvm", test_kvm}, #endif }; -- cgit mrf-deployment