diff options
author | Jeff Lane <jeffrey.lane@canonical.com> | 2015-12-23 10:13:41 -0500 |
---|---|---|
committer | Jeff Lane <jeffrey.lane@canonical.com> | 2015-12-23 10:13:41 -0500 |
commit | 694c9975002ca28e8975638b0fa84e5fa126c62b (patch) | |
tree | b0bd8b2d43c441bab422ac144d712a78e40af525 | |
parent | ec239d1d04faea78d6d8b4b6b8e9eafa79efbb81 (diff) |
modifications to work on both GICv3 and v2 ARM64 systems
-rwxr-xr-x | bin/virtualization | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/virtualization b/bin/virtualization index f9d1f1f..bf4be47 100755 --- a/bin/virtualization +++ b/bin/virtualization @@ -69,7 +69,6 @@ QEMU_ARCH_CONFIG = { 'qemu_bin': 'qemu-system-aarch64', 'qemu_disk_type': QEMU_DISK_TYPE_VIRTIO_BLK, 'qemu_extra_args': [ - '-machine', 'virt', '-cpu', 'host', '-enable-kvm', '-serial', 'stdio', @@ -130,6 +129,14 @@ class QemuRunner(object): "-net", "nic", "-net", "user,net=10.0.0.0/8,host=10.0.0.1,hostfwd=tcp::2222-:22", ] + # If arch is arm64, add the machine type for gicv3, or default to old + # type + if self.arch == 'amd64': + if os.path.isfile("/sys/firmware/devicetree/base/interrupt-controller@*/compatible"): + self.config['qemu_extra_args'].extend(['-machine', 'virt,gicv3']) + else: + self.config['qemu_extra_args'].extend(['-machine', 'virt']) + # Add any architecture-specific parameters if 'qemu_extra_args' in self.config: self.params = self.params + self.config['qemu_extra_args'] |