提交 a2eebe88 编写于 作者: A Amit Shah 提交者: Anthony Liguori

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: NAmit Shah <amit.shah@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 6616b2ad
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册