From patchwork Mon May 11 11:14:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11540247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4EAB15AB for ; Mon, 11 May 2020 11:18:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B1EA20722 for ; Mon, 11 May 2020 11:18:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="Ls5hh1hN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B1EA20722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:59688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY6S0-0002yu-DJ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 May 2020 07:18:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY6OT-0000Nb-FK; Mon, 11 May 2020 07:14:45 -0400 Received: from mout.web.de ([212.227.17.11]:45173) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jY6OS-0006pG-Er; Mon, 11 May 2020 07:14:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1589195679; bh=69isl/oloXKqCgT1lMh7Rv9glCgzyS4DtmEifV3kP2Y=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=Ls5hh1hNeY5R9PSRPcu0l8xb9iP8cgvDfwuYZvKhzmNCphsc7EhdeNzPh+ZWkJdPq dCSB3itY0opts2furo1sGH4TKfZcTZ5FKyqe3sf8UNJePEkPDXIJErsD5+Y5ajV6GS 9JCYXCkygiweynZ0ncWoGRc+3+1JFqEdPwGiOCNg= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.192]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1N7gXQ-1j40SL0KZe-014gPR; Mon, 11 May 2020 13:14:39 +0200 Date: Mon, 11 May 2020 13:14:37 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH 1/5] Introduce yank feature Message-ID: <99931d0c9ab23eb641bd612e154f007348afa690.1589193717.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:MJUelbv6jUA0wE0LZky0xBVwVS9C3aZj3VVV3jOfm7HZnRG5Mm0 QY4q73Ow6G9i6DBZaNmccKdFCL1AX30vLnN6xSvjqoz+5KKVGTaW3EnBk7InpRL+7DXpsV7 vkK3cI+w8qTBbaAiavTEpyhT0IIx7R2OAA2LPBtZxfh4qS+gBnZ4Cq3BvXLi/R8KyHKOM1q tBB6JTCxGYekgDGRQnAFg== X-UI-Out-Filterresults: notjunk:1;V03:K0:zVbW5lOgWBg=:0lyFw7JO3+DbF/yjYHeZDj SVyQQI0VVcepf5xP72yT5xqOJoKSQUtL0KbNIEaVgm5LqI2Srzhit0q/Fg5RA0dV0T/GTK4Dc ds1ePzZWf1lcXlCkY1R+Fgi7KpZksphPoLvDIGK1Dkng6JGlxyBSkYMpS7PF7iBZgyLi2phw+ DVOr6PfmZql8DqngKZBpWM/dBEQ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Received-SPF: pass client-ip=212.227.17.11; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 07:14:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register yank functions which will be called by the 'yank' out-of-band qmp command. Signed-off-by: Lukas Straub --- qapi/misc.json | 15 ++++++++++ softmmu/vl.c | 2 ++ yank.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ yank.h | 12 ++++++++ 4 files changed, 104 insertions(+) create mode 100644 yank.c create mode 100644 yank.h diff --git a/qapi/misc.json b/qapi/misc.json index 99b90ac80b..de1ee494ae 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1550,3 +1550,18 @@ ## { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } +## +# @yank: +# +# Recover from hanging qemu by calling yank functions. +# +# Returns: nothing. +# +# Example: +# +# -> { "execute": "yank" } +# <- { "return": {} } +# +# Since: 5.1 +## +{ 'command': 'yank', 'allow-oob': true } diff --git a/softmmu/vl.c b/softmmu/vl.c index 32c0047889..5d99749d29 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -112,6 +112,7 @@ #include "qapi/qmp/qerror.h" #include "sysemu/iothread.h" #include "qemu/guest-random.h" +#include "yank.h" #define MAX_VIRTIO_CONSOLES 1 @@ -2906,6 +2907,7 @@ void qemu_init(int argc, char **argv, char **envp) precopy_infrastructure_init(); postcopy_infrastructure_init(); monitor_init_globals(); + yank_init(); if (qcrypto_init(&err) < 0) { error_reportf_err(err, "cannot initialize crypto: "); diff --git a/yank.c b/yank.c new file mode 100644 index 0000000000..cefbfd8ab5 --- /dev/null +++ b/yank.c @@ -0,0 +1,75 @@ +/* + * QEMU yank feature + * + * Copyright (c) Lukas Straub + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qemu/thread.h" +#include "qemu/queue.h" +#include "yank.h" + +struct YankFuncAndParam { + YankFn *func; + void *opaque; + QLIST_ENTRY(YankFuncAndParam) next; +}; + +static QemuMutex lock; +static QLIST_HEAD(qlisthead, YankFuncAndParam) head + = QLIST_HEAD_INITIALIZER(head); + +void yank_register_function(YankFn *func, void *opaque) +{ + struct YankFuncAndParam *tmp = g_malloc(sizeof(struct YankFuncAndParam)); + tmp->func = func; + tmp->opaque = opaque; + + qemu_mutex_lock(&lock); + QLIST_INSERT_HEAD(&head, tmp, next); + qemu_mutex_unlock(&lock); +} + +void yank_unregister_function(YankFn *func, void *opaque) +{ + qemu_mutex_lock(&lock); + + struct YankFuncAndParam *tmp; + QLIST_FOREACH(tmp, &head, next) { + if (tmp->func == func && tmp->opaque == opaque) { + QLIST_REMOVE(tmp, next); + g_free(tmp); + qemu_mutex_unlock(&lock); + return; + } + } + + abort(); +} + +void yank_call_functions(void) +{ + qemu_mutex_lock(&lock); + + struct YankFuncAndParam *tmp; + QLIST_FOREACH(tmp, &head, next) { + tmp->func(tmp->opaque); + } + + qemu_mutex_unlock(&lock); +} + +void qmp_yank(Error **errp) +{ + yank_call_functions(); +} + +void yank_init(void) +{ + qemu_mutex_init(&lock); + QLIST_INIT(&head); +} diff --git a/yank.h b/yank.h new file mode 100644 index 0000000000..7376224219 --- /dev/null +++ b/yank.h @@ -0,0 +1,12 @@ + +#ifndef YANK_H +#define YANK_H + +typedef void (YankFn) (void *opaque); + +void yank_register_function(YankFn *func, void *opaque); +void yank_unregister_function(YankFn *func, void *opaque); +void yank_call_functions(void); +void yank_init(void); +void qmp_yank(Error **errp); +#endif From patchwork Mon May 11 11:14:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11540467 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5A35159A for ; Mon, 11 May 2020 11:32:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BF2A20708 for ; Mon, 11 May 2020 11:32:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="KLqskJKV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BF2A20708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY6fE-0005FV-Kj for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 May 2020 07:32:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY6OW-0000Uv-NI; Mon, 11 May 2020 07:14:48 -0400 Received: from mout.web.de ([212.227.15.3]:35957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY6OV-0006rr-LE; Mon, 11 May 2020 07:14:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1589195682; bh=KUWMlVMntn3U1nUaS+EoCscEK7fr6wH8WZeZRn/C7XE=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=KLqskJKV6otItMdDFp3CRHcgzVnGX62cdARHWDWp9Wqb33VEFMm43Q9hC0F34zKBy owXoUCQ00wcmP0CCk1VOyM6P65xpbpRWle+h34xux6c1OxEWF3nj1NomPqv3gepkok xBlNTXkc4ego5pmZsdKLjF7v27tcZY5TE17ySYLo= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.192]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MFcPd-1jLgBz1pIL-00Eht0; Mon, 11 May 2020 13:14:42 +0200 Date: Mon, 11 May 2020 13:14:41 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH 2/5] io/channel.c,io/channel-socket.c: Add yank feature Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:7Czdz+grKSXvHO3K5q013O5YYv+f/v+3lPiUpo3O1Z6jfnVFweG jkEvCFjB+M17hCupvgf3oMcvI3jTg1B1upcBEvPUhWivjxR371rsOdnMH2Gx66h44LIAMlD u50BxU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lVbExnxJLkiv5Q+E8KwVekN2R ffBdn1DBCUOKqhZ7X/+BBdb5fjg1F5ffIu2O604iwmOBWBmTS0DzJTlDO7fCce16M9xXisQ23 YAxxZRKD78yFWT/7MEBn8DRPiZS9aqClARzUJ0QHYd8M6LjAd8DbSUdtTkFmuvL3+Brda99wO 2+pmBFy7Z7qx+GvQq8uMMPhIAybmfAs7fm9T1JsVkBeSbnAS0mnVPR0+IbDIEfWSk3rNDNcE7 lu25fibwMtVg4z2/jR4cJr1nFbcNU0atMUQ6jlL97PKiC1k50Qyz1/3ZZqK1h4jbVnl8Pg9HY YayNkdCDNWOlV63Hd Received-SPF: pass client-ip=212.227.15.3; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 07:11:00 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Add qio_channel_set_yank function to channel and to channel-socket, which will register a yank function. The yank function calls shutdown() on the socket. Signed-off-by: Lukas Straub --- Makefile.objs | 1 + include/io/channel-socket.h | 1 + include/io/channel.h | 12 ++++++++++++ io/channel-socket.c | 29 +++++++++++++++++++++++++++++ io/channel.c | 9 +++++++++ 5 files changed, 52 insertions(+) diff --git a/Makefile.objs b/Makefile.objs index a7c967633a..889115775c 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -24,6 +24,7 @@ block-obj-m = block/ crypto-obj-y = crypto/ io-obj-y = io/ +io-obj-y += yank.o endif # CONFIG_SOFTMMU or CONFIG_TOOLS diff --git a/include/io/channel-socket.h b/include/io/channel-socket.h index 777ff5954e..0fa7a364f3 100644 --- a/include/io/channel-socket.h +++ b/include/io/channel-socket.h @@ -48,6 +48,7 @@ struct QIOChannelSocket { socklen_t localAddrLen; struct sockaddr_storage remoteAddr; socklen_t remoteAddrLen; + bool yank; }; diff --git a/include/io/channel.h b/include/io/channel.h index d4557f0930..782b618694 100644 --- a/include/io/channel.h +++ b/include/io/channel.h @@ -132,6 +132,8 @@ struct QIOChannelClass { bool enabled); void (*io_set_delay)(QIOChannel *ioc, bool enabled); + void (*io_set_yank)(QIOChannel *ioc, + bool enabled); off_t (*io_seek)(QIOChannel *ioc, off_t offset, int whence, @@ -550,6 +552,16 @@ int qio_channel_shutdown(QIOChannel *ioc, void qio_channel_set_delay(QIOChannel *ioc, bool enabled); +/** + * qio_channel_set_yank: + * @ioc: the channel object + * @enabled: the new flag state + * + * Controls wether this channel participates in yanking. + */ +void qio_channel_set_yank(QIOChannel *ioc, + bool enabled); + /** * qio_channel_set_cork: * @ioc: the channel object diff --git a/io/channel-socket.c b/io/channel-socket.c index b74f5b92a0..be03946d29 100644 --- a/io/channel-socket.c +++ b/io/channel-socket.c @@ -26,6 +26,7 @@ #include "io/channel-watch.h" #include "trace.h" #include "qapi/clone-visitor.h" +#include "yank.h" #define SOCKET_MAX_FDS 16 @@ -55,6 +56,7 @@ qio_channel_socket_new(void) sioc = QIO_CHANNEL_SOCKET(object_new(TYPE_QIO_CHANNEL_SOCKET)); sioc->fd = -1; + sioc->yank = 0; ioc = QIO_CHANNEL(sioc); qio_channel_set_feature(ioc, QIO_CHANNEL_FEATURE_SHUTDOWN); @@ -395,10 +397,19 @@ qio_channel_socket_accept(QIOChannelSocket *ioc, return NULL; } +static void qio_channel_socket_yank(void *opaque) +{ + QIOChannel *ioc = opaque; + QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); + + shutdown(sioc->fd, SHUT_RDWR); +} + static void qio_channel_socket_init(Object *obj) { QIOChannelSocket *ioc = QIO_CHANNEL_SOCKET(obj); ioc->fd = -1; + ioc->yank = 0; } static void qio_channel_socket_finalize(Object *obj) @@ -422,6 +433,9 @@ static void qio_channel_socket_finalize(Object *obj) closesocket(ioc->fd); ioc->fd = -1; } + if (ioc->yank) { + yank_unregister_function(qio_channel_socket_yank, ioc); + } } @@ -686,6 +700,20 @@ qio_channel_socket_set_delay(QIOChannel *ioc, &v, sizeof(v)); } +static void +qio_channel_socket_set_yank(QIOChannel *ioc, + bool enabled) +{ + QIOChannelSocket *sioc = QIO_CHANNEL_SOCKET(ioc); + + if (sioc->yank) { + yank_unregister_function(qio_channel_socket_yank, ioc); + } + sioc->yank = enabled; + if (sioc->yank) { + yank_register_function(qio_channel_socket_yank, ioc); + } +} static void qio_channel_socket_set_cork(QIOChannel *ioc, @@ -784,6 +812,7 @@ static void qio_channel_socket_class_init(ObjectClass *klass, ioc_klass->io_shutdown = qio_channel_socket_shutdown; ioc_klass->io_set_cork = qio_channel_socket_set_cork; ioc_klass->io_set_delay = qio_channel_socket_set_delay; + ioc_klass->io_set_yank = qio_channel_socket_set_yank; ioc_klass->io_create_watch = qio_channel_socket_create_watch; ioc_klass->io_set_aio_fd_handler = qio_channel_socket_set_aio_fd_handler; } diff --git a/io/channel.c b/io/channel.c index e4376eb0bc..0c4095e0e0 100644 --- a/io/channel.c +++ b/io/channel.c @@ -373,6 +373,15 @@ void qio_channel_set_delay(QIOChannel *ioc, } } +void qio_channel_set_yank(QIOChannel *ioc, + bool enabled) +{ + QIOChannelClass *klass = QIO_CHANNEL_GET_CLASS(ioc); + + if (klass->io_set_yank) { + klass->io_set_yank(ioc, enabled); + } +} void qio_channel_set_cork(QIOChannel *ioc, bool enabled) From patchwork Mon May 11 11:14:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11540469 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AE9CB159A for ; Mon, 11 May 2020 11:39:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E13C20708 for ; Mon, 11 May 2020 11:39:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="stMMxOC5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E13C20708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY6m3-0004di-EJ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 May 2020 07:39:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY6Oa-0000cO-2m; Mon, 11 May 2020 07:14:52 -0400 Received: from mout.web.de ([212.227.17.12]:57943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jY6OY-0006tK-Mn; Mon, 11 May 2020 07:14:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1589195685; bh=9nGypIWIejpA7HfrS60ch3u2aL2qpDcRe5ObfV39NrQ=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=stMMxOC5X4CrTiHK3jDxNNEGFqU/lPuzj0ycUvh7PA662QigR4LTAwtsgwO0tIJ/S sBSiMk64+D1fnvhAR5Zo0WciHh41HZcF7OF4bMYXmoIp2RmTrbdlOSBItxzkKPQtbi XiPNsp3qImpGFg1+FUYnzKxX0FsSab7vh4Ve1etU= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.192]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MNOV6-1jji4F25xC-00P0bh; Mon, 11 May 2020 13:14:45 +0200 Date: Mon, 11 May 2020 13:14:44 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH 3/5] block/nbd.c: Add yank feature Message-ID: <1e712fa7f08e4772c2a68197a851161bee51610f.1589193717.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:CbWoCUPLZCMVgZAYdVQ9OIB5fjgRkbvXEKmDdD06kATq24YYNYn YEBaIRzw5Oxk9mEGbRwjS6as8ZZzf1qcwOdzAYxnY7nYiOd8sgXpeslloWCCEnoNzzegdIh l46wn8QduDAWAfnYyDladi2xx6nNpgM0zdLTrSNndS9WvW3Uj7Z6RTSIv2Z91302IJZ+PSg vNVrKjVwtunKVonOQ9xuA== X-UI-Out-Filterresults: notjunk:1;V03:K0:INt/hoZG3E8=:WDYkHSwaBul5QedSSoBVCn wLFGoPwPXzT/9CjK5+W5ibkZ7wF/gte5AwrgDwE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oemxf8WXA/mvDO+Wt7rXTAlDlFcOLoJ7 MTXPwbJHdWC52o1oikECmDZUyy1sSqL7V18AVfVsW1woGejwgefUK1G7xPThzbGL6pQT3npI2 bjldkT8UxxHJj5DQq Received-SPF: pass client-ip=212.227.17.12; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 07:10:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Add yank option, pass it to the socket-channel and register a yank function which sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub --- Makefile.objs | 1 + block/nbd.c | 68 +++++++++++++++++++++++++++++++++----------- qapi/block-core.json | 5 +++- 3 files changed, 56 insertions(+), 18 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index 889115775c..4b213b3e78 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -18,6 +18,7 @@ block-obj-y += block.o blockjob.o job.o block-obj-y += block/ scsi/ block-obj-y += qemu-io-cmds.o block-obj-$(CONFIG_REPLICATION) += replication.o +block-obj-y += yank.o block-obj-m = block/ diff --git a/block/nbd.c b/block/nbd.c index 2160859f64..3c0fd3abb8 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -35,6 +35,7 @@ #include "qemu/option.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" +#include "qemu/atomic.h" #include "qapi/qapi-visit-sockets.h" #include "qapi/qmp/qstring.h" @@ -43,6 +44,8 @@ #include "block/nbd.h" #include "block/block_int.h" +#include "yank.h" + #define EN_OPTSTR ":exportname=" #define MAX_NBD_REQUESTS 16 @@ -91,6 +94,7 @@ typedef struct BDRVNBDState { QCryptoTLSCreds *tlscreds; const char *hostname; char *x_dirty_bitmap; + bool yank; } BDRVNBDState; static int nbd_client_connect(BlockDriverState *bs, Error **errp); @@ -111,12 +115,12 @@ static void nbd_clear_bdrvstate(BDRVNBDState *s) static void nbd_channel_error(BDRVNBDState *s, int ret) { if (ret == -EIO) { - if (s->state == NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) == NBD_CLIENT_CONNECTED) { s->state = s->reconnect_delay ? NBD_CLIENT_CONNECTING_WAIT : NBD_CLIENT_CONNECTING_NOWAIT; } } else { - if (s->state == NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) == NBD_CLIENT_CONNECTED) { qio_channel_shutdown(s->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL); } s->state = NBD_CLIENT_QUIT; @@ -167,7 +171,7 @@ static void nbd_client_attach_aio_context(BlockDriverState *bs, * s->connection_co is either yielded from nbd_receive_reply or from * nbd_co_reconnect_loop() */ - if (s->state == NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) == NBD_CLIENT_CONNECTED) { qio_channel_attach_aio_context(QIO_CHANNEL(s->ioc), new_context); } @@ -206,7 +210,7 @@ static void nbd_teardown_connection(BlockDriverState *bs) { BDRVNBDState *s = (BDRVNBDState *)bs->opaque; - if (s->state == NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) == NBD_CLIENT_CONNECTED) { /* finish any pending coroutines */ assert(s->ioc); qio_channel_shutdown(s->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL); @@ -230,13 +234,14 @@ static void nbd_teardown_connection(BlockDriverState *bs) static bool nbd_client_connecting(BDRVNBDState *s) { - return s->state == NBD_CLIENT_CONNECTING_WAIT || - s->state == NBD_CLIENT_CONNECTING_NOWAIT; + NBDClientState state = atomic_read(&s->state); + return state == NBD_CLIENT_CONNECTING_WAIT || + state == NBD_CLIENT_CONNECTING_NOWAIT; } static bool nbd_client_connecting_wait(BDRVNBDState *s) { - return s->state == NBD_CLIENT_CONNECTING_WAIT; + return atomic_read(&s->state) == NBD_CLIENT_CONNECTING_WAIT; } static coroutine_fn void nbd_reconnect_attempt(BDRVNBDState *s) @@ -305,7 +310,7 @@ static coroutine_fn void nbd_co_reconnect_loop(BDRVNBDState *s) nbd_reconnect_attempt(s); while (nbd_client_connecting(s)) { - if (s->state == NBD_CLIENT_CONNECTING_WAIT && + if (atomic_read(&s->state) == NBD_CLIENT_CONNECTING_WAIT && qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - start_time_ns > delay_ns) { s->state = NBD_CLIENT_CONNECTING_NOWAIT; @@ -341,7 +346,7 @@ static coroutine_fn void nbd_connection_entry(void *opaque) int ret = 0; Error *local_err = NULL; - while (s->state != NBD_CLIENT_QUIT) { + while (atomic_read(&s->state) != NBD_CLIENT_QUIT) { /* * The NBD client can only really be considered idle when it has * yielded from qio_channel_readv_all_eof(), waiting for data. This is @@ -356,7 +361,7 @@ static coroutine_fn void nbd_connection_entry(void *opaque) nbd_co_reconnect_loop(s); } - if (s->state != NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) != NBD_CLIENT_CONNECTED) { continue; } @@ -435,7 +440,7 @@ static int nbd_co_send_request(BlockDriverState *bs, qemu_co_queue_wait(&s->free_sema, &s->send_mutex); } - if (s->state != NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) != NBD_CLIENT_CONNECTED) { rc = -EIO; goto err; } @@ -462,7 +467,7 @@ static int nbd_co_send_request(BlockDriverState *bs, if (qiov) { qio_channel_set_cork(s->ioc, true); rc = nbd_send_request(s->ioc, request); - if (rc >= 0 && s->state == NBD_CLIENT_CONNECTED) { + if (rc >= 0 && atomic_read(&s->state) == NBD_CLIENT_CONNECTED) { if (qio_channel_writev_all(s->ioc, qiov->iov, qiov->niov, NULL) < 0) { rc = -EIO; @@ -777,7 +782,7 @@ static coroutine_fn int nbd_co_do_receive_one_chunk( s->requests[i].receiving = true; qemu_coroutine_yield(); s->requests[i].receiving = false; - if (s->state != NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) != NBD_CLIENT_CONNECTED) { error_setg(errp, "Connection closed"); return -EIO; } @@ -936,7 +941,7 @@ static bool nbd_reply_chunk_iter_receive(BDRVNBDState *s, NBDReply local_reply; NBDStructuredReplyChunk *chunk; Error *local_err = NULL; - if (s->state != NBD_CLIENT_CONNECTED) { + if (atomic_read(&s->state) != NBD_CLIENT_CONNECTED) { error_setg(&local_err, "Connection closed"); nbd_iter_channel_error(iter, -EIO, &local_err); goto break_loop; @@ -961,7 +966,8 @@ static bool nbd_reply_chunk_iter_receive(BDRVNBDState *s, } /* Do not execute the body of NBD_FOREACH_REPLY_CHUNK for simple reply. */ - if (nbd_reply_is_simple(reply) || s->state != NBD_CLIENT_CONNECTED) { + if (nbd_reply_is_simple(reply) || + atomic_read(&s->state) != NBD_CLIENT_CONNECTED) { goto break_loop; } @@ -1395,6 +1401,14 @@ static int nbd_client_reopen_prepare(BDRVReopenState *state, return 0; } +static void nbd_yank(void *opaque) +{ + BlockDriverState *bs = opaque; + BDRVNBDState *s = (BDRVNBDState *)bs->opaque; + + atomic_set(&s->state, NBD_CLIENT_QUIT); +} + static void nbd_client_close(BlockDriverState *bs) { BDRVNBDState *s = (BDRVNBDState *)bs->opaque; @@ -1407,14 +1421,17 @@ static void nbd_client_close(BlockDriverState *bs) nbd_teardown_connection(bs); } -static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr, +static QIOChannelSocket *nbd_establish_connection(BlockDriverState *bs, + SocketAddress *saddr, Error **errp) { + BDRVNBDState *s = (BDRVNBDState *)bs->opaque; QIOChannelSocket *sioc; Error *local_err = NULL; sioc = qio_channel_socket_new(); qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client"); + qio_channel_set_yank(QIO_CHANNEL(sioc), s->yank); qio_channel_socket_connect_sync(sioc, saddr, &local_err); if (local_err) { @@ -1438,7 +1455,7 @@ static int nbd_client_connect(BlockDriverState *bs, Error **errp) * establish TCP connection, return error if it fails * TODO: Configurable retry-until-timeout behaviour. */ - QIOChannelSocket *sioc = nbd_establish_connection(s->saddr, errp); + QIOChannelSocket *sioc = nbd_establish_connection(bs, s->saddr, errp); if (!sioc) { return -ECONNREFUSED; @@ -1829,6 +1846,12 @@ static QemuOptsList nbd_runtime_opts = { "future requests before a successful reconnect will " "immediately fail. Default 0", }, + { + .name = "yank", + .type = QEMU_OPT_BOOL, + .help = "Forcibly close the connection and don't attempt to " + "reconnect when the 'yank' qmp command is executed.", + }, { /* end of list */ } }, }; @@ -1888,6 +1911,8 @@ static int nbd_process_options(BlockDriverState *bs, QDict *options, s->reconnect_delay = qemu_opt_get_number(opts, "reconnect-delay", 0); + s->yank = qemu_opt_get_bool(opts, "yank", false); + ret = 0; error: @@ -1921,6 +1946,10 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags, /* successfully connected */ s->state = NBD_CLIENT_CONNECTED; + if (s->yank) { + yank_register_function(nbd_yank, bs); + } + s->connection_co = qemu_coroutine_create(nbd_connection_entry, s); bdrv_inc_in_flight(bs); aio_co_schedule(bdrv_get_aio_context(bs), s->connection_co); @@ -1972,6 +2001,11 @@ static void nbd_close(BlockDriverState *bs) BDRVNBDState *s = bs->opaque; nbd_client_close(bs); + + if (s->yank) { + yank_unregister_function(nbd_yank, bs); + } + nbd_clear_bdrvstate(s); } diff --git a/qapi/block-core.json b/qapi/block-core.json index 943df1926a..1c1578160e 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3862,6 +3862,8 @@ # reconnect. After that time, any delayed requests and all # future requests before a successful reconnect will # immediately fail. Default 0 (Since 4.2) +# @yank: Forcibly close the connection and don't attempt to reconnect when +# the 'yank' qmp command is executed. (Since: 5.1) # # Since: 2.9 ## @@ -3870,7 +3872,8 @@ '*export': 'str', '*tls-creds': 'str', '*x-dirty-bitmap': 'str', - '*reconnect-delay': 'uint32' } } + '*reconnect-delay': 'uint32', + 'yank': 'bool' } } ## # @BlockdevOptionsRaw: From patchwork Mon May 11 11:14:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11540435 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 174A815AB for ; Mon, 11 May 2020 11:24:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD70820736 for ; Mon, 11 May 2020 11:24:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="OnZ4+5Zq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD70820736 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY6YC-0008E1-QQ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 May 2020 07:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY6Od-0000i3-G9; Mon, 11 May 2020 07:14:55 -0400 Received: from mout.web.de ([212.227.15.14]:37697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jY6Oc-0006ti-Hw; Mon, 11 May 2020 07:14:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1589195688; bh=ox7FrQlIDpodo9cR+t+IPZpwtzB7Qs5pOwi+y4G35M0=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=OnZ4+5ZqLtFFJ9bQcOkXe6xYdkNM80rywQvGir9YO9Loqjn4fjAxKzlX+IEPs/O3j mt9kflmw8Bjwd6J2IXAdrdh7jIQQgiVkKswvdtDzlyZHTTMpvZ5XECcM5//a6FN+Iu 1UhJklww41YGWfyadW7u851Jczij1bqbWYOhqo7E= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.192]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LfzcB-1ijs4B3Adv-00pgGC; Mon, 11 May 2020 13:14:48 +0200 Date: Mon, 11 May 2020 13:14:47 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH 4/5] chardev/char-socket.c: Add yank feature Message-ID: <7f87fcd9be3cedfe0410c151de2bf4e5d907b1e2.1589193717.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:0wT0tdxCVau8z0N6eYdSpqwC5zAcYrOZroPKp2QhXq3kpCeF8cG oGhyLcx4nw0trtcn43p7I5gR8Qv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N06NSs39GRCeP6MlpSlLyJgxVYYxD2SSnEndK1SFDJuNbjJc+JuqgN7DRBx3XQYOZqgCtphjw VRus+skV9DzZrY2hz4Im7KLCTtLW8OVe5MVGpdCTrDr2+Ogs25a5Rr65jp9gd1MV4ATkhXalm brgnVZVFgfGzHX3WNQ/bXvL/XQO4z3GFiWBwoCcKe5JV9vXFR7yi/t8d/8s8Ios6zAKNkY5vU 0sD4xR4ef6TFP1OQCLwGSUQbmABYVKfab8LC5ZVeLH5ZDpr5aXTCNpvJEBYnHjtyrOQznvBug rfa7CB+5o1UoCwIHsthELyPKYnvnOBg+pLeNcs+095uKEVmj8sHomHuZudei3X2rx5zROW/ZY gCgelDymDVQprt+ry Received-SPF: pass client-ip=212.227.15.14; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 07:10:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Add yank option which is passed to the socket-channel. Signed-off-by: Lukas Straub --- chardev/char-socket.c | 8 ++++++++ chardev/char.c | 3 +++ qapi/char.json | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 185fe38dda..e476358941 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -65,6 +65,7 @@ typedef struct { int max_size; int do_telnetopt; int do_nodelay; + int do_yank; int *read_msgfds; size_t read_msgfds_num; int *write_msgfds; @@ -877,6 +878,9 @@ static int tcp_chr_new_client(Chardev *chr, QIOChannelSocket *sioc) if (s->do_nodelay) { qio_channel_set_delay(s->ioc, false); } + if (s->do_yank) { + qio_channel_set_yank(s->ioc, true); + } if (s->listener) { qio_net_listener_set_client_func_full(s->listener, NULL, NULL, NULL, chr->gcontext); @@ -1297,6 +1301,7 @@ static void qmp_chardev_open_socket(Chardev *chr, SocketChardev *s = SOCKET_CHARDEV(chr); ChardevSocket *sock = backend->u.socket.data; bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; + bool do_yank = sock->has_yank ? sock->yank : false; bool is_listen = sock->has_server ? sock->server : true; bool is_telnet = sock->has_telnet ? sock->telnet : false; bool is_tn3270 = sock->has_tn3270 ? sock->tn3270 : false; @@ -1310,6 +1315,7 @@ static void qmp_chardev_open_socket(Chardev *chr, s->is_tn3270 = is_tn3270; s->is_websock = is_websock; s->do_nodelay = do_nodelay; + s->do_yank = do_yank; if (sock->tls_creds) { Object *creds; creds = object_resolve_path_component( @@ -1400,6 +1406,8 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, sock->has_nodelay = qemu_opt_get(opts, "delay"); sock->nodelay = !qemu_opt_get_bool(opts, "delay", true); + sock->has_yank = qemu_opt_get(opts, "yank"); + sock->yank = qemu_opt_get_bool(opts, "yank", false); /* * We have different default to QMP for 'server', hence * we can't just check for existence of 'server' diff --git a/chardev/char.c b/chardev/char.c index e77564060d..04075389bf 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -939,6 +939,9 @@ QemuOptsList qemu_chardev_opts = { },{ .name = "logappend", .type = QEMU_OPT_BOOL, + },{ + .name = "yank", + .type = QEMU_OPT_BOOL, }, { /* end of list */ } }, diff --git a/qapi/char.json b/qapi/char.json index daceb20f84..f9c04e720c 100644 --- a/qapi/char.json +++ b/qapi/char.json @@ -270,6 +270,8 @@ # then attempt a reconnect after the given number of seconds. # Setting this to zero disables this function. (default: 0) # (Since: 2.2) +# @yank: Shutdown the socket when the 'yank' qmp command is executed. +# (Since: 5.1) # # Since: 1.4 ## @@ -283,7 +285,8 @@ '*telnet': 'bool', '*tn3270': 'bool', '*websocket': 'bool', - '*reconnect': 'int' }, + '*reconnect': 'int', + '*yank': 'bool' }, 'base': 'ChardevCommon' } ## From patchwork Mon May 11 11:14:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 11540463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64B1815AB for ; Mon, 11 May 2020 11:30:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A6E220708 for ; Mon, 11 May 2020 11:30:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=web.de header.i=@web.de header.b="PM+Mi41X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A6E220708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY6de-0004HH-4y for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 May 2020 07:30:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY6Og-0000m5-EX; Mon, 11 May 2020 07:14:58 -0400 Received: from mout.web.de ([212.227.17.12]:60721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jY6Of-0006u7-9d; Mon, 11 May 2020 07:14:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1589195692; bh=u51BuTx1QED54eOkdNUZ6No9sGilpZkM0a/cyn0RLZM=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=PM+Mi41XqyRf0Mps1tW2ppBNGDsAgGX92BhYf2Js1Kc4aIRxmSgxqkNIJmZJYAU4X OjI53QGkgiLFOJy7x2VJfXrWyQdrM1jsdtHibOwbXKRjAHFbrSmal46uBiiyIOcGqj /7/jOSBjdYTcGGQwMojHgRgJAg6tNrHqLg1EvAxQ= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from luklap ([89.247.255.192]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M7usy-1jUEW13kIM-0053Tb; Mon, 11 May 2020 13:14:51 +0200 Date: Mon, 11 May 2020 13:14:50 +0200 From: Lukas Straub To: qemu-devel Subject: [PATCH 5/5] migration: Add yank feature Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:sIDB7egPqlktd6cyGQsLqIj8ClOqxAx17eEkKE3zjei82usYfD1 +WBv4ULQs3DpmxPGRZQQkf/cLHA7AUkkpWeWOzxTwfM6nkWOekIA5LiH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IcwiKgRj6VKy3WD7A8DTbxiUM+Al/9YchAVA1WevhK8KK2SMSw79x6 kEe+0S/NqoMKOILXHinirJ2Koxfj3SPSIbImZCPBvYXmbClQ4IUomwywO7XE9Rd1lzHrr/eL/ qARAbrhcF5kBjSE9wNH2nSJttNtHOoDJ1eZcgJwaBsT/bG3IMlNvBgVDA5QtvoimfVVYIqjIl gyFEND1tmtDEA7nYr6S/ES0FWm0m+T3TbDWpy5pQCTNw66YxEV6i+Z/Qz71xjIn2ltZvtmmia q8yvznPMm1W/Ln/uwW4+qJttsV5RXKRMCq2j/hN/otg0i6QDQJZOy924e43iJyqASlsNWwCaK ONtxUX5iqQnmads6W Received-SPF: pass client-ip=212.227.17.12; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 07:10:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "Daniel P. =?utf-8?b?QmVycmFuZ8Op?= " , qemu-block , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Add yank option which is passed to the socket-channel. Signed-off-by: Lukas Straub --- migration/channel.c | 2 ++ migration/migration.c | 11 +++++++++++ qapi/migration.json | 17 ++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/migration/channel.c b/migration/channel.c index 20e4c8e2dc..498af99104 100644 --- a/migration/channel.c +++ b/migration/channel.c @@ -35,6 +35,7 @@ void migration_channel_process_incoming(QIOChannel *ioc) trace_migration_set_incoming_channel( ioc, object_get_typename(OBJECT(ioc))); + qio_channel_set_yank(ioc, s->parameters.yank); if (s->parameters.tls_creds && *s->parameters.tls_creds && !object_dynamic_cast(OBJECT(ioc), @@ -67,6 +68,7 @@ void migration_channel_connect(MigrationState *s, ioc, object_get_typename(OBJECT(ioc)), hostname, error); if (!error) { + qio_channel_set_yank(ioc, s->parameters.yank); if (s->parameters.tls_creds && *s->parameters.tls_creds && !object_dynamic_cast(OBJECT(ioc), diff --git a/migration/migration.c b/migration/migration.c index 187ac0410c..b6f2f82dfb 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -814,6 +814,8 @@ MigrationParameters *qmp_query_migrate_parameters(Error **errp) params->max_postcopy_bandwidth = s->parameters.max_postcopy_bandwidth; params->has_max_cpu_throttle = true; params->max_cpu_throttle = s->parameters.max_cpu_throttle; + params->has_yank = true; + params->yank = s->parameters.yank; params->has_announce_initial = true; params->announce_initial = s->parameters.announce_initial; params->has_announce_max = true; @@ -1364,6 +1366,9 @@ static void migrate_params_test_apply(MigrateSetParameters *params, if (params->has_max_cpu_throttle) { dest->max_cpu_throttle = params->max_cpu_throttle; } + if (params->has_yank) { + dest->yank = params->yank; + } if (params->has_announce_initial) { dest->announce_initial = params->announce_initial; } @@ -1472,6 +1477,9 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp) if (params->has_max_cpu_throttle) { s->parameters.max_cpu_throttle = params->max_cpu_throttle; } + if (params->has_yank) { + s->parameters.yank = params->yank; + } if (params->has_announce_initial) { s->parameters.announce_initial = params->announce_initial; } @@ -3623,6 +3631,8 @@ static Property migration_properties[] = { DEFINE_PROP_UINT8("max-cpu-throttle", MigrationState, parameters.max_cpu_throttle, DEFAULT_MIGRATE_MAX_CPU_THROTTLE), + DEFINE_PROP_BOOL("yank", MigrationState, + parameters.yank, false), DEFINE_PROP_SIZE("announce-initial", MigrationState, parameters.announce_initial, DEFAULT_MIGRATE_ANNOUNCE_INITIAL), @@ -3711,6 +3721,7 @@ static void migration_instance_init(Object *obj) params->has_xbzrle_cache_size = true; params->has_max_postcopy_bandwidth = true; params->has_max_cpu_throttle = true; + params->has_yank = true; params->has_announce_initial = true; params->has_announce_max = true; params->has_announce_rounds = true; diff --git a/qapi/migration.json b/qapi/migration.json index eca2981d0a..ad9e431a8f 100644 --- a/qapi/migration.json +++ b/qapi/migration.json @@ -623,6 +623,9 @@ # will consume more CPU. # Defaults to 1. (Since 5.0) # +# @yank: Shutdown the migration socket when the 'yank' qmp command is +# executed. (Since: 5.1) +# # Since: 2.4 ## { 'enum': 'MigrationParameter', @@ -636,7 +639,7 @@ 'multifd-channels', 'xbzrle-cache-size', 'max-postcopy-bandwidth', 'max-cpu-throttle', 'multifd-compression', - 'multifd-zlib-level' ,'multifd-zstd-level' ] } + 'multifd-zlib-level' ,'multifd-zstd-level', 'yank' ] } ## # @MigrateSetParameters: @@ -747,6 +750,9 @@ # will consume more CPU. # Defaults to 1. (Since 5.0) # +# @yank: Shutdown the migration socket when the 'yank' qmp command is +# executed. (Since: 5.1) +# # Since: 2.4 ## # TODO either fuse back into MigrationParameters, or make @@ -776,7 +782,8 @@ '*max-cpu-throttle': 'int', '*multifd-compression': 'MultiFDCompression', '*multifd-zlib-level': 'int', - '*multifd-zstd-level': 'int' } } + '*multifd-zstd-level': 'int', + '*yank': 'bool'} } ## # @migrate-set-parameters: @@ -907,6 +914,9 @@ # will consume more CPU. # Defaults to 1. (Since 5.0) # +# @yank: Shutdown the migration socket when the 'yank' qmp command is +# executed. (Since: 5.1) +# # Since: 2.4 ## { 'struct': 'MigrationParameters', @@ -934,7 +944,8 @@ '*max-cpu-throttle': 'uint8', '*multifd-compression': 'MultiFDCompression', '*multifd-zlib-level': 'uint8', - '*multifd-zstd-level': 'uint8' } } + '*multifd-zstd-level': 'uint8', + '*yank': 'bool'} } ## # @query-migrate-parameters: