summaryrefslogtreecommitdiff
path: root/hw/s390x/s390-virtio.c
diff options
context:
space:
mode:
authorFan Zhang <zhangfan@linux.vnet.ibm.com>2015-02-12 18:02:14 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-02-13 16:14:09 +0100
commitdf75a4e2c607836eee044d7e6b0d94724d6ebf21 (patch)
treed17ea032e83adb532c7dbe56a8c2f8f68b3ccef8 /hw/s390x/s390-virtio.c
parentf0180f913e3bcd04cb132f5f6036e823a78e0673 (diff)
downloadqemu-df75a4e2c607836eee044d7e6b0d94724d6ebf21.tar.gz
qemu-df75a4e2c607836eee044d7e6b0d94724d6ebf21.tar.bz2
qemu-df75a4e2c607836eee044d7e6b0d94724d6ebf21.zip
s390x/ipl: support diagnose 308 subcodes 5 and 6
To support dynamically updating the IPL device from inside the KVM guest on the s390 platform, DIAG 308 instruction is intercepted in QEMU to handle the request. Subcode 5 allows to specify a new boot device, which is saved for later in the s390_ipl device. This also allows to switch from an external kernel to a boot device. Subcode 6 retrieves boot device configuration that has been previously set. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/s390x/s390-virtio.c')
-rw-r--r--hw/s390x/s390-virtio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 13f9e4921e..412e49ba33 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -143,6 +143,8 @@ void s390_init_ipl_dev(const char *kernel_filename,
qdev_prop_set_string(dev, "cmdline", kernel_cmdline);
qdev_prop_set_string(dev, "firmware", firmware);
qdev_prop_set_bit(dev, "enforce_bios", enforce_bios);
+ object_property_add_child(qdev_get_machine(), "s390-ipl",
+ OBJECT(dev), NULL);
qdev_init_nofail(dev);
}