aboutsummaryrefslogtreecommitdiff
path: root/hw/s390-virtio.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-09-19 17:24:46 +0200
committerAlexander Graf <agraf@suse.de>2012-10-29 19:41:55 +0100
commit235a3f0bed3584fe65079ffa07c7a842971f261e (patch)
tree33e20b6ad600bbfaa30e8d361b53d0479c8d207d /hw/s390-virtio.c
parentb308c82cbda44e138ef990af64d44a5613c16092 (diff)
s390x: fix -initrd in virtio machine
When using -initrd in the virtio machine, we need to indicate the initrd start and size inside the kernel image. These parameters need to be stored in native endianness. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/s390-virtio.c')
-rw-r--r--hw/s390-virtio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 85bd13e06f..52fad37526 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -285,8 +285,8 @@ static void s390_init(QEMUMachineInitArgs *args)
}
/* we have to overwrite values in the kernel image, which are "rom" */
- memcpy(rom_ptr(INITRD_PARM_START), &initrd_offset, 8);
- memcpy(rom_ptr(INITRD_PARM_SIZE), &initrd_size, 8);
+ stq_p(rom_ptr(INITRD_PARM_START), initrd_offset);
+ stq_p(rom_ptr(INITRD_PARM_SIZE), initrd_size);
}
if (rom_ptr(KERN_PARM_AREA)) {