* [Qemu-devel] [PATCH] pc: Avoid registering zero sized memory
@ 2010-07-06 16:37 Alex Williamson
0 siblings, 0 replies; only message in thread
From: Alex Williamson @ 2010-07-06 16:37 UTC (permalink / raw)
To: qemu-devel, anthony; +Cc: alex.williamson
No need to call cpu_register_physical_memory() for a zero sized area.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/pc.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index a96187f..58dea57 100644
--- a/hw/pc.c
+++ b/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 */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-06 16:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06 16:37 [Qemu-devel] [PATCH] pc: Avoid registering zero sized memory Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).