Received: from eggs.gnu.org ([2001:4830:134:3::10]:39573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz3Jh-0008I5-J7 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 08:25:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz3JW-0003gX-Hr for qemu-devel@nongnu.org; Mon, 23 Jun 2014 08:25:45 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:52425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz3JV-0003fx-Qr for qemu-devel@nongnu.org; Mon, 23 Jun 2014 08:25:34 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Jun 2014 13:25:32 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1BF9D2190066 for ; Mon, 23 Jun 2014 13:25:18 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5NCPTxi23003288 for ; Mon, 23 Jun 2014 12:25:29 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5NCPT5N015462 for ; Mon, 23 Jun 2014 06:25:29 -0600 From: Cornelia Huck Date: Mon, 23 Jun 2014 14:25:22 +0200 Message-Id: <1403526325-31664-2-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1403526325-31664-1-git-send-email-cornelia.huck@de.ibm.com> References: <1403526325-31664-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PULL 1/4] pc-bios/s390-ccw: virtio_load_direct() can't load max number of sectors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, borntraeger@de.ibm.com, agraf@suse.de, David Hildenbrand , jfrei@linux.vnet.ibm.com, aliguori@amazon.com, Cornelia Huck From: David Hildenbrand The number of sectors to read is given by the last 16 bit of rec_list2. 1 is added in order to get to the real number of sectors to read (0x0000 -> read 1 block). For now, the maximum number (0xffff) led to 0 sectors being read. This fixes a bug where a large initrd (62MB) could not be ipled anymore. Signed-off-by: David Hildenbrand Signed-off-by: Jens Freimann Reviewed-by: Cornelia Huck Reviewed-by: Alexander Graf Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c index a46914d..bbb3c4f 100644 --- a/pc-bios/s390-ccw/virtio.c +++ b/pc-bios/s390-ccw/virtio.c @@ -240,7 +240,7 @@ unsigned long virtio_load_direct(ulong rec_list1, ulong rec_list2, { u8 status; int sec = rec_list1; - int sec_num = (((rec_list2 >> 32)+ 1) & 0xffff); + int sec_num = ((rec_list2 >> 32) & 0xffff) + 1; int sec_len = rec_list2 >> 48; ulong addr = (ulong)load_addr; -- 1.7.9.5