qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/arm/virt: Reject gic-version=host for non-KVM
@ 2016-05-26 14:31 Cole Robinson
  2016-05-26 14:46 ` Richard W.M. Jones
  2016-06-03 18:34 ` Peter Maydell
  0 siblings, 2 replies; 9+ messages in thread
From: Cole Robinson @ 2016-05-26 14:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, qemu-arm, Cole Robinson

If you try to gic-version=host with TCG on a KVM aarch64 host,
qemu segfaults, since host requires KVM APIs.

Explicitly reject gic-version=host if KVM is not enabled

https://bugzilla.redhat.com/show_bug.cgi?id=1339977
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
 hw/arm/virt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index e77ed88..1e82597 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1122,10 +1122,14 @@ static void machvirt_init(MachineState *machine)
      * KVM is not available yet
      */
     if (!gic_version) {
+        if (!kvm_enabled()) {
+            error_report("gic-version=host requires KVM");
+            exit(1);
+        }
+
         gic_version = kvm_arm_vgic_probe();
         if (!gic_version) {
             error_report("Unable to determine GIC version supported by host");
-            error_printf("KVM acceleration is probably not supported\n");
             exit(1);
         }
     }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-06-17 16:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-26 14:31 [Qemu-devel] [PATCH] hw/arm/virt: Reject gic-version=host for non-KVM Cole Robinson
2016-05-26 14:46 ` Richard W.M. Jones
2016-05-26 14:53   ` Peter Maydell
2016-05-26 15:14     ` Richard W.M. Jones
2016-06-17 14:49     ` Peter Maydell
2016-06-17 16:10       ` Richard W.M. Jones
2016-06-17 16:31         ` Peter Maydell
2016-06-17 16:33           ` Richard W.M. Jones
2016-06-03 18:34 ` Peter Maydell

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).