From bf45b6946f2a86025cc1a4b05b1fbed17e16b7e3 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Wed, 7 Oct 2015 13:17:38 +0900 Subject: [PATCH] vl.c: HAX needs ram_size for initializing 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 --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index b0c8e5e8ac..85852398f8 100644 --- 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(); -- 2.34.1