From 8935c7723c92aed73c2d7dfe2435829eade30246 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Wed, 21 Dec 2016 18:27:49 +0900 Subject: [PATCH] hax: change run_on_cpu() arguments Change-Id: I8d389ee650b986e1ea522c7a623beb69ed225e2d Signed-off-by: SeokYeon Hwang --- target-i386/hax-all.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/target-i386/hax-all.c b/target-i386/hax-all.c index 77945f0..aa80715 100644 --- a/target-i386/hax-all.c +++ b/target-i386/hax-all.c @@ -902,9 +902,8 @@ static int hax_vcpu_hax_exec(CPUArchState *env, int ug_platform) return ret; } -static void do_hax_cpu_synchronize_state(void *arg) +static void do_hax_cpu_synchronize_state(CPUState *cpu, run_on_cpu_data arg) { - CPUState *cpu = arg; CPUArchState *env = cpu->env_ptr; hax_arch_get_registers(env); @@ -919,12 +918,11 @@ void hax_cpu_synchronize_state(CPUState *cpu) * wherever a vCPU state sync between QEMU and HAX takes place. For now, * just perform the sync regardless of hax_vcpu_dirty. */ - run_on_cpu(cpu, do_hax_cpu_synchronize_state, cpu); + run_on_cpu(cpu, do_hax_cpu_synchronize_state, RUN_ON_CPU_NULL); } -static void do_hax_cpu_synchronize_post_reset(void *arg) +static void do_hax_cpu_synchronize_post_reset(CPUState *cpu, run_on_cpu_data arg) { - CPUState *cpu = arg; CPUArchState *env = cpu->env_ptr; hax_vcpu_sync_state(env, 1); @@ -933,12 +931,11 @@ static void do_hax_cpu_synchronize_post_reset(void *arg) void hax_cpu_synchronize_post_reset(CPUState * cpu) { - run_on_cpu(cpu, do_hax_cpu_synchronize_post_reset, cpu); + run_on_cpu(cpu, do_hax_cpu_synchronize_post_reset, RUN_ON_CPU_NULL); } -static void do_hax_cpu_synchronize_post_init(void *arg) +static void do_hax_cpu_synchronize_post_init(CPUState *cpu, run_on_cpu_data arg) { - CPUState *cpu = arg; CPUArchState *env = cpu->env_ptr; hax_vcpu_sync_state(env, 1); @@ -947,7 +944,7 @@ static void do_hax_cpu_synchronize_post_init(void *arg) void hax_cpu_synchronize_post_init(CPUState * cpu) { - run_on_cpu(cpu, do_hax_cpu_synchronize_post_init, cpu); + run_on_cpu(cpu, do_hax_cpu_synchronize_post_init, RUN_ON_CPU_NULL); } /* -- 2.7.4