* [dts] [PATCH] framework/qemu_kvm: set opt_gic_version for virt machine on qemu-system-aarch64
@ 2018-05-16 5:37 Joyce Kong
2018-05-17 9:29 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Joyce Kong @ 2018-05-16 5:37 UTC (permalink / raw)
To: dts; +Cc: Joyce Kong
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-17 1:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16 5:37 [dts] [PATCH] framework/qemu_kvm: set opt_gic_version for virt machine on qemu-system-aarch64 Joyce Kong
2018-05-17 9:29 ` Liu, Yong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).