aboutsummaryrefslogtreecommitdiff
path: root/hw/s390-virtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390-virtio.c')
-rw-r--r--hw/s390-virtio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index b57fa9c2f8..e54ef0ea4e 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -201,7 +201,11 @@ static void s390_init(ram_addr_t ram_size,
}
/* Create VirtIO console */
- qdev_init_nofail(qdev_create((BusState *)s390_bus, "virtio-console-s390"));
+ for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) {
+ if (virtcon_hds[i]) {
+ qdev_init_nofail(qdev_create((BusState *)s390_bus, "virtio-console-s390"));
+ }
+ }
/* Create VirtIO network adapters */
for(i = 0; i < nb_nics; i++) {