x86: move max-ram-below-4g to pc

Move from X86MachineClass to PCMachineClass so it disappears
from microvm machine type property list.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Message-id: 20200529073957.8018-4-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2020-05-29 09:39:56 +02:00
parent 3235936e30
commit 9a45729d3b
7 changed files with 59 additions and 61 deletions

View file

@ -129,11 +129,11 @@ static void pc_init1(MachineState *machine,
if (xen_enabled()) {
xen_hvm_init(pcms, &ram_memory);
} else {
if (!x86ms->max_ram_below_4g) {
x86ms->max_ram_below_4g = 0xe0000000; /* default: 3.5G */
if (!pcms->max_ram_below_4g) {
pcms->max_ram_below_4g = 0xe0000000; /* default: 3.5G */
}
lowmem = x86ms->max_ram_below_4g;
if (machine->ram_size >= x86ms->max_ram_below_4g) {
lowmem = pcms->max_ram_below_4g;
if (machine->ram_size >= pcms->max_ram_below_4g) {
if (pcmc->gigabyte_align) {
if (lowmem > 0xc0000000) {
lowmem = 0xc0000000;
@ -142,7 +142,7 @@ static void pc_init1(MachineState *machine,
warn_report("Large machine and max_ram_below_4g "
"(%" PRIu64 ") not a multiple of 1G; "
"possible bad performance.",
x86ms->max_ram_below_4g);
pcms->max_ram_below_4g);
}
}
}