[dts] [PATCH] framework/qemu_kvm: set opt_gic_version for virt machine on qemu-system-aarch64
Joyce Kong
joyce.kong at arm.com
Wed May 16 07:37:37 CEST 2018
Vm can not be setup successfully without opt_gic_version option
for virt machine on qemu-system-aarch64.
Signed-off-by: Joyce Kong <joyce.kong at arm.com>
---
conf/vhost_sample.cfg | 3 ++-
framework/qemu_kvm.py | 10 ++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/conf/vhost_sample.cfg b/conf/vhost_sample.cfg
index 16abfad..4f0700c 100644
--- a/conf/vhost_sample.cfg
+++ b/conf/vhost_sample.cfg
@@ -3,7 +3,8 @@
# name: vm0
#
# machine
-# machine: [virt | ...]
+# machine: [virt | opt_gic_version | ...]
+# note: opt_gic_version is mandatory on qemu-system-aarch64
#
# enable_kvm
# enable: [yes | no]
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index ec33669..79d8ce5 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -297,11 +297,17 @@ class QEMUKvm(VirtBase):
def add_vm_machine(self, **options):
"""
- 'machine': 'virt'
+ 'machine': 'virt','opt_gic_version'
"""
+ machine_boot_line='-machine'
+ separator = ','
if 'machine' in options.keys() and \
options['machine']:
- machine_boot_line = '-machine %s' % options['machine']
+ machine_boot_line += '%s' % options['machine']
+ if 'opt_gic_version' in options.keys() and \
+ options['opt_gic_version']:
+ machine_boot_line += separator + 'gic_version=%s' % options['opt_gic_version']
+
self.__add_boot_line(machine_boot_line)
def set_vm_pid_file(self):
--
1.8.3.1
More information about the dts
mailing list