From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfeIT-0006oz-0P for qemu-devel@nongnu.org; Mon, 03 Dec 2012 17:15:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfeIR-000311-T9 for qemu-devel@nongnu.org; Mon, 03 Dec 2012 17:15:28 -0500 Sender: fluxion From: Michael Roth Date: Mon, 3 Dec 2012 16:08:37 -0600 Message-Id: <1354572547-21271-14-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1354572547-21271-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1354572547-21271-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 13/43] s390x: fix -initrd in virtio machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-stable@nongnu.org Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org 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: Richard Henderson Acked-by: Christian Borntraeger (cherry picked from commit 235a3f0bed3584fe65079ffa07c7a842971f261e) Signed-off-by: Michael Roth --- 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)) { -- 1.7.9.5