qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6464] block-vpc: Fix support for images > 4 GB (Kevin Wolf)
@ 2009-01-27 14:29 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-01-27 14:29 UTC (permalink / raw)
  To: qemu-devel

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 <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-27 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 14:29 [Qemu-devel] [6464] block-vpc: Fix support for images > 4 GB (Kevin Wolf) Anthony Liguori

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).