qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [6464] block-vpc: Fix support for images > 4 GB (Kevin Wolf


From: Anthony Liguori
Subject: [Qemu-devel] [6464] block-vpc: Fix support for images > 4 GB (Kevin Wolf)
Date: Tue, 27 Jan 2009 14:29:16 +0000

Revision: 6464
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6464
Author:   aliguori
Date:     2009-01-27 14:29:15 +0000 (Tue, 27 Jan 2009)

Log Message:
-----------
block-vpc: Fix support for images > 4 GB (Kevin Wolf)

This patch fixes the truncation of sector offsets to 32 bits.

Signed-off-by: Kevin Wolf <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

Modified Paths:
--------------
    trunk/block-vpc.c

Modified: trunk/block-vpc.c
===================================================================
--- trunk/block-vpc.c   2009-01-26 22:21:30 UTC (rev 6463)
+++ trunk/block-vpc.c   2009-01-27 14:29:15 UTC (rev 6464)
@@ -256,7 +256,7 @@
     if (pagetable_index >= s->max_table_entries || 
s->pagetable[pagetable_index] == 0xffffffff)
         return -1; // not allocated
 
-    bitmap_offset = 512 * s->pagetable[pagetable_index];
+    bitmap_offset = 512 * (uint64_t) s->pagetable[pagetable_index];
     block_offset = bitmap_offset + s->bitmap_size + (512 * pageentry_index);
 
     // We must ensure that we don't write to any sectors which are marked as






reply via email to

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