aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2009-12-18 16:29:04 +0100
committerAurelien Jarno <aurelien@aurel32.net>2009-12-18 16:39:19 +0100
commite249651ca94058547f7ae84694e82bb1ee03bc3c (patch)
tree2204b7c4a180e88e1041a96d6f00b2ce959c770c /hw
parent86f3dba6518bd5fd106e1cf3f36dafda41ff377b (diff)
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 <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390-virtio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index e54ef0ea4e..0fa6ba68c9 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);