qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 05/11] colo: check chardev can switch context


From: Markus Armbruster
Subject: [Qemu-devel] [PULL 05/11] colo: check chardev can switch context
Date: Wed, 12 Dec 2018 11:11:39 +0100

From: Marc-André Lureau <address@hidden>

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: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Li Zhijian <address@hidden>
Reviewed-by: Zhang Chen <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
 net/colo-compare.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/colo-compare.c b/net/colo-compare.c
index a39191d522..9156ab3349 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -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;
 }
 
-- 
2.17.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]