aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorAlexander Egorenkov <Alexander.Egorenkov@ibm.com>2020-06-02 09:18:07 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-06-25 23:08:45 +0200
commitaea82c003a1826ebd9bf53194bb40fe911f9c23e (patch)
treeb553b2118a605c2df9e8ac6def779377f310e0ae /vm
parentf9147b0836f6cd4196dbc25509e8763435cc857a (diff)
sys/linux: first 64bit big-endian architecture s390x
* mmap syscall is special on Linux s390x because the parameters for this syscall are passed as a struct on user stack instead of registers. * Introduce the SyscallTrampolines table into targets.Target to address the above problem. * There is a bug in Linux kernel s390x which causes QEMU TCG to hang when KASAN is enabled. The bug has been fixed in the forthcoming Linux 5.8 version. Until then do not enable KASAN when using QEMU TCG, QEMU KVM shall have no problems with KASAN. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
Diffstat (limited to 'vm')
-rw-r--r--vm/qemu/qemu.go9
-rw-r--r--vm/vmimpl/console_linux_s390x.go15
2 files changed, 24 insertions, 0 deletions
diff --git a/vm/qemu/qemu.go b/vm/qemu/qemu.go
index bddace8f6..e5f1fc8c5 100644
--- a/vm/qemu/qemu.go
+++ b/vm/qemu/qemu.go
@@ -152,6 +152,15 @@ var archConfigs = map[string]*archConfig{
QemuArgs: "-enable-kvm -vga none",
CmdLine: linuxCmdline,
},
+ "linux/s390x": {
+ Qemu: "qemu-system-s390x",
+ TargetDir: "/",
+ QemuArgs: "-M s390-ccw-virtio -cpu max,zpci=on",
+ NicModel: ",model=virtio",
+ CmdLine: append(linuxCmdline,
+ "root=/dev/vda",
+ ),
+ },
"freebsd/amd64": {
Qemu: "qemu-system-x86_64",
TargetDir: "/",
diff --git a/vm/vmimpl/console_linux_s390x.go b/vm/vmimpl/console_linux_s390x.go
new file mode 100644
index 000000000..37d321fa5
--- /dev/null
+++ b/vm/vmimpl/console_linux_s390x.go
@@ -0,0 +1,15 @@
+// Copyright 2020 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.
+
+package vmimpl
+
+import (
+ "golang.org/x/sys/unix"
+)
+
+const (
+ unixCBAUD = unix.CBAUD
+ unixCRTSCTS = unix.CRTSCTS
+ syscallTCGETS = unix.TCGETS2
+ syscallTCSETS = unix.TCSETS2
+)