kvm: Read the whole bzImage to memory

We need to read the whole bzImage to memory; otherwise we miss some of the
setup code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
This commit is contained in:
Pekka Enberg
2010-03-27 10:15:18 +02:00
committed by Will Deacon
parent 10943d14eb
commit e93ab78a73
+3
View File
@@ -212,6 +212,9 @@ static bool load_bzimage(struct kvm *kvm, int fd)
if (memcmp(&boot.hdr.header, BZIMAGE_MAGIC, strlen(BZIMAGE_MAGIC)) != 0)
return false;
if (lseek(fd, 0, SEEK_SET) < 0)
die_perror("lseek");
setup_sects = boot.hdr.setup_sects + 1;
if (setup_sects == 0)
setup_sects = BZ_DEFAULT_SETUP_SECTS;