From patchwork Tue Dec 4 11:08:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Thierry X-Patchwork-Id: 10711501 Return-Path: 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 28B9F14E2 for ; Tue, 4 Dec 2018 11:08:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A2F42A1D8 for ; Tue, 4 Dec 2018 11:08:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E4262A1F8; Tue, 4 Dec 2018 11:08:56 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2F712A1D8 for ; Tue, 4 Dec 2018 11:08:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728694AbeLDLIy (ORCPT ); Tue, 4 Dec 2018 06:08:54 -0500 Received: from foss.arm.com ([217.140.101.70]:57304 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727966AbeLDLIw (ORCPT ); Tue, 4 Dec 2018 06:08:52 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2F466A78; Tue, 4 Dec 2018 03:08:52 -0800 (PST) Received: from e112298-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 429F23F5AF; Tue, 4 Dec 2018 03:08:51 -0800 (PST) From: Julien Thierry To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: jean-philippe.brucker@arm.com, will.deacon@arm.com, Julien Thierry Subject: [PATCH kvmtool 00/13] Implement reset of virtio devices Date: Tue, 4 Dec 2018 11:08:33 +0000 Message-Id: <1543921726-54571-1-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This series was developped by Jean-Philippe and is needed for a series I'll be posting shortly after to load firmwares on arm kvmtool. Currently, when a guest tries to reset a device, a lot of ressources aren't reset (threads keep running, virtio queue keep their state, etc). When the guest only does the reset to initialize the device and there were no previous users, there is no noticeable issue. But when a guest has a firmare + Linux, if the firmware uses a virtio device, Linux will fail to probe that device. This series aim to properly reset the virtio resources when the guests requests it. Reset of net vhost is unsupported for now. Patch 1 is a bug fix on ioeventfd Patch 2-6 provide the core support so devices can implement their reset Patch 7-13 implements the reset for the various virtio devices Thanks, Julien --> Jean-Philippe Brucker (13): ioeventfd: Fix removal of ioeventfd virtio: Implement notify_status virtio: Add get_vq_count() callback virtio: Add get_vq() callback virtio: Add exit_vq() callback virtio: Add reset() callback net/uip: Add exit function virtio/net: Clean virtqueue state virtio/net: Implement device and virtqueue reset virtio/blk: Reset virtqueue threadpool: Add cancel() function virtio/p9: Implement reset virtio/console: Implement reset include/kvm/threadpool.h | 2 + include/kvm/uip.h | 6 ++ include/kvm/virtio-mmio.h | 1 + include/kvm/virtio-pci.h | 1 + include/kvm/virtio.h | 30 ++++++- ioeventfd.c | 6 +- net/uip/core.c | 17 ++++ net/uip/dhcp.c | 6 ++ net/uip/tcp.c | 54 ++++++++++--- net/uip/udp.c | 41 ++++++++-- util/threadpool.c | 25 +++++- virtio/9p.c | 33 +++++++- virtio/balloon.c | 17 +++- virtio/blk.c | 84 ++++++++++++++------ virtio/console.c | 49 ++++++++---- virtio/core.c | 42 ++++++++++ virtio/mmio.c | 52 +++++++++---- virtio/net.c | 195 +++++++++++++++++++++++++++++++++------------- virtio/pci.c | 49 ++++++++---- virtio/rng.c | 12 ++- virtio/scsi.c | 17 +++- 21 files changed, 582 insertions(+), 157 deletions(-) --- 1.9.1