From patchwork Thu Sep 27 22:39:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [001/147] s390x: fix -initrd in virtio machine From: Richard Henderson X-Patchwork-Id: 187493 Message-Id: <1348785610-23418-2-git-send-email-rth@twiddle.net> To: qemu-devel@nongnu.org Cc: Alexander Graf Date: Thu, 27 Sep 2012 15:39:42 -0700 From: Alexander Graf 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: Christian Borntraeger Acked-by: Richard Henderson --- hw/s390-virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index 47eed35..12ae612 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -284,8 +284,8 @@ static void s390_init(ram_addr_t my_ram_size, } /* 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)) {