mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-05 05:01:33 +00:00
kvm tools: Bring mptables back in case if no firmware used
In case if no firmware used we should put mptables at repdefined address thus kernel scanner will recognized it. For this make a distinction between firmware address and own bios address. Reported-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
ce08f2afa8
commit
22f50b6ca5
+2
-2
@@ -25,10 +25,10 @@ bool kvm__load_firmware(struct kvm *kvm, const char *firmware_filename)
|
||||
if (fstat(fd, &st))
|
||||
return false;
|
||||
|
||||
if (st.st_size > MB_BIOS_SIZE)
|
||||
if (st.st_size > MB_FIRMWARE_BIOS_SIZE)
|
||||
die("firmware image %s is too big to fit in memory (%lu KB).\n", firmware_filename, st.st_size / 1024);
|
||||
|
||||
p = guest_flat_to_host(kvm, MB_BIOS_BEGIN);
|
||||
p = guest_flat_to_host(kvm, MB_FIRMWARE_BIOS_BEGIN);
|
||||
|
||||
while ((nr = read(fd, p, st.st_size)) > 0)
|
||||
p += nr;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* EBDA area 0x0009FC00 0x0009FFFF
|
||||
* VIDEO RAM 0x000A0000 0x000BFFFF
|
||||
* VIDEO ROM (BIOS) 0x000C0000 0x000C7FFF
|
||||
* ROMs & unus. space (mapped hw & misc)0x000C8000 0x000EFFFF 160 KiB (typically)
|
||||
* Motherboard BIOS 0x000F0000 0x000FFFFF
|
||||
* Extended Memory 0x00100000 0xFEBFFFFF
|
||||
* Reserved (configs, ACPI, PnP, etc) 0xFEC00000 0xFFFFFFFF
|
||||
@@ -26,9 +27,12 @@
|
||||
|
||||
#define E820_MAP_START EBDA_START
|
||||
|
||||
#define MB_BIOS_BEGIN 0x000e0000
|
||||
#define MB_BIOS_BEGIN 0x000f0000
|
||||
#define MB_FIRMWARE_BIOS_BEGIN 0x000e0000
|
||||
#define MB_BIOS_END 0x000fffff
|
||||
|
||||
#define MB_BIOS_SIZE (MB_BIOS_END - MB_BIOS_BEGIN + 1)
|
||||
#define MB_FIRMWARE_BIOS_SIZE (MB_BIOS_END - MB_FIRMWARE_BIOS_BEGIN + 1)
|
||||
|
||||
#define VGA_RAM_BEGIN 0x000a0000
|
||||
#define VGA_RAM_END 0x000bffff
|
||||
|
||||
Reference in New Issue
Block a user