Message ID | 74600145b71da09b12e2e4ff750401d7b2772253.1422539139.git.pkrempa@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c7af6aa..8cf405a 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1246,6 +1246,13 @@ FWCfgState *pc_memory_init(MachineState *machine, exit(EXIT_FAILURE); } + if (QEMU_ALIGN_UP(machine->maxram_size, + TARGET_PAGE_SIZE) != machine->maxram_size) { + error_report("maximum memory size must by aligned to multiple of " + "%d bytes", TARGET_PAGE_SIZE); + exit(EXIT_FAILURE); + } + pcms->hotplug_memory_base = ROUND_UP(0x100000000ULL + above_4g_mem_size, 1ULL << 30);