aboutsummaryrefslogtreecommitdiffstats
path: root/executor/kvm_gen.cc
Commit message (Collapse)AuthorAgeFilesLines
* executor/common_kvm_ppc64: fix KVM supportAlexey Kardashevskiy2021-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Turns out the ifuzz on powerpc did not ever properly work. This fixes syz_kvm_setup_cpu$ppc64: Enable the PAPR KVM capability (otherwise KVM_RUN fails right away). Finish generated sequences with the software debug breakpoint as there is no x86's "hlt" variant on POWER and otherwise KVM won't exit. Add exception handlers, use the software debug breakpoint instruction to trigger immediate exit from KVM with the only exception of the decrementer interrupt handler (timer) to recharge the timer and continue. Define and use endianness selection flag (Big vs. Little endian). Define the code generator similar to kvm_gen.cc which for now contains 2 simple tests and the decrementer interrupt handler code. Add test cases to the executor so "bin/linux_ppc64le/syz-executor test" can run some sensible tests. The tests copy 0xbadc0de around similar to x86 and uses gpr[3] is a return value register (similar to EAX). Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* executor: prepare code generator to allow other achitecturesAlexey Kardashevskiy2021-07-191-0/+2
| | | | | | | At the moment only AMD64 is supported, change file names to emphasise this. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* Makefile: enable clang-tidy in presubmit testsDmitry Vyukov2020-08-041-2/+2
| | | | | Fix all errors it points to. The one in netlink_send_ext is concerning.
* all: fix marking of auto-generated filesDmitry Vyukov2020-07-291-1/+1
| | | | | Update the copyright checking script and more files for the standard convention of marking auto-generated files.
* executor: remove unused kvm_asm64_vm86Dmitry Vyukov2019-01-171-1/+0
| | | | | | | -Wunused-const-variable shows it. No idea now if it should be used or not, seems to be the same as kvm_asm32_paged_vm86. So let's just remove it.
* sys: extend kvm supportDmitry Vyukov2017-01-091-0/+33
Add new pseudo syscall syz_kvm_setup_cpu that setups VCPU into interesting states for execution. KVM is too difficult to setup otherwise. Lots of improvements possible, but this is a starting point.