qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jens Freimann <jfrei@linux.vnet.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
	Alexander Graf <agraf@suse.de>,
	Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>,
	Jens Freimann <jfrei@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/4] pc-bios/s390-ccw: virtio_load_direct() can't load max number of sectors
Date: Wed, 18 Jun 2014 14:16:44 +0200	[thread overview]
Message-ID: <1403093807-32836-2-git-send-email-jfrei@linux.vnet.ibm.com> (raw)
In-Reply-To: <1403093807-32836-1-git-send-email-jfrei@linux.vnet.ibm.com>

From: David Hildenbrand <dahi@linux.vnet.ibm.com>

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 <dahi@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 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.8.5.5

  reply	other threads:[~2014-06-18 12:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 12:16 [Qemu-devel] [PATCH 0/4] s390-ccw.img: s390-ccw.img fixes Jens Freimann
2014-06-18 12:16 ` Jens Freimann [this message]
2014-06-18 12:16 ` [Qemu-devel] [PATCH 2/4] pc-bios/s390-ccw: do a subsystem reset before running the guest Jens Freimann
2014-06-18 12:16 ` [Qemu-devel] [PATCH 3/4] pc-bios/s390-ccw: fix for fragmented SCSI bootmap Jens Freimann
2014-06-18 12:53   ` Eugene "jno" Dvurechenski
2014-06-23 10:47     ` Cornelia Huck
2014-06-18 12:16 ` [Qemu-devel] [PATCH 4/4] pc-bios/s390-ccw: update s390-ccw.img binary Jens Freimann
2014-06-18 13:06 ` [Qemu-devel] [PATCH 0/4] s390-ccw.img: s390-ccw.img fixes Alexander Graf
2014-06-23 10:48 ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403093807-32836-2-git-send-email-jfrei@linux.vnet.ibm.com \
    --to=jfrei@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dahi@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).