[PATCH kvmtool] x86: Fix bios memory size in e820_setup

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

 



The memory region of MB_BIOS is [MB_BIOS_BEGIN, MB_BIOS_END],
so its memory size should be MB_BIOS_END - MB_BIOS_BEGIN + 1.

Signed-off-by: Sicheng Liu <lsc2001@xxxxxxxxxxx>
---
 x86/bios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/bios.c b/x86/bios.c
index 5ac9e24ae0a8..380e0aba7129 100644
--- a/x86/bios.c
+++ b/x86/bios.c
@@ -75,7 +75,7 @@ static void e820_setup(struct kvm *kvm)
 	};
 	mem_map[i++]	= (struct e820entry) {
 		.addr		= MB_BIOS_BEGIN,
-		.size		= MB_BIOS_END - MB_BIOS_BEGIN,
+		.size		= MB_BIOS_END - MB_BIOS_BEGIN + 1,
 		.type		= E820_RESERVED,
 	};
 	if (kvm->ram_size < KVM_32BIT_GAP_START) {
-- 
2.25.1





[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