mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-26 16:28:12 +00:00
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:
committed by
Will Deacon
parent
10943d14eb
commit
e93ab78a73
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user