From: Alexander Graf Date: Fri, 18 Dec 2009 15:29:04 +0000 (+0100) Subject: S390: Bail out without KVM X-Git-Tag: v0.12.0~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8647b09bfd71870628a950a966ea56dc872a9d99;p=thirdparty%2Fqemu.git S390: Bail out without KVM 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 Signed-off-by: Aurelien Jarno (cherry picked from commit e249651ca94058547f7ae84694e82bb1ee03bc3c) --- diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index e54ef0ea4ee..0fa6ba68c9f 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -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);