aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/s390-virtio.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2013-04-22 16:52:53 +0200
committerAlexander Graf <agraf@suse.de>2013-04-26 20:18:24 +0200
commitd0249ce5a8d11564958262fd567d1ea770358134 (patch)
tree950f52decc07ac31ad78b70586d9e7cad60d98f0 /hw/s390x/s390-virtio.c
parent3325995640e0a598c4c350a1a02357b422e90973 (diff)
S390: IPL: Use different firmware for different machines
We have a virtio-s390 and a virtio-ccw machine in QEMU. Both use vastly different ways to do I/O. Having the same firmware blob for both doesn't really make any sense. Instead, let's parametrize the firmware file name, so that we can have different blobs for different machines. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/s390x/s390-virtio.c')
-rw-r--r--hw/s390x/s390-virtio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/s390x/s390-virtio.c b/hw/s390x/s390-virtio.c
index 46aec999a6..30d1118cdc 100644
--- a/hw/s390x/s390-virtio.c
+++ b/hw/s390x/s390-virtio.c
@@ -49,6 +49,7 @@
#endif
#define MAX_BLK_DEVS 10
+#define ZIPL_FILENAME "s390-zipl.rom"
static VirtIOS390Bus *s390_bus;
static S390CPU **ipi_states;
@@ -158,7 +159,8 @@ unsigned s390_del_running_cpu(S390CPU *cpu)
void s390_init_ipl_dev(const char *kernel_filename,
const char *kernel_cmdline,
- const char *initrd_filename)
+ const char *initrd_filename,
+ const char *firmware)
{
DeviceState *dev;
@@ -170,6 +172,7 @@ void s390_init_ipl_dev(const char *kernel_filename,
qdev_prop_set_string(dev, "initrd", initrd_filename);
}
qdev_prop_set_string(dev, "cmdline", kernel_cmdline);
+ qdev_prop_set_string(dev, "firmware", firmware);
qdev_init_nofail(dev);
}
@@ -247,7 +250,7 @@ static void s390_init(QEMUMachineInitArgs *args)
s390_bus = s390_virtio_bus_init(&my_ram_size);
s390_sclp_init();
s390_init_ipl_dev(args->kernel_filename, args->kernel_cmdline,
- args->initrd_filename);
+ args->initrd_filename, ZIPL_FILENAME);
/* register hypercalls */
s390_virtio_register_hcalls();