From nobody Tue Feb 10 10:03:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1559633993; cv=none; d=zoho.com; s=zohoarc; b=JuQPevDhPlvDjbeAiKvo4UxVg+QjAmIqUqKzucu1HxHydfhCiI+Q3/rD69T5MxHJXNIrHhqewNPWtJ85nmwaCvcaa9VMosUdX2bhPZeqmvtnGsB0U6ciBQtynC/fCuBuO3rXllu8cBNw5gi6iLABFLmEuSWp609MfaP3SNravP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559633993; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=XTNMBKN2X1BkfbMgr70LpEg84K+wAte084VIv3k+D1I=; b=TVQ0YXRIsPXgdQdX7Fc9HSlDbMQavzKAE95oD+RT6tJDDcMbckQjJa7cC67VsK2n0T2vU2zOxPsSPig0fgFcbbm2ZWCBSHiJwCT1EKFIbCl2XdnWn14ZrqhkHAUXKnY82MDcL/zVK2Gc7s7WbBWDDkoZSdGgfnITRPZkiAqFsjU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559633993799964.2676324553591; Tue, 4 Jun 2019 00:39:53 -0700 (PDT) Received: from localhost ([127.0.0.1]:47462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY42w-0004Qo-LH for importer@patchew.org; Tue, 04 Jun 2019 03:39:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY3yu-0001IS-9o for qemu-devel@nongnu.org; Tue, 04 Jun 2019 03:35:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hY3yt-00045Y-ER for qemu-devel@nongnu.org; Tue, 04 Jun 2019 03:35:40 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:34498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hY3yt-0003y4-8E for qemu-devel@nongnu.org; Tue, 04 Jun 2019 03:35:39 -0400 Received: by mail-pg1-x541.google.com with SMTP id h2so6598602pgg.1 for ; Tue, 04 Jun 2019 00:35:39 -0700 (PDT) Received: from localhost ([116.247.112.152]) by smtp.gmail.com with ESMTPSA id b16sm17232845pfd.12.2019.06.04.00.35.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 00:35:37 -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=XTNMBKN2X1BkfbMgr70LpEg84K+wAte084VIv3k+D1I=; b=eRY7kWAUZ8kn8Qqjp0Boz4O+CM1SK9RoFVjsxl4IlCWcIT0XPsDCg0rY6hBO1QZy/k OIqwzZQf6tJWZMbD5I+3ssuCzh9vNOmWcUTn4fd3rWHjoVO5WoB8eDzNmCv2ihGZenAS +InfQzqHdphxpS46Ng40pLDGH6sbLF/WSUZOUbPJZbtyYq9PqlaXrNBrYHV2h1CtgafL wVsKZv8IMPB1R/GXXEBYfUede9bWmbXDfA8q59vLUfN3v79jJQxWEpVQ3DBNUx5CGMmw cOSd3Ymj9SFCz08t6KNiO+na2J8UNr2HGQW//fpGKxv2d/bQwV7vqB+aI5SI1tMsmY/p j3xA== 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=XTNMBKN2X1BkfbMgr70LpEg84K+wAte084VIv3k+D1I=; b=H6rZqgWMLOVMEi6lZL3vyaLnwaxir8V5wys7s0eiICP8kLA1LsdhKp60NEU26X/5ia CLtCTMPAQCABPlegR4r7Ucav+KJlQ1fFhVPR6dhCyPg8SYua/FgD49AippAAhpOLVguf coVEjJ9/Oz8+594VhFnz4uef4oSUKZX0DXD/xLl7dUHmxBYydKVvqZPpWuup7aIbtAFn AGTqdwE5olZViHSEwTvrYtFDVDfvjWZv/SlH2snkZAK7pJy3TeHzf16tqEpRV2NUDBnB UswIaisO23eNbggRR6gDffveeepMqjgFYnZkJbQvRv3bHnXv8qyXdZ4hUFkaFo4Nj1nG 88mw== X-Gm-Message-State: APjAAAU0P9aZ30crxFd4WF3G9R78su1dk2P0/79bDXwxDAmH6W+8hdbA 89GrXTvruAvNWXJvjoZ7s40= X-Google-Smtp-Source: APXvYqybLj7SVGuaVCTwtM8siXHKLSXVO1OnORlyJUFJmtcl5/6c0LO2gFkEgMz1OAfPGgsY7ltXcA== X-Received: by 2002:a17:90a:62c6:: with SMTP id k6mr33981582pjs.7.1559633738223; Tue, 04 Jun 2019 00:35:38 -0700 (PDT) From: elohimes@gmail.com X-Google-Original-From: xieyongji@baidu.com To: mst@redhat.com, groug@kaod.org Date: Tue, 4 Jun 2019 15:34:57 +0800 Message-Id: <20190604073459.15651-4-xieyongji@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604073459.15651-1-xieyongji@baidu.com> References: <20190604073459.15651-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::541 Subject: [Qemu-devel] [PATCH v2 3/5] virtio: Make sure we get correct state of device on handle_aio_output() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xie Yongji , dgilbert@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Xie Yongji We should set the flags: "start_on_kick" and "started" after we call the kick functions (handle_aio_output() and handle_output()). Signed-off-by: Xie Yongji --- hw/virtio/virtio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6ec45d8f0a..3dc2f8c223 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1575,11 +1575,11 @@ void virtio_queue_notify(VirtIODevice *vdev, int n) event_notifier_set(&vq->host_notifier); } else if (vq->handle_output) { vq->handle_output(vdev, vq); - } =20 - if (unlikely(vdev->start_on_kick)) { - vdev->started =3D true; - vdev->start_on_kick =3D false; + if (unlikely(vdev->start_on_kick)) { + vdev->started =3D true; + vdev->start_on_kick =3D false; + } } } =20 --=20 2.17.1