aboutsummaryrefslogtreecommitdiffstats
path: root/vm/kvm
Commit message (Collapse)AuthorAgeFilesLines
* vm/kvm: deleteDmitry Vyukov2024-04-151-304/+0
| | | | | | | Delete support for kvmtool. We don't use it, I have not heard anybody using it in the past 5 years. The last commit in https://github.com/kvmtool/kvmtool is done 2 years ago. And it was never fully working (see taskset hack to avoid races).
* pkg/rpctype: make RPC compression optionalDmitry Vyukov2024-04-031-1/+1
| | | | | | | | RPC compression take up to 10% of CPU time in profiles, but it's unlikely to be beneficial for local VM runs (we are mostly copying memory in this case). Enable RPC compression based on the VM type (local VM don't use it, remove machines use it).
* all: use special placeholder for errorsTaras Madan2023-07-241-6/+6
|
* vm: pass Report to DiagnoseDmitry Vyukov2020-11-211-1/+2
| | | | | | | | | The way to diagnose generally depends on the issue. E.g. do we need register dump to debug this issue? Do we need host dmesg dump? Some diagnosis may be directly specific to a particular problem (e.g. dumping a particular debugfs/procfs file). Pass Report to Diagnose to make this possible.
* vm: allow Diagnose to directly return diagnosisMichael Pratt2018-12-211-2/+2
| | | | | | Rather than writing the diagnosis to the kernel console, Diagnose can now directly return the extra debugging info, which will be appended ot the kernel console log.
* pkg/osutil: provide better RenameDmitry Vyukov2018-12-171-1/+1
| | | | | os.Rename fails for cross-device renaming (e.g. to/from tmpfs). This is quite unpleasant. Provide own version that falls back to copying.
* vm/qemu: improve debug outputMichael Tüxen2018-11-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | * vm/qemu: Improve debug output. When running in debug mode, the number of VMs is reduced to 1. State this in the debug output. * vm/qemu: Don't start debug output with a capital letter. As requested by Dimitry. * vm: Provide debug message when reduing number of VMs. Apply this change to all affected platforms for consistency. Suggested by Dmitry. * Add myself to AUTHORS/CONTRIBUTORS files. * vm: Fix compilation issues missed in earlier commit. * vm: Use logging to write debug message.
* vm/vmm: increase maximum number of VMsDmitry Vyukov2018-09-201-2/+2
| | | | | 8 is way too low. A modern beefy machine can host a hundred of VMs freely. Make the limit consistent for all of qemu/kvm/gvisor/vmm and set it to 128.
* syz-ci: de-hardcode list of VMs that support overcommitDmitry Vyukov2018-09-111-1/+1
| | | | | | | | We currently have this list in multiple places (somewhat diverged). Specify this "overcommit" property in VM implementations. In particular, we also want to allow overcommit for "vmm" type. Update #712
* vm/vmimpl: add vm.Diagnose methodDmitry Vyukov2018-06-221-0/+4
| | | | | | Diagnose is called on machine hang to try to get some additional diagnostic information from it. For now it's all stubs.
* all: fix too long linesDmitry Vyukov2018-05-051-1/+2
| | | | | Not sure why I have not seen warnings about these lines on another machine...
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-6/+6
| | | | Fix typos, non-canonical code, remove dead code, etc.
* pkg/osutil: don't leace runaway processesDmitry Vyukov2017-11-161-2/+2
| | | | | | When manager is stopped there are sometimes runaway qemu processes still running. Set PDEATHSIG for all subprocesses. We never need child processes outliving parents.
* all: use consistent file permissionsDmitry Vyukov2017-07-031-5/+3
| | | | | | | | | | | | | | | | Currently we have unix permissions for new files/dirs hardcoded throughout the code base. Some places use 0644, some - 0640, some - 0600 and a variety of other constants. Introduce osutil.MkdirAll/WriteFile that use the default permissions and use them throughout the code base. This makes permissions consistent and also allows to easily change the permissions later if we change our minds. Also merge pkg/fileutil into pkg/osutil as they become dependent on each other. The line between them was poorly defined anyway as both operate on files.
* syz-manager/mgrconfig: move sshkey from vm config to manager configDmitry Vyukov2017-06-171-1/+1
| | | | | | | | | | | | | | Sshkey is a property of image, which is in manager config. Move sshkey to the same location as image. The motivation for the move is as follows. Continuous build produces an image and the key, both need to be passed manager instance. Continuous build system should not distinguish different VM types and mess with their configs. NOTE FOR USERS: this breaks manager configs again. Hopefully the last time for now. Docs are updated.
* all: use osutil.IsExist instead of os.StatDmitry Vyukov2017-06-171-3/+3
|
* vm: overhaulDmitry Vyukov2017-06-031-48/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VM infrastructure currently has several problems: - Config struct is complete mess with a superset of params for all VM types - verification of Config is mess spread across several places - there is no place where VM code could do global initialization like creating GCE connection, uploading GCE image to GCS, matching adb devices with consoles, etc - it hard to add private VM implementations such impl would need to add code to config package which would lead to constant merge conflicts - interface for VM implementation is mixed with interface for VM users this does not allow to provide best interface for both of them - there is no way to add common code for all VM implementations This change solves these problems by: - splitting VM interface for users (vm package) and VM interface for VM implementations (vmimpl pacakge), this in turn allows to add common code - adding Pool concept that allows to do global initialization and config checking at the right time - decoupling manager config from VM-specific config each VM type now defines own config Note: manager configs need to be changed after this change: VM-specific parts are moved to own "vm" subobject. Note: this change also drops "local" VM type. Its story was long unclear and there is now syz-stress which solves the same problem.
* pkg/fileutil: move from fileutilDmitry Vyukov2017-06-031-1/+1
|
* fileutil: remove unused CopyFile argDmitry Vyukov2017-06-031-1/+1
|
* vm: validate if cfg.Bin is in $PATH for kvm,adb,qemubaishuai2017-05-211-0/+3
|
* vm: add ability to interrupt commandsDmitry Vyukov2016-11-191-2/+5
| | | | This is required for crash reproduction in manager.
* vm: merger console/fuzzer output line-by-lineDmitry Vyukov2016-08-281-1/+0
| | | | Fixes #57
* vm/qemu: fix latent output reading bugDmitry Vyukov2016-01-201-2/+4
|
* vm: refactor VM interface in preparation for adb supportDmitry Vyukov2016-01-111-7/+15
| | | | | adb has more complex port forwarding setup, also / is mounted read-only. Make VM interface more flexible to support such cases.
* qemu/kvm: improve output bufferingDmitry Vyukov2015-12-281-1/+5
| | | | There seems to be some missed pieces in output.
* vm: improve VM interfaceDmitry Vyukov2015-12-231-352/+184
| | | | | | | Current interface is suitable only for running syz-fuzzer. Make the interface more generic (boot, copy file, run an arbitrary command). This allows to build other tools on top of vm package (e.g. reproducer creation).
* detect UBSAN error reportsDmitry Vyukov2015-12-171-1/+1
|
* fix crash outputDmitry Vyukov2015-11-061-2/+5
|
* minor improvements for kvmDmitry Vyukov2015-11-051-1/+2
|
* don't emit unnecessary info into crash logDmitry Vyukov2015-11-041-3/+1
| | | | | This was necessary because there was a bug in log offset calculation. Not the bug is fixed and the additional output makes it harder to grep logs.
* fix crash report extraction from logsDmitry Vyukov2015-10-201-2/+5
|
* improve lkvm support (still does not quite work)Dmitry Vyukov2015-10-201-7/+12
|
* refactor enabled syscall handlingDmitry Vyukov2015-10-201-7/+2
|
* aggregate vm params into a single struct (for ease of extension)Dmitry Vyukov2015-10-201-7/+7
|
* lkvm supportDmitry Vyukov2015-10-161-0/+415