[PATCH] kvmtool: handle x86 firmware smaller than 128k

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 x86/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/boot.c b/x86/boot.c
index 61535eb57b..b7a4262d89 100644
--- a/x86/boot.c
+++ b/x86/boot.c
@@ -28,7 +28,7 @@ bool kvm__load_firmware(struct kvm *kvm, const char *firmware_filename)
 	if (st.st_size > MB_FIRMWARE_BIOS_SIZE)
 		die("firmware image %s is too big to fit in memory (%Lu KB).\n", firmware_filename, (u64)(st.st_size / 1024));
 
-	p = guest_flat_to_host(kvm, MB_FIRMWARE_BIOS_BEGIN);
+	p = guest_flat_to_host(kvm, MB_BIOS_END + 1 - st.st_size);
 
 	while ((nr = read(fd, p, st.st_size)) > 0)
 		p += nr;
-- 
2.9.3




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux