From patchwork Mon Oct 29 18:38:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/7] s390x: fix -initrd in virtio machine Date: Mon, 29 Oct 2012 08:38:31 -0000 From: Alexander Graf X-Patchwork-Id: 195110 Message-Id: <1351535917-27487-2-git-send-email-agraf@suse.de> To: qemu-devel qemu-devel Cc: Blue Swirl , Aurelien Jarno 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 Acked-by: Richard Henderson Acked-by: Christian Borntraeger --- hw/s390-virtio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index 85bd13e..52fad37 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)) {