diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2016-11-22 16:59:04 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2016-11-22 17:00:47 +0100 |
| commit | 3356f68f1a531e194f6fbca5eb02f4f5bc4c218f (patch) | |
| tree | a490572a53952d6178a8c9f5474b928c19e47bad /config | |
| parent | 599adaf8f83defba1ebddf30e242b66175cf048a (diff) | |
vm/qemu: support non-native mode
Add config bin_args parameter that contains additional arguments for qemu binary.
This allows to specify e.g. "bin_args": "-machine virt -cpu cortex-a57".
Also restore qemu debugging output when -debug flag is specified.
Diffstat (limited to 'config')
| -rw-r--r-- | config/config.go | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/config/config.go b/config/config.go index bb8de5b95..9a8562912 100644 --- a/config/config.go +++ b/config/config.go @@ -18,22 +18,23 @@ import ( ) type Config struct { - Name string // Instance name (used for identification and as GCE instance prefix) - Http string // TCP address to serve HTTP stats page (e.g. "localhost:50000") - Rpc string // TCP address to serve RPC for fuzzer processes (optional, only useful for type "none") - Workdir string - Vmlinux string - Kernel string // e.g. arch/x86/boot/bzImage - Tag string // arbitrary optional tag that is saved along with crash reports (e.g. kernel branch/commit) - Cmdline string // kernel command line - Image string // linux image for VMs - Initrd string // linux initial ramdisk. (optional) - Cpu int // number of VM CPUs - Mem int // amount of VM memory in MBs - Sshkey string // root ssh key for the image - Bin string // qemu/lkvm binary name - Debug bool // dump all VM output to console - Output string // one of stdout/dmesg/file (useful only for local VM) + Name string // Instance name (used for identification and as GCE instance prefix) + Http string // TCP address to serve HTTP stats page (e.g. "localhost:50000") + Rpc string // TCP address to serve RPC for fuzzer processes (optional, only useful for type "none") + Workdir string + Vmlinux string + Kernel string // e.g. arch/x86/boot/bzImage + Tag string // arbitrary optional tag that is saved along with crash reports (e.g. kernel branch/commit) + Cmdline string // kernel command line + Image string // linux image for VMs + Initrd string // linux initial ramdisk. (optional) + Cpu int // number of VM CPUs + Mem int // amount of VM memory in MBs + Sshkey string // root ssh key for the image + Bin string // qemu/lkvm binary name + Bin_Args string // additional command line arguments for qemu/lkvm binary + Debug bool // dump all VM output to console + Output string // one of stdout/dmesg/file (useful only for local VM) Hub_Addr string Hub_Key string @@ -258,6 +259,7 @@ func CreateVMConfig(cfg *Config, index int) (*vm.Config, error) { Index: index, Workdir: workdir, Bin: cfg.Bin, + BinArgs: cfg.Bin_Args, Kernel: cfg.Kernel, Cmdline: cfg.Cmdline, Image: cfg.Image, @@ -292,6 +294,7 @@ func checkUnknownFields(data []byte) (string, error) { "Mem", "Sshkey", "Bin", + "Bin_Args", "Debug", "Output", "Hub_Addr", |
