mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
i386: do not use ram_size global
Use the loader parameters instead. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
bfdf22bc76
commit
86378b29fa
5 changed files with 10 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue