qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 1/4] pc-bios/s390-ccw: virtio_load_direct() can't loa


From: Cornelia Huck
Subject: [Qemu-devel] [PULL 1/4] pc-bios/s390-ccw: virtio_load_direct() can't load max number of sectors
Date: Mon, 23 Jun 2014 14:25:22 +0200

From: David Hildenbrand <address@hidden>

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 <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Alexander Graf <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]