[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH stable-0.15 25/36] block: Fix vpc initialization of
From: |
Andreas Färber |
Subject: |
[Qemu-stable] [PATCH stable-0.15 25/36] block: Fix vpc initialization of the Dynamic Disk Header |
Date: |
Wed, 28 Mar 2012 14:52:28 +0200 |
From: Charles Arnold <address@hidden>
The Data Offset field in the Dynamic Disk Header is an 8 byte field.
Although the specification (2006-10-11) gives an example of initializing
only the first 4 bytes, images generated by Microsoft on Windows initialize
all 8 bytes.
Failure to initialize all 8 bytes results in errors from utilities
like Citrix's vhd-util which checks specifically for the proper Data
Offset field initialization.
Signed-off-by: Charles Arnold <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
(cherry picked from commit 78439f6af1caa3e8bdafc9fc2d62aeefa53ed63a)
Signed-off-by: Bruce Rogers <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
block/vpc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 56865da..ac33e15 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -587,7 +587,11 @@ static int vpc_create(const char *filename,
QEMUOptionParameter *options)
memcpy(dyndisk_header->magic, "cxsparse", 8);
- dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFF);
+ /*
+ * Note: The spec is actually wrong here for data_offset, it says
+ * 0xFFFFFFFF, but MS tools expect all 64 bits to be set.
+ */
+ dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFFFFFFFFFFULL);
dyndisk_header->table_offset = be64_to_cpu(3 * 512);
dyndisk_header->version = be32_to_cpu(0x00010000);
dyndisk_header->block_size = be32_to_cpu(block_size);
--
1.7.7
- [Qemu-stable] [PATCH stable-0.15 00/36] Preparing 0.15.2, Andreas Färber, 2012/03/29
- [Qemu-stable] [PATCH stable-0.15 01/36] ccid: Fix buffer overrun in handling of VSC_ATR message, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 11/36] acl: Fix use after free in qemu_acl_reset(), Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 25/36] block: Fix vpc initialization of the Dynamic Disk Header,
Andreas Färber <=
- [Qemu-stable] [PATCH stable-0.15 13/36] Fix X86 CPU topology in KVM mode, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 07/36] kvm: avoid reentring kvm_flush_coalesced_mmio_buffer(), Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 10/36] ide: Fix off-by-one error in array index check, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 27/36] block: reinitialize across bdrv_close()/bdrv_open(), Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 20/36] hda: do not mix output and input stream states, RHBZ #740493, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 09/36] block: Fix bdrv_open use after free, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 23/36] block: set bs->read_only before .bdrv_open(), Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 17/36] vns/tls: don't use depricated gnutls functions, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 08/36] vmdk: vmdk_read_cid returns garbage if p_name is NULL, Andreas Färber, 2012/03/28
- [Qemu-stable] [PATCH stable-0.15 29/36] vmdk: Fix possible segfaults, Andreas Färber, 2012/03/28