From patchwork Thu Jan 10 15:03:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 10756047 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 3396614DE for ; Thu, 10 Jan 2019 15:11:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2412D29A75 for ; Thu, 10 Jan 2019 15:11:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1727029A6A; Thu, 10 Jan 2019 15:11:22 +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_INVALID, DKIM_SIGNED,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 B212C29A75 for ; Thu, 10 Jan 2019 15:11:21 +0000 (UTC) Received: from localhost ([127.0.0.1]:45999 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghbzM-0007iQ-Vg for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 Jan 2019 10:11:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghbsJ-000325-FJ for qemu-devel@nongnu.org; Thu, 10 Jan 2019 10:04:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghbsG-0007Nw-E4 for qemu-devel@nongnu.org; Thu, 10 Jan 2019 10:04:03 -0500 Received: from fanzine.igalia.com ([91.117.99.155]:57862) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ghbsF-0007NI-PR; Thu, 10 Jan 2019 10:04:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Message-Id:Date:Subject:Cc:To:From; bh=5yT+l43pVYnG2mpK/FsZ1n56NOtMVSTxawxBnnl/ncA=; b=p41zPsGipZWyMbyZL/mUvcsBM7RXZGG1gvnrv3os9uPNF8BuRkTOS2zX7MEErhns7tdWyE7d+/XRzdO6xLqZv5t18pzL0I1C1fZ3pBTFrvzPX0TczRcU5jLKfLJrBwhJsUnPm4OgX6UVXCgr8xJCsWUmD8/F+B/4iHxohnJvdqzhzC/hke/pSqKJohhhnUdxxDT14/i5+tczROAnhTI+1xxBJ2IPYPg1aKDNXL54InF3+qExNmmnQyVIGZF3UKAJwlGh3QPj39XdSfUShgxHOTm/vwULKmUU5EeQNsR4OzumYFCuOVpzQaV0jL3TnPnb3zKuQ0bHIil4zGc6is+3HA==; Received: from [194.100.51.2] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ghbsD-0003mS-Lw; Thu, 10 Jan 2019 16:03:57 +0100 Received: from berto by perseus.local with local (Exim 4.89) (envelope-from ) id 1ghbry-0002BZ-1b; Thu, 10 Jan 2019 17:03:42 +0200 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2019 17:03:34 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 91.117.99.155 Subject: [Qemu-devel] [PATCH 0/6] Acquire the AioContext during _realize() 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: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP As discussed yesterday, this series acquires the AioContext in the _realize() functions of several devices before making use of their block backends. This fixes at least a couple of crashes (in virtio-blk and scsi). Berto Alberto Garcia (6): block: Acquire the AioContext in virtio_blk_device_realize() block: Acquire the AioContext in scsi_*_realize() block: Acquire the AioContext in floppy_drive_realize() block: Acquire the AioContext in nvme_realize() block: Acquire the AioContext in ide_dev_initfn() block: Acquire the AioContext in usb_msd_storage_realize() hw/block/fdc.c | 15 +++++++++++---- hw/block/nvme.c | 13 ++++++++++--- hw/block/virtio-blk.c | 22 +++++++++++++++------- hw/ide/qdev.c | 17 ++++++++++++----- hw/scsi/scsi-disk.c | 24 +++++++++++++++++++----- hw/usb/dev-storage.c | 5 +++++ 6 files changed, 72 insertions(+), 24 deletions(-)