mirror of https://github.com/xemu-project/xemu.git
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:
parent
6616b2adb5
commit
a2eebe88fd
|
@ -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)
|
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_IOTHREAD
|
#ifdef CONFIG_IOTHREAD
|
||||||
if (env == cpu_single_env) {
|
if (env != cpu_single_env) {
|
||||||
func(data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
abort();
|
abort();
|
||||||
#else
|
}
|
||||||
func(data);
|
|
||||||
#endif
|
#endif
|
||||||
|
func(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
|
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
|
||||||
|
|
Loading…
Reference in New Issue