diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-28 06:22:23 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:08 -0500 |
commit | 86378b29fa22a9854a084241bf51515e149133e4 (patch) | |
tree | 06faf85e7ccbaff47062b038dc26bf7ee6a2cab1 /hw/intc | |
parent | bfdf22bc769a56d8e1fe7c72a28ef05c0a6d8596 (diff) | |
download | qemu-86378b29fa22a9854a084241bf51515e149133e4.zip qemu-86378b29fa22a9854a084241bf51515e149133e4.tar.gz qemu-86378b29fa22a9854a084241bf51515e149133e4.tar.bz2 |
i386: do not use ram_size global
Use the loader parameters instead.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/apic_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 502e94e..97dd96d 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -27,6 +27,7 @@ #include "hw/i386/apic.h" #include "hw/i386/apic_internal.h" #include "trace.h" +#include "hw/boards.h" #include "sysemu/hax.h" #include "sysemu/kvm.h" #include "hw/qdev-properties.h" @@ -297,7 +298,7 @@ static void apic_common_realize(DeviceState *dev, Error **errp) /* Note: We need at least 1M to map the VAPIC option ROM */ if (!vapic && s->vapic_control & VAPIC_ENABLE_MASK && - !hax_enabled() && ram_size >= 1024 * 1024) { + !hax_enabled() && current_machine->ram_size >= 1024 * 1024) { vapic = sysbus_create_simple("kvmvapic", -1, NULL); } s->vapic = vapic; |