aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/x86.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-05-29 09:39:56 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-06-17 14:24:22 +0200
commit9a45729d3bfcc87a23efaab84092473e770d900b (patch)
tree881e2d2ce2c8715758b598fa18a1fc2c3f3a9def /hw/i386/x86.c
parent3235936e306b5eae6291907e4d675f226707fd14 (diff)
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
Diffstat (limited to 'hw/i386/x86.c')
-rw-r--r--hw/i386/x86.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index bb31935f70..34229b45c7 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -846,45 +846,6 @@ void x86_bios_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw)
bios);
}
-static void x86_machine_get_max_ram_below_4g(Object *obj, Visitor *v,
- const char *name, void *opaque,
- Error **errp)
-{
- X86MachineState *x86ms = X86_MACHINE(obj);
- uint64_t value = x86ms->max_ram_below_4g;
-
- visit_type_size(v, name, &value, errp);
-}
-
-static void x86_machine_set_max_ram_below_4g(Object *obj, Visitor *v,
- const char *name, void *opaque,
- Error **errp)
-{
- X86MachineState *x86ms = X86_MACHINE(obj);
- Error *error = NULL;
- uint64_t value;
-
- visit_type_size(v, name, &value, &error);
- if (error) {
- error_propagate(errp, error);
- return;
- }
- if (value > 4 * GiB) {
- error_setg(&error,
- "Machine option 'max-ram-below-4g=%"PRIu64
- "' expects size less than or equal to 4G", value);
- error_propagate(errp, error);
- return;
- }
-
- if (value < 1 * MiB) {
- warn_report("Only %" PRIu64 " bytes of RAM below the 4GiB boundary,"
- "BIOS may not work with less than 1MiB", value);
- }
-
- x86ms->max_ram_below_4g = value;
-}
-
bool x86_machine_is_smm_enabled(X86MachineState *x86ms)
{
bool smm_available = false;
@@ -958,7 +919,6 @@ static void x86_machine_initfn(Object *obj)
x86ms->smm = ON_OFF_AUTO_AUTO;
x86ms->acpi = ON_OFF_AUTO_AUTO;
- x86ms->max_ram_below_4g = 0; /* use default */
x86ms->smp_dies = 1;
x86ms->apicid_from_cpu_idx = x86_apicid_from_cpu_idx;
@@ -980,12 +940,6 @@ static void x86_machine_class_init(ObjectClass *oc, void *data)
x86mc->save_tsc_khz = true;
nc->nmi_monitor_handler = x86_nmi;
- object_class_property_add(oc, X86_MACHINE_MAX_RAM_BELOW_4G, "size",
- x86_machine_get_max_ram_below_4g, x86_machine_set_max_ram_below_4g,
- NULL, NULL);
- object_class_property_set_description(oc, X86_MACHINE_MAX_RAM_BELOW_4G,
- "Maximum ram below the 4G boundary (32bit boundary)");
-
object_class_property_add(oc, X86_MACHINE_SMM, "OnOffAuto",
x86_machine_get_smm, x86_machine_set_smm,
NULL, NULL);