Message ID | 20190320112646.3712-3-xieyongji@baidu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 06FA317E0 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 20 Mar 2019 11:30:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD01E28C7B for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 20 Mar 2019 11:30:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D090129B4F; Wed, 20 Mar 2019 11:30:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 891B528C7B for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 20 Mar 2019 11:30:47 +0000 (UTC) Received: from localhost ([127.0.0.1]:46449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1h6ZQk-000225-QA for patchwork-qemu-devel@patchwork.kernel.org; Wed, 20 Mar 2019 07:30:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <elohimes@gmail.com>) id 1h6ZNc-0007l5-8c for qemu-devel@nongnu.org; Wed, 20 Mar 2019 07:27:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <elohimes@gmail.com>) id 1h6ZNb-0003qJ-G8 for qemu-devel@nongnu.org; Wed, 20 Mar 2019 07:27:32 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:35743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <elohimes@gmail.com>) id 1h6ZNb-0003pw-45 for qemu-devel@nongnu.org; Wed, 20 Mar 2019 07:27:31 -0400 Received: by mail-pf1-x441.google.com with SMTP id t21so975923pfe.2 for <qemu-devel@nongnu.org>; Wed, 20 Mar 2019 04:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W4cUgpfE75IMflSgjXyGbJgkhVbCyuywlDtwxjb+vZo=; b=omYO66n/nb2qU3pFeCqncOg4fuXQ20V2UM2ey3bgeOeFPQNJR9EHvCiDkCBBlVmYTy FJLEIK97xA8JmR4I/EpnlAJBhTCyT3Hp0omW2Qr589T79JvGALcw1U6g+rb8K0wjaxY3 uOtiGU2q86/Rd03IOD1vtdByehSMxmZIVXno51om6tjrEyUPpftPN7KANbpDYJ8T+7mn b0z+sperfibg2oi29ZznPgqjfJoyShFrh+ukW9IyAwRn6ut93IB6TOqdKtd4KxQcnOhU aDeGIb56bZs47nGigSTG/34MK8gAG4dKgpRX0wjvMWqwkQi5qyXTE60m2ZvLOjnM/tEM 0vzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W4cUgpfE75IMflSgjXyGbJgkhVbCyuywlDtwxjb+vZo=; b=qJwzupHc4FTJREcBk0Rsc1g0Ug0eobCKIrx294i2eZ6DRr8xgtlY6wJ4+RTBXelHsm MO3PeyOi0qiPB5KQIPTtvjefBViYpybdAqCBjFscAbJXm3Fqjmj62gruyEjBxSnaYznT EGFZjrHV+eu7UujCq94ZbNTy6Q94l53i/M+DERPj361Mzfbzo+kAdmOClrH/Q/q+T1b4 MDGNSoICH0mv3M+87X0n384EOjLLFU79oI89E077b7G3O2NrRyLtWec3vsIG6In0hZEU Q8/EVsireVFT9LAjKVoC3CBGSBQa8UCxqhd1s3HQ75GwTa31kioOyfbnRd21Ip2ED1l8 XTlw== X-Gm-Message-State: APjAAAUIScb1z8jC+QQQ7NN0hfonHfMybvTeREPw1odit6BnvvbN6bQp UNEax9cvoNI3PhjuzxMzw/M= X-Google-Smtp-Source: APXvYqwRB+uO48vDRImwsnzMAUzD5hLCoLzCvQgNOELZLT4KrX1gACsnUhl7hxu93MCV//xBCi9K6w== X-Received: by 2002:a63:bd51:: with SMTP id d17mr6847471pgp.117.1553081250233; Wed, 20 Mar 2019 04:27:30 -0700 (PDT) Received: from localhost ([116.247.112.152]) by smtp.gmail.com with ESMTPSA id k8sm2014797pgq.37.2019.03.20.04.27.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 04:27:29 -0700 (PDT) From: elohimes@gmail.com X-Google-Original-From: xieyongji@baidu.com To: mst@redhat.com, kwolf@redhat.com, mreitz@redhat.com, stefanha@gmail.com, marcandre.lureau@redhat.com, berrange@redhat.com, jasowang@redhat.com, maxime.coquelin@redhat.com, yury-kotov@yandex-team.ru, wrfsh@yandex-team.ru, changpeng.liu@intel.com Date: Wed, 20 Mar 2019 19:26:41 +0800 Message-Id: <20190320112646.3712-3-xieyongji@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190320112646.3712-1-xieyongji@baidu.com> References: <20190320112646.3712-1-xieyongji@baidu.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH v8 2/7] virtio: Use started flag in virtio_vmstate_change() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: nixun@baidu.com, qemu-devel@nongnu.org, lilin24@baidu.com, zhangyu31@baidu.com, chaiwen@baidu.com, Xie Yongji <xieyongji@baidu.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
vhost-user-blk: Add support for backend reconnecting
|
expand
|
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index af7b59b4ae..b8d36cd4b7 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2291,7 +2291,7 @@ static void virtio_vmstate_change(void *opaque, int running, RunState state) VirtIODevice *vdev = opaque; BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); - bool backend_run = running && (vdev->status & VIRTIO_CONFIG_S_DRIVER_OK); + bool backend_run = running && vdev->started; vdev->vm_running = running; if (backend_run) {