From patchwork Mon Feb 18 13:06:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 10817971 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 4BD441390 for ; Mon, 18 Feb 2019 13:09:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A9E82AA5C for ; Mon, 18 Feb 2019 13:09:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EF262AA66; Mon, 18 Feb 2019 13:09:59 +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 D93442AA5F for ; Mon, 18 Feb 2019 13:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730807AbfBRNJz (ORCPT ); Mon, 18 Feb 2019 08:09:55 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:57968 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729750AbfBRNJz (ORCPT ); Mon, 18 Feb 2019 08:09:55 -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 30D1F80D; Mon, 18 Feb 2019 05:09:54 -0800 (PST) Received: from ostrya.cambridge.arm.com (ostrya.cambridge.arm.com [10.1.197.2]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5E36B3F720; Mon, 18 Feb 2019 05:09:53 -0800 (PST) From: Jean-Philippe Brucker To: kvm@vger.kernel.org Cc: will.deacon@arm.com, andre.przywara@arm.com Subject: [PATCH kvmtool 0/9] Disk fixes and AIO reset Date: Mon, 18 Feb 2019 13:06:53 +0000 Message-Id: <20190218130702.32575-1-jean-philippe.brucker@arm.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Patches 1-7 fix a few issues found while testing disk backends, and patches 8-9 implement reset for the AIO backend. By draining the AIO queue on reset, we avoid writing I/O completions to the used ring after the guest reclaimed the ring's pages. Jean-Philippe Brucker (9): qcow: Fix qcow1 exit fault virtio/blk: Set VIRTIO_BLK_F_RO when the disk is read-only guest: sync disk before shutting down disk/aio: Refactor AIO code disk/aio: Fix use of disk->async disk/aio: Fix AIO thread disk/aio: Cancel AIO thread on cleanup disk/aio: Add wait() disk operation virtio/blk: sync I/O on reset Makefile | 2 + disk/aio.c | 150 +++++++++++++++++++++++++++++++++++++++ disk/blk.c | 10 +-- disk/core.c | 69 ++++++++---------- disk/qcow.c | 3 +- disk/raw.c | 56 +++------------ guest/init.c | 1 + include/kvm/disk-image.h | 53 ++++++++++++-- include/kvm/read-write.h | 11 --- util/read-write.c | 36 ---------- virtio/blk.c | 7 +- 11 files changed, 249 insertions(+), 149 deletions(-) create mode 100644 disk/aio.c