Message ID | 20180723201748.25573-96-mdroth@linux.vnet.ibm.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 6401991E for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:44:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51D9B285BE for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:44:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4412B285CB; Mon, 23 Jul 2018 21:44:19 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E168D285BE for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 23 Jul 2018 21:44:18 +0000 (UTC) Received: from localhost ([::1]:36906 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 1fhics-0005E4-6c for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Jul 2018 17:44:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhLN-0004Xm-7v for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:22:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhLM-0005jl-9i for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:22:09 -0400 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]:40418) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <flukshun@gmail.com>) id 1fhhLM-0005jb-4U; Mon, 23 Jul 2018 16:22:08 -0400 Received: by mail-oi0-x243.google.com with SMTP id w126-v6so3485918oie.7; Mon, 23 Jul 2018 13:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=XRI5SBS5RpBzOViBiFp15yPGNFkoOKkwfNAtq1Rxf+0=; b=O8QQSx629XztAQrLB+Hkq7PRkiJHSMjfsL7HGR4abX4mGNQ5RlWz93RgYuRG1Z67Yo tlPM8qLF9xA56s8+RKZ4pZ4+56GrO7lq0Ek7Yg8m1cOiNjIbJ+qTOeILvLCg5nxMAG3Z +OzcCLkV8r6CZegRIGuS8cewxc50vyzKzdY9GBmNOQPYO2AE5BVq7l25Uycj9a/uGqLe AOM5PpQoVxNf/NW8aNc8gzlxTVj4fglOuW+TosnMRDyFn48qnB5q+NhTPAGv5RgJWrQs eVO52mGoEtDuercvLGJF0xUN9FrMBmsJMG+Wdjln2Z1ScmHaX14rkaqRLZCh41nZI7YU DPSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=XRI5SBS5RpBzOViBiFp15yPGNFkoOKkwfNAtq1Rxf+0=; b=dqEjp3g1pbCXi8+ttUsiyrlnk+i9F+8YLWSLCTrnAga+5HD7r75tr9LFQYFS7gIC0X eqUo9hWVqHP/ypR57buYksgY/gOwQn4FfXnY17LJv8zBn5Cau87WU2ry73XXCJdD8Xs6 4Wu2VxYhVs3HOOJY+PSi6Nyqfd3OlVtXDwOyFK4hhOQ3fELGdPpH0xMcBdg6bAd9ChIH pxAu4UTzUkGmoEXKzF4U+yKgiRRnMkL3mtfUZAEziXDDVRinxbDEmy5cBdExIhdPahMo TXXuXT2m5V2/IEdHNOo3ZTfrFxgaMPtjjDJp/bthgxEL4m6auzrIgXVceH6TapQpmsre 8KiQ== X-Gm-Message-State: AOUpUlEAntwAMyazYXk0odAJ6yk2HWnkxWFNBsTB7Srv+Z4VOgJgFc1N ipsfKfRV5tx7hZoXu18hFaR1cqfmSJrvhQ== X-Google-Smtp-Source: AAOMgpfyDcHXOXdcgxph2idukc0UUZ1KSlUfKNJ4QV5YcgTfmyH2eYR1uspZ0HZEuqw5e3mOwUwgPw== X-Received: by 2002:aca:6cc6:: with SMTP id h189-v6mr344256oic.140.1532377326840; Mon, 23 Jul 2018 13:22:06 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id b3-v6sm6698475oiy.11.2018.07.23.13.22.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:22:05 -0700 (PDT) From: Michael Roth <mdroth@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:17:44 -0500 Message-Id: <20180723201748.25573-96-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::243 Subject: [Qemu-devel] [PATCH 95/99] virtio-rng: process pending requests on DRIVER_OK 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: Pankaj Gupta <pagupta@redhat.com>, qemu-stable@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>, "Michael S . Tsirkin" <mst@redhat.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 |
Patch Round-up for stable 2.12.1, freeze on 2018-07-30
|
expand
|
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 289bbcac03..855f1b41d1 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -156,6 +156,19 @@ static void check_rate_limit(void *opaque) vrng->activate_timer = true; } +static void virtio_rng_set_status(VirtIODevice *vdev, uint8_t status) +{ + VirtIORNG *vrng = VIRTIO_RNG(vdev); + + if (!vdev->vm_running) { + return; + } + vdev->status = status; + + /* Something changed, try to process buffers */ + virtio_rng_process(vrng); +} + static void virtio_rng_device_realize(DeviceState *dev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); @@ -261,6 +274,7 @@ static void virtio_rng_class_init(ObjectClass *klass, void *data) vdc->realize = virtio_rng_device_realize; vdc->unrealize = virtio_rng_device_unrealize; vdc->get_features = get_features; + vdc->set_status = virtio_rng_set_status; } static const TypeInfo virtio_rng_info = {