From patchwork Mon Feb 4 10:40:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 217953 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F05842C0092 for ; Tue, 5 Feb 2013 01:43:01 +1100 (EST) Received: from localhost ([::1]:37376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2JX5-00087L-3l for incoming@patchwork.ozlabs.org; Mon, 04 Feb 2013 05:44:15 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2JWv-0007xH-7H for qemu-devel@nongnu.org; Mon, 04 Feb 2013 05:44:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2JWs-0001SN-6D for qemu-devel@nongnu.org; Mon, 04 Feb 2013 05:44:05 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:59586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2JWr-0001S0-VZ; Mon, 04 Feb 2013 05:44:02 -0500 Received: from gandalf.tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by isrv.corpit.ru (Postfix) with ESMTP id 356C6A03EF; Mon, 4 Feb 2013 14:44:01 +0400 (MSK) Received: by gandalf.tls.msk.ru (Postfix, from userid 1000) id 8A4D1538; Mon, 4 Feb 2013 14:41:28 +0400 (MSK) From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 4 Feb 2013 14:40:45 +0400 Message-Id: <1359974470-17044-36-git-send-email-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359974470-17044-1-git-send-email-mjt@msgid.tls.msk.ru> References: <1359974470-17044-1-git-send-email-mjt@msgid.tls.msk.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.62.121.231 Cc: Michael Tokarev , qemu-stable@nongnu.org, Alexander Graf Subject: [Qemu-devel] [PATCH 35/60] s390x: fix -initrd in virtio machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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 Tokarev --- 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 c0e19fd..05058c3 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -282,8 +282,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)) {