diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-02-04 20:16:22 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-10 12:45:04 -0600 |
commit | a2eebe88fdb95d04917a4d1b794fda5319b15879 (patch) | |
tree | 21e3a131735c780bce46d4b284118a57b79c9602 | |
parent | 6616b2adb5569b0eec589bd66d8ee21225e6ee0d (diff) | |
download | hqemu-a2eebe88fdb95d04917a4d1b794fda5319b15879.zip hqemu-a2eebe88fdb95d04917a4d1b794fda5319b15879.tar.gz |
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 <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | kvm-all.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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, |