vl.c: HAX needs ram_size for initializing
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 7 Oct 2015 04:17:38 +0000 (13:17 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 8 Oct 2015 03:31:45 +0000 (12:31 +0900)
configure_accelerator() uses current_machine as parameter. But
current_machine struct does not contain proper ram_size since it is
set just before machine init. So configure_accelerator() should run
after entire current_machine memebers are prepared.

Change-Id: I944d60d1768bb0512350cbd2ca4a62e3962515ca
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
vl.c

diff --git a/vl.c b/vl.c
index b0c8e5e8ac960db61e823dac08225ecd91ac4a2e..85852398f8a8909a1530818b6aef1d6604d74a67 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -4497,8 +4497,6 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
-    configure_accelerator(current_machine);
-
     if (qtest_chrdev) {
         Error *local_err = NULL;
         qtest_init(qtest_chrdev, qtest_log, &local_err);
@@ -4689,6 +4687,8 @@ int main(int argc, char **argv, char **envp)
     current_machine->boot_order = boot_order;
     current_machine->cpu_model = cpu_model;
 
+    configure_accelerator(current_machine);
+
     machine_class->init(current_machine);
 
     realtime_init();