From a2eebe88fdb95d04917a4d1b794fda5319b15879 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Thu, 4 Feb 2010 20:16:22 +0530 Subject: [PATCH] kvm: reduce code duplication in config_iothread We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else cases. Fix that. Signed-off-by: Amit Shah Signed-off-by: Anthony Liguori --- kvm-all.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 684c9c4a6a..79345b2837 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -935,14 +935,11 @@ void kvm_setup_guest_memory(void *start, size_t size) static void on_vcpu(CPUState *env, void (*func)(void *data), void *data) { #ifdef CONFIG_IOTHREAD - if (env == cpu_single_env) { - func(data); - return; + if (env != cpu_single_env) { + abort(); } - abort(); -#else - func(data); #endif + func(data); } struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env, -- 2.30.2