vl: Set machine ram_size, maxram_size and ram_slots earlier
The machine RAM attributes will need to be analyzed during the configure_accelerator() process. especially kvm_type() arm64 machine callback will use them to know how many IPA/GPA bits are needed to model the whole RAM range. So let's assign those machine state fields before calling configure_accelerator. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: 20190304101339.25970-7-eric.auger@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
a27382e210
commit
ee6850110c
6
vl.c
6
vl.c
@ -4239,6 +4239,9 @@ int main(int argc, char **argv, char **envp)
|
|||||||
machine_opts = qemu_get_machine_opts();
|
machine_opts = qemu_get_machine_opts();
|
||||||
qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
|
qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
|
||||||
&error_fatal);
|
&error_fatal);
|
||||||
|
current_machine->ram_size = ram_size;
|
||||||
|
current_machine->maxram_size = maxram_size;
|
||||||
|
current_machine->ram_slots = ram_slots;
|
||||||
|
|
||||||
configure_accelerator(current_machine, argv[0]);
|
configure_accelerator(current_machine, argv[0]);
|
||||||
|
|
||||||
@ -4434,9 +4437,6 @@ int main(int argc, char **argv, char **envp)
|
|||||||
replay_checkpoint(CHECKPOINT_INIT);
|
replay_checkpoint(CHECKPOINT_INIT);
|
||||||
qdev_machine_init();
|
qdev_machine_init();
|
||||||
|
|
||||||
current_machine->ram_size = ram_size;
|
|
||||||
current_machine->maxram_size = maxram_size;
|
|
||||||
current_machine->ram_slots = ram_slots;
|
|
||||||
current_machine->boot_order = boot_order;
|
current_machine->boot_order = boot_order;
|
||||||
|
|
||||||
/* parse features once if machine provides default cpu_type */
|
/* parse features once if machine provides default cpu_type */
|
||||||
|
Loading…
Reference in New Issue
Block a user