From 56d3c267ea22d0a182d02d120dc331e5bea9e75c Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Thu, 29 Oct 2015 15:36:59 -0700 Subject: architectures: Add basic s390x support This is enough to get some console output. Signed-off-by: Andy Lutomirski --- virtme/architectures.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/virtme/architectures.py b/virtme/architectures.py index 6da4c22..de5230f 100644 --- a/virtme/architectures.py +++ b/virtme/architectures.py @@ -169,24 +169,32 @@ class Arch_s390x(Arch): @staticmethod def virtio_dev_type(virtiotype): - return 'virtio-%s-device' % virtiotype + return 'virtio-%s-ccw' % virtiotype def qemuargs(self, is_native): - return [ - '-device', 'virtio-mmio', + ret = Arch.qemuargs(is_native) + + # Ask for the latest version of s390-ccw + ret.extend(['-M', 's390-ccw-virtio']) + + # To be able to configure a console, we need to get rid of the + # default console + ret.extend(['-nodefaults']) - # This is very buggy. - '-device', self.virtio_dev_type('serial'), + ret.extend(['-device', 'sclpconsole,chardev=console']) - # This is annoying but acceptable. - '-device', 'virtconsole,chardev=console', - ] + return ret + + @staticmethod + def config_base(): + return ['CONFIG_MARCH_Z900=y'] ARCHES = { 'x86_64': Arch_x86, 'i386': Arch_x86, 'arm': Arch_arm, 'aarch64': Arch_aarch64, + 's390x': Arch_s390x, } def get(arch): -- cgit 1.2.3-korg