mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
pc: Avoid registering zero sized memory
No need to call cpu_register_physical_memory() for a zero sized area. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f077caa99c
commit
bbe80adf29
1 changed files with 4 additions and 2 deletions
6
hw/pc.c
6
hw/pc.c
|
@ -916,8 +916,10 @@ void pc_memory_init(ram_addr_t ram_size,
|
|||
below_4g_mem_size - 0x100000,
|
||||
ram_addr + 0x100000);
|
||||
#if TARGET_PHYS_ADDR_BITS > 32
|
||||
cpu_register_physical_memory(0x100000000ULL, above_4g_mem_size,
|
||||
ram_addr + below_4g_mem_size);
|
||||
if (above_4g_mem_size > 0) {
|
||||
cpu_register_physical_memory(0x100000000ULL, above_4g_mem_size,
|
||||
ram_addr + below_4g_mem_size);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* BIOS load */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue