From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRowJ-0004f0-O3 for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:29:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRowI-0004dX-9f for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:29:19 -0500 Received: from [199.232.76.173] (port=46228 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRowH-0004dG-Tk for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:29:17 -0500 Received: from savannah.gnu.org ([199.232.41.3]:50102 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LRowH-0007kp-Ma for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:29:17 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LRowG-0005dl-Pv for qemu-devel@nongnu.org; Tue, 27 Jan 2009 14:29:16 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LRowG-0005dh-Hd for qemu-devel@nongnu.org; Tue, 27 Jan 2009 14:29:16 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Tue, 27 Jan 2009 14:29:16 +0000 Subject: [Qemu-devel] [6464] block-vpc: Fix support for images > 4 GB (Kevin Wolf) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Signed-off-by: Anthony Liguori 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