Skip to content

Commit 3235936

Browse files
committed
microvm: drop max-ram-below-4g support
Not useful for microvm and allows users to shoot themself into the foot (make ram + mmio overlap). Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Igor Mammedov <[email protected]> Acked-by: Paolo Bonzini <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Message-id: [email protected]
1 parent e289655 commit 3235936

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

hw/i386/microvm.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -173,25 +173,6 @@ static void microvm_memory_init(MicrovmMachineState *mms)
173173
ram_addr_t lowmem = 0xc0000000; /* 3G */
174174
int i;
175175

176-
/*
177-
* Handle the machine opt max-ram-below-4g. It is basically doing
178-
* min(qemu limit, user limit).
179-
*/
180-
if (!x86ms->max_ram_below_4g) {
181-
x86ms->max_ram_below_4g = 4 * GiB;
182-
}
183-
if (lowmem > x86ms->max_ram_below_4g) {
184-
lowmem = x86ms->max_ram_below_4g;
185-
if (machine->ram_size - lowmem > lowmem &&
186-
lowmem & (1 * GiB - 1)) {
187-
warn_report("There is possibly poor performance as the ram size "
188-
" (0x%" PRIx64 ") is more then twice the size of"
189-
" max-ram-below-4g (%"PRIu64") and"
190-
" max-ram-below-4g is not a multiple of 1G.",
191-
(uint64_t)machine->ram_size, x86ms->max_ram_below_4g);
192-
}
193-
}
194-
195176
if (machine->ram_size > lowmem) {
196177
x86ms->above_4g_mem_size = machine->ram_size - lowmem;
197178
x86ms->below_4g_mem_size = lowmem;

0 commit comments

Comments
 (0)