diff mbox series

[RFC,v4,05/16] vl: Set machine ram_size, maxram_size and ram_slots earlier

Message ID 20181018143042.29588-6-eric.auger@redhat.com
State New
Headers show
Series ARM virt: PCDIMM/NVDIMM at 2TB | expand

Commit Message

Eric Auger Oct. 18, 2018, 2:30 p.m. UTC
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>

---

v4: new
---
 vl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/vl.c b/vl.c
index 4e25c78bff..35b426debd 100644
--- a/vl.c
+++ b/vl.c
@@ -4266,6 +4266,9 @@  int main(int argc, char **argv, char **envp)
         object_unref(OBJECT(current_machine));
         exit(1);
     }
+    current_machine->ram_size = ram_size;
+    current_machine->maxram_size = maxram_size;
+    current_machine->ram_slots = ram_slots;
 
     configure_accelerator(current_machine);
 
@@ -4470,9 +4473,6 @@  int main(int argc, char **argv, char **envp)
     replay_checkpoint(CHECKPOINT_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;
 
     /* parse features once if machine provides default cpu_type */