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>
This commit is contained in:
Amit Shah 2010-02-04 20:16:22 +05:30 committed by Anthony Liguori
parent 6616b2adb5
commit a2eebe88fd
1 changed files with 3 additions and 6 deletions

View File

@ -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,