]> Git Repo - qemu.git/commitdiff
pc-bios/s390-ccw: virtio_load_direct() can't load max number of sectors
authorDavid Hildenbrand <[email protected]>
Wed, 18 Jun 2014 12:16:44 +0000 (14:16 +0200)
committerCornelia Huck <[email protected]>
Mon, 23 Jun 2014 12:03:31 +0000 (14:03 +0200)
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 <[email protected]>
Signed-off-by: Jens Freimann <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: Alexander Graf <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
pc-bios/s390-ccw/virtio.c

index a46914dd68fa8b0471ca798f695f7369e190deef..bbb3c4f36d7ba9a7746481ebf6241c61211c1186 100644 (file)
@@ -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;
 
This page took 0.027551 seconds and 4 git commands to generate.