]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
S390: Bail out without KVM
authorAlexander Graf <agraf@suse.de>
Fri, 18 Dec 2009 15:29:04 +0000 (16:29 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 18 Dec 2009 15:39:19 +0000 (16:39 +0100)
Currently only the S390 KVM target works. To keep users from accidently not
using KVM, let's not even initialize the machine when KVM is not used.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/s390-virtio.c

index e54ef0ea4ee54df45e3d1d8a3a3e51a1bd75aa00..0fa6ba68c9fbb99ad01525748f3a951056afb327 100644 (file)
@@ -142,6 +142,13 @@ static void s390_init(ram_addr_t ram_size,
     ram_addr_t initrd_size = 0;
     int i;
 
+    /* XXX we only work on KVM for now */
+
+    if (!kvm_enabled()) {
+        fprintf(stderr, "The S390 target only works with KVM enabled\n");
+        exit(1);
+    }
+
     /* get a BUS */
     s390_bus = s390_virtio_bus_init(&ram_size);