From patchwork Thu Sep 27 22:39:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187493 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 983592C00B9 for ; Fri, 28 Sep 2012 08:40:36 +1000 (EST) Received: from localhost ([::1]:36462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THMl0-00036P-JO for incoming@patchwork.ozlabs.org; Thu, 27 Sep 2012 18:40:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THMkn-00034U-8u for qemu-devel@nongnu.org; Thu, 27 Sep 2012 18:40:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THMkm-00031Q-6k for qemu-devel@nongnu.org; Thu, 27 Sep 2012 18:40:21 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:37069) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THMkm-00031E-0M for qemu-devel@nongnu.org; Thu, 27 Sep 2012 18:40:20 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so1737833pad.4 for ; Thu, 27 Sep 2012 15:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=e1wgUVZKY2kEmT11DzIskTSZouxMy5kzfaAoqPNOWZw=; b=gHHWe7M4riuHoc+TnDD6MWwch9PgdPuVOOSnmIF9N0itqWQrKZDeWqiQlW9S1tYuxj LKbCykUIN15ZWLf0XLoea1fwO5vrJfht2iyurQG8UOiys2qObV7R6ms9L7xGuFzfdXm0 IxWbO+jP31g6ulKQ16DZNfViWTKqNe+q4nDeUI7lCdsx4rQXlgUwjM53v6GE1WezBwYc PVfE02ujWBnICxlzn2BLhvmzyPdif0Ut4malfQcnKGLKVdZIORpUEzyxE3n9iabg+YbO cGWnyP0J0dKBfzSdbt0dWOv0fDqQK/u8WWX8VJBiLRFPj8fmWOwUO5BHxvlOwV64bYpE 4oBA== Received: by 10.66.75.104 with SMTP id b8mr12918379paw.21.1348785619478; Thu, 27 Sep 2012 15:40:19 -0700 (PDT) Received: from anchor.twiddle.home.com ([173.160.232.49]) by mx.google.com with ESMTPS id sj5sm4480267pbc.30.2012.09.27.15.40.18 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 27 Sep 2012 15:40:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Sep 2012 15:39:42 -0700 Message-Id: <1348785610-23418-2-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1348785610-23418-1-git-send-email-rth@twiddle.net> References: <1348785610-23418-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 001/147] 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: 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)) {