From 694c9975002ca28e8975638b0fa84e5fa126c62b Mon Sep 17 00:00:00 2001 From: Jeff Lane Date: Wed, 23 Dec 2015 10:13:41 -0500 Subject: modifications to work on both GICv3 and v2 ARM64 systems --- bin/virtualization | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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'] -- cgit v1.2.3