diff options
author | Alexander Graf <agraf@suse.de> | 2009-12-17 13:06:07 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-18 16:34:20 +0100 |
commit | a1e4b07f04d8f31e8c0c1bf97385f426d3fcf5e6 (patch) | |
tree | 1bdb596fadc9d524c9ea998064a5f869baef520b /hw | |
parent | d7963c43b9646e4dfc69a4253c61e4bab7b661cd (diff) | |
download | hqemu-a1e4b07f04d8f31e8c0c1bf97385f426d3fcf5e6.zip hqemu-a1e4b07f04d8f31e8c0c1bf97385f426d3fcf5e6.tar.gz |
S390: Loop through virtio console devices
We used to always create one single virtio console device. This breaks when
either zero of multiple virtio console devices are requested, so let's use
the same code as on x86.
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index b57fa9c..e54ef0e 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++) { |