提交 269d25cd 编写于 作者: M Marc-André Lureau 提交者: Markus Armbruster

colo: check chardev can switch context

COLO uses a worker context (iothread) to drive the chardev. All
backends are not able to switch the context, let's report an error in
this case.
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20181205203737.9011-6-marcandre.lureau@redhat.com>
Reviewed-by: NLi Zhijian <lizhiian@cn.fujitsu.com>
Reviewed-by: NZhang Chen <zhangckid@gmail.com>
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
上级 a9a0d9b9
......@@ -957,6 +957,12 @@ static int find_and_check_chardev(Chardev **chr,
return 1;
}
if (!qemu_chr_has_feature(*chr, QEMU_CHAR_FEATURE_GCONTEXT)) {
error_setg(errp, "chardev \"%s\" cannot switch context",
chr_name);
return 1;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册