From nobody Mon May 6 10:44:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615449158; cv=none; d=zohomail.com; s=zohoarc; b=Pg7gtn+A3gvQPlKwlU1BzcHGwVp7dbj91wBbDz9tziuLjDKVIfQM2Ffs2zrUSOeDLptySevDOY9cGIWoj9polzTh4vp2VXk28YCYkKXfeaCU+6ZmszzXSmQTR6G48QZvT/wjg8MXH1MTw2RbwblDi4yeLQMa2eBxxTH42D8yKSo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615449158; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2bmA564MIot3eDShbXe7sDGYRgqTbocTgebgn2RrRBE=; b=M1jmWbqHm5U2GXNtktUcZXBkPwoxdczulaEAr/ol6zpFw1zmCDHdhWUqBqE9L8U+RQ8WZwCBJoyzKuWN4NAbnU9ZMzv16VJ+tS2LdBrn8YJUH+/DPM9EeUU+rtHPfqQX13LFUcWlG9+o4OADOD2DPrkDPvTih304xQomBLz4Dxc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615449158144941.3112493632839; Wed, 10 Mar 2021 23:52:38 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-183-B7dolwbKOQSLDCdJF3W2Hg-1; Thu, 11 Mar 2021 02:52:34 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8847F80982E; Thu, 11 Mar 2021 07:52:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26A251002393; Thu, 11 Mar 2021 07:52:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 200DF18155DE; Thu, 11 Mar 2021 07:52:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12B7qQuW004883 for ; Thu, 11 Mar 2021 02:52:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 636C5627DD; Thu, 11 Mar 2021 07:52:26 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-83.phx2.redhat.com [10.3.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 060045D6D7; Thu, 11 Mar 2021 07:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 861541132C13; Thu, 11 Mar 2021 08:52:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615449157; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2bmA564MIot3eDShbXe7sDGYRgqTbocTgebgn2RrRBE=; b=IbFt/qT6heenXzAnSp90Mv7S4PyVFtkDHt6/XBeBUDuLnzakgc0jdV6vchIAFqrQK+9+Rx m90w1PIMS20ATSdW4NL5/8kCaaSt8Ix+bn+1iq0lId3dNaKfjrrY3GxuJNz3i+H3Xtc3qN k83+Wjux6dhBfObd0CcIzcwnEofv5FQ= X-MC-Unique: B7dolwbKOQSLDCdJF3W2Hg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v4 1/4] docs/system/deprecated: Fix note on fdc drive properties Date: Thu, 11 Mar 2021 08:52:18 +0100 Message-Id: <20210311075221.1795266-2-armbru@redhat.com> In-Reply-To: <20210311075221.1795266-1-armbru@redhat.com> References: <20210311075221.1795266-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, richard.henderson@linaro.org, mreitz@redhat.com, jsnow@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Commit 4a27a638e7 "fdc: Deprecate configuring floppies with -global isa-fdc" actually deprecated any use of floppy controller driver properties, not just with -global. Correct the deprecation note accordingly. Fixes: 4a27a638e718b445648de6b27c709353551d9b44 Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: John Snow --- docs/system/deprecated.rst | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 241b28a521..f272c3a414 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -94,10 +94,11 @@ QEMU 5.1 has three options: to the user to load all the images they need. 3. ``-bios `` - Tells QEMU to load the specified file as the firmwr= ae. =20 -``Configuring floppies with ``-global`` -''''''''''''''''''''''''''''''''''''''' +Floppy controllers' drive properties (since 5.1) +'''''''''''''''''''''''''''''''''''''''''''''''' =20 -Use ``-device floppy,...`` instead: +Use ``-device floppy,...`` instead. When configuring onboard floppy +controllers :: =20 -global isa-fdc.driveA=3D... @@ -120,8 +121,30 @@ become =20 -device floppy,unit=3D1,drive=3D... =20 -``-drive`` with bogus interface type -'''''''''''''''''''''''''''''''''''' +When plugging in a floppy controller +:: + + -device isa-fdc,...,driveA=3D... + +becomes +:: + + -device isa-fdc,... + -device floppy,unit=3D0,drive=3D... + +and +:: + + -device isa-fdc,...,driveB=3D... + +becomes +:: + + -device isa-fdc,... + -device floppy,unit=3D1,drive=3D... + +``-drive`` with bogus interface type (since 5.1) +'''''''''''''''''''''''''''''''''''''''''''''''' =20 Drives with interface types other than ``if=3Dnone`` are for onboard devices. It is possible to use drives the board doesn't pick up with --=20 2.26.2 From nobody Mon May 6 10:44:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615449187; cv=none; d=zohomail.com; s=zohoarc; b=lBtoH+/iyYJUhBGN/OJPnU5sAZpaIpQ/8OyZB9OANj/PqXUdFaz5VTKylYpz4GXCQrEKehW3iNBrm/jngFGqe5yEPBkYzEZ0okJX1arhjCatb9/S8yDqy0jZrof8AYIqgG2z+RZqASX81N4ufm2MAu4CpglI6cV+R4G+YgWSaBg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615449187; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=u9Cfqr8QjVo8sIOUf24QhnRe1LxyOlWLqomlN2VKTTc=; b=hLxLRO9FuEc6eJaZqKZgIh0coPJjGpshYTB4U2/uGg07GYRQRxiv2AMWcxsec9VDEUtsHCUEk1Z3P10w3FrVWOwJNM8OqkhKGtegMX3jLcOVACRJIgONjtPy+gx80tna+okRd+tDsmQNhhhnLDBQmtm5inpJAkNi2/FX9D3olJ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615449187332321.30160517145293; Wed, 10 Mar 2021 23:53:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-vJk-FzsyONeTJMGvCSntAg-1; Thu, 11 Mar 2021 02:52:42 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 707BD802690; Thu, 11 Mar 2021 07:52:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E2D162461; Thu, 11 Mar 2021 07:52:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1123057DC7; Thu, 11 Mar 2021 07:52:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12B7qQts004899 for ; Thu, 11 Mar 2021 02:52:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id E4311100239F; Thu, 11 Mar 2021 07:52:26 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-83.phx2.redhat.com [10.3.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 070421002393; Thu, 11 Mar 2021 07:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8A7681132C14; Thu, 11 Mar 2021 08:52:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615449186; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=u9Cfqr8QjVo8sIOUf24QhnRe1LxyOlWLqomlN2VKTTc=; b=D3kcHb86YymBvBlYHc1Gj66TupiJ+m3/3kMJGFv6fcJofQ4egmpir5b0+4T7caE6ZeVWEX IkHhP7aummmvxjZJMcPOs10wPjpARTWYcwnMGt8DqrjTEo9/ffp4r14/JGxSohLAupcvXu 8yrP2d4bFrVa8sroO631SmGUYXMs+04= X-MC-Unique: vJk-FzsyONeTJMGvCSntAg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v4 2/4] fdc: Drop deprecated floppy configuration Date: Thu, 11 Mar 2021 08:52:19 +0100 Message-Id: <20210311075221.1795266-3-armbru@redhat.com> In-Reply-To: <20210311075221.1795266-1-armbru@redhat.com> References: <20210311075221.1795266-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, richard.henderson@linaro.org, mreitz@redhat.com, jsnow@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Drop the crap deprecated in commit 4a27a638e7 "fdc: Deprecate configuring floppies with -global isa-fdc" (v5.1.0). Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: John Snow --- docs/system/deprecated.rst | 49 --- docs/system/removed-features.rst | 49 +++ hw/block/fdc.c | 54 +-- tests/qemu-iotests/172 | 31 +- tests/qemu-iotests/172.out | 562 +------------------------------ 5 files changed, 53 insertions(+), 692 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index f272c3a414..8d43b9336a 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -94,55 +94,6 @@ QEMU 5.1 has three options: to the user to load all the images they need. 3. ``-bios `` - Tells QEMU to load the specified file as the firmwr= ae. =20 -Floppy controllers' drive properties (since 5.1) -'''''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-device floppy,...`` instead. When configuring onboard floppy -controllers -:: - - -global isa-fdc.driveA=3D... - -global sysbus-fdc.driveA=3D... - -global SUNW,fdtwo.drive=3D... - -become -:: - - -device floppy,unit=3D0,drive=3D... - -and -:: - - -global isa-fdc.driveB=3D... - -global sysbus-fdc.driveB=3D... - -become -:: - - -device floppy,unit=3D1,drive=3D... - -When plugging in a floppy controller -:: - - -device isa-fdc,...,driveA=3D... - -becomes -:: - - -device isa-fdc,... - -device floppy,unit=3D0,drive=3D... - -and -:: - - -device isa-fdc,...,driveB=3D... - -becomes -:: - - -device isa-fdc,... - -device floppy,unit=3D1,drive=3D... - ``-drive`` with bogus interface type (since 5.1) '''''''''''''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index 4dcf4f924c..d10fc8cc17 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -38,6 +38,55 @@ or ``-display default,show-cursor=3Don`` instead. QEMU 5.0 introduced an alternative syntax to specify the size of the trans= lation block cache, ``-accel tcg,tb-size=3D``. =20 +Floppy controllers' drive properties (removed in 6.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-device floppy,...`` instead. When configuring onboard floppy +controllers +:: + + -global isa-fdc.driveA=3D... + -global sysbus-fdc.driveA=3D... + -global SUNW,fdtwo.drive=3D... + +become +:: + + -device floppy,unit=3D0,drive=3D... + +and +:: + + -global isa-fdc.driveB=3D... + -global sysbus-fdc.driveB=3D... + +become +:: + + -device floppy,unit=3D1,drive=3D... + +When plugging in a floppy controller +:: + + -device isa-fdc,...,driveA=3D... + +becomes +:: + + -device isa-fdc,... + -device floppy,unit=3D0,drive=3D... + +and +:: + + -device isa-fdc,...,driveB=3D... + +becomes +:: + + -device isa-fdc,... + -device floppy,unit=3D1,drive=3D... + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 198940e737..f978ddf647 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -870,7 +870,6 @@ struct FDCtrl { uint8_t num_floppies; FDrive drives[MAX_FD]; struct { - BlockBackend *blk; FloppyDriveType type; } qdev_for_drives[MAX_FD]; int reset_sensei; @@ -2517,56 +2516,12 @@ static void fdctrl_connect_drives(FDCtrl *fdctrl, D= eviceState *fdc_dev, { unsigned int i; FDrive *drive; - DeviceState *dev; - BlockBackend *blk; - bool ok; - const char *fdc_name, *drive_suffix; =20 for (i =3D 0; i < MAX_FD; i++) { drive =3D &fdctrl->drives[i]; drive->fdctrl =3D fdctrl; - - /* If the drive is not present, we skip creating the qdev device, = but - * still have to initialise the controller. */ - blk =3D fdctrl->qdev_for_drives[i].blk; - if (!blk) { - fd_init(drive); - fd_revalidate(drive); - continue; - } - - fdc_name =3D object_get_typename(OBJECT(fdc_dev)); - drive_suffix =3D !strcmp(fdc_name, "SUNW,fdtwo") ? "" : i ? "B" : = "A"; - warn_report("warning: property %s.drive%s is deprecated", - fdc_name, drive_suffix); - error_printf("Use -device floppy,unit=3D%d,drive=3D... instead.\n"= , i); - - dev =3D qdev_new("floppy"); - qdev_prop_set_uint32(dev, "unit", i); - qdev_prop_set_enum(dev, "drive-type", fdctrl->qdev_for_drives[i].t= ype); - - /* - * Hack alert: we move the backend from the floppy controller - * device to the floppy device. We first need to detach the - * controller, or else floppy_create()'s qdev_prop_set_drive() - * will die when it attaches floppy device. We also need to - * take another reference so that blk_detach_dev() doesn't - * free blk while we still need it. - * - * The hack is probably a bad idea. - */ - blk_ref(blk); - blk_detach_dev(blk, fdc_dev); - fdctrl->qdev_for_drives[i].blk =3D NULL; - ok =3D qdev_prop_set_drive_err(dev, "drive", blk, errp); - blk_unref(blk); - if (!ok) { - return; - } - - if (!qdev_realize_and_unref(dev, &fdctrl->bus.bus, errp)) { - return; - } + fd_init(drive); + fd_revalidate(drive); } } =20 @@ -2882,8 +2837,6 @@ static Property isa_fdc_properties[] =3D { DEFINE_PROP_UINT32("iobase", FDCtrlISABus, iobase, 0x3f0), DEFINE_PROP_UINT32("irq", FDCtrlISABus, irq, 6), DEFINE_PROP_UINT32("dma", FDCtrlISABus, dma, 2), - DEFINE_PROP_DRIVE("driveA", FDCtrlISABus, state.qdev_for_drives[0].blk= ), - DEFINE_PROP_DRIVE("driveB", FDCtrlISABus, state.qdev_for_drives[1].blk= ), DEFINE_PROP_SIGNED("fdtypeA", FDCtrlISABus, state.qdev_for_drives[0].t= ype, FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type, FloppyDriveType), @@ -2941,8 +2894,6 @@ static const VMStateDescription vmstate_sysbus_fdc = =3D{ }; =20 static Property sysbus_fdc_properties[] =3D { - DEFINE_PROP_DRIVE("driveA", FDCtrlSysBus, state.qdev_for_drives[0].blk= ), - DEFINE_PROP_DRIVE("driveB", FDCtrlSysBus, state.qdev_for_drives[1].blk= ), DEFINE_PROP_SIGNED("fdtypeA", FDCtrlSysBus, state.qdev_for_drives[0].t= ype, FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type, FloppyDriveType), @@ -2971,7 +2922,6 @@ static const TypeInfo sysbus_fdc_info =3D { }; =20 static Property sun4m_fdc_properties[] =3D { - DEFINE_PROP_DRIVE("drive", FDCtrlSysBus, state.qdev_for_drives[0].blk), DEFINE_PROP_SIGNED("fdtype", FDCtrlSysBus, state.qdev_for_drives[0].ty= pe, FLOPPY_DRIVE_TYPE_AUTO, qdev_prop_fdc_drive_type, FloppyDriveType), diff --git a/tests/qemu-iotests/172 b/tests/qemu-iotests/172 index 0ac942a6c5..ff269ca7b5 100755 --- a/tests/qemu-iotests/172 +++ b/tests/qemu-iotests/172 @@ -123,15 +123,6 @@ check_floppy_qtree -drive if=3Dfloppy,file=3D"$TEST_IM= G" check_floppy_qtree -drive if=3Dfloppy,file=3D"$TEST_IMG",index=3D1 check_floppy_qtree -drive if=3Dfloppy,file=3D"$TEST_IMG" -drive if=3Dflopp= y,file=3D"$TEST_IMG.2",index=3D1 =20 -echo -echo -echo =3D=3D=3D Using -drive if=3Dnone and -global =3D=3D=3D - -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -global isa-fdc.dri= veA=3Dnone0 -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -global isa-fdc.dri= veB=3Dnone0 -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveA=3Dnone0 -global isa-fdc.driveB= =3Dnone1 - echo echo echo =3D=3D=3D Using -drive if=3Dnone and -device =3D=3D=3D @@ -145,13 +136,6 @@ echo echo echo =3D=3D=3D Mixing -fdX and -global =3D=3D=3D =20 -# Working -check_floppy_qtree -fda "$TEST_IMG" -drive if=3Dnone,file=3D"$TEST_IMG.2" = -global isa-fdc.driveB=3Dnone0 -check_floppy_qtree -fdb "$TEST_IMG" -drive if=3Dnone,file=3D"$TEST_IMG.2" = -global isa-fdc.driveA=3Dnone0 - -# Conflicting -check_floppy_qtree -fda "$TEST_IMG" -drive if=3Dnone,file=3D"$TEST_IMG.2" = -global isa-fdc.driveA=3Dnone0 -check_floppy_qtree -fdb "$TEST_IMG" -drive if=3Dnone,file=3D"$TEST_IMG.2" = -global isa-fdc.driveB=3Dnone0 # Conflicting, -fdX wins check_floppy_qtree -fda "$TEST_IMG" -drive if=3Dnone,file=3D"$TEST_IMG.2" = -global floppy.drive=3Dnone0 =20 @@ -186,23 +170,10 @@ echo echo =3D=3D=3D Mixing -global and -device =3D=3D=3D =20 # Working -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveA=3Dnone0 -device floppy,drive=3Dn= one1 -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveA=3Dnone0 -device floppy,drive=3Dn= one1,unit=3D1 - -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveB=3Dnone0 -device floppy,drive=3Dn= one1 -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveB=3Dnone0 -device floppy,drive=3Dn= one1,unit=3D0 check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" \ -global floppy.drive=3Dnone0 -device floppy,unit=3D0 =20 # Conflicting -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveA=3Dnone0 -device floppy,drive=3Dn= one1,unit=3D0 -check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ - -global isa-fdc.driveB=3Dnone0 -device floppy,drive=3Dn= one1,unit=3D1 check_floppy_qtree -drive if=3Dnone,file=3D"$TEST_IMG" -drive if=3Dnone,fi= le=3D"$TEST_IMG.2" \ -global floppy.drive=3Dnone0 -device floppy,drive=3Dnon= e1,unit=3D0 =20 @@ -227,7 +198,7 @@ echo =3D=3D=3D Too many floppy drives =3D=3D=3D check_floppy_qtree -drive if=3Dfloppy,file=3D"$TEST_IMG" \ -drive if=3Dnone,file=3D"$TEST_IMG.2" \ -drive if=3Dnone,file=3D"$TEST_IMG.3" \ - -global isa-fdc.driveB=3Dnone0 \ + -device floppy,drive=3Dnone0 \ -device floppy,drive=3Dnone1 =20 echo diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out index 349ae51d6c..d53f61d0de 100644 --- a/tests/qemu-iotests/172.out +++ b/tests/qemu-iotests/172.out @@ -12,8 +12,6 @@ Testing: iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -41,8 +39,6 @@ Testing: -fda TEST_DIR/t.qcow2 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -80,8 +76,6 @@ Testing: -fdb TEST_DIR/t.qcow2 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -134,8 +128,6 @@ Testing: -fda TEST_DIR/t.qcow2 -fdb TEST_DIR/t.qcow2.2 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -189,8 +181,6 @@ Testing: -fdb iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -229,8 +219,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -268,8 +256,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2,ind= ex=3D1 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -322,8 +308,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -dr= ive if=3Dfloppy,file=3DTEST_DIR/t iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -372,150 +356,6 @@ sd0: [not inserted] =20 =20 =20 -=3D=3D=3D Using -drive if=3Dnone and -global =3D=3D=3D - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -global isa-fdc.driveA= =3Dnone0 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -global isa-fdc.driveB= =3Dnone0 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=3Dnone0 -global isa-fdc.driveB=3D= none1 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none1" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - - =3D=3D=3D Using -drive if=3Dnone and -device =3D=3D=3D =20 Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -device floppy,drive=3Dn= one0 @@ -524,8 +364,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -devi= ce floppy,drive=3Dnone0 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -563,8 +401,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -devi= ce floppy,drive=3Dnone0,unit=3D1 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -602,8 +438,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -driv= e if=3Dnone,file=3DTEST_DIR/t.qco iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -654,130 +488,6 @@ sd0: [not inserted] =20 =3D=3D=3D Mixing -fdX and -global =3D=3D=3D =20 -Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.2 = -global isa-fdc.driveB=3Dnone0 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "floppy0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -floppy0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -fdb TEST_DIR/t.qcow2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.2 = -global isa-fdc.driveA=3Dnone0 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "floppy1" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -floppy1 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none0 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.2 = -global isa-fdc.driveA=3Dnone0 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. -QEMU_PROG: Floppy unit 0 is in use - -Testing: -fdb TEST_DIR/t.qcow2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.2 = -global isa-fdc.driveB=3Dnone0 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. -QEMU_PROG: Floppy unit 1 is in use - Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.2 = -global floppy.drive=3Dnone0 QEMU_PROG: -global floppy.drive=3D... conflicts with drive=3Dfloppy0 =20 @@ -790,8 +500,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -845,8 +553,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -900,8 +606,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -955,8 +659,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1019,8 +721,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -d= rive if=3Dnone,file=3DTEST_DIR/t.q iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1074,8 +774,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -d= rive if=3Dnone,file=3DTEST_DIR/t.q iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1129,242 +827,12 @@ QEMU_PROG: -device floppy,drive=3Dnone0,unit=3D0: F= loppy unit 0 is in use =20 =3D=3D=3D Mixing -global and -device =3D=3D=3D =20 -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=3Dnone0 -device floppy,drive=3Dno= ne1 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none1" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/peripheral-anon/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=3Dnone0 -device floppy,drive=3Dno= ne1,unit=3D1 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none1" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/peripheral-anon/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=3Dnone0 -device floppy,drive=3Dno= ne1 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none1" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/peripheral-anon/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=3Dnone0 -device floppy,drive=3Dno= ne1,unit=3D0 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. - - dev: isa-fdc, id "" - iobase =3D 1008 (0x3f0) - irq =3D 6 (0x6) - dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" - fdtypeA =3D "auto" - fdtypeB =3D "auto" - fallback =3D "288" - isa irq 6 - bus: floppy-bus.0 - type floppy-bus - dev: floppy, id "" - unit =3D 0 (0x0) - drive =3D "none1" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" - dev: floppy, id "" - unit =3D 1 (0x1) - drive =3D "none0" - logical_block_size =3D 512 (512 B) - physical_block_size =3D 512 (512 B) - min_io_size =3D 0 (0 B) - opt_io_size =3D 0 (0 B) - discard_granularity =3D 4294967295 (4 GiB) - write-cache =3D "auto" - share-rw =3D false - drive-type =3D "144" -none0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2) - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -none1 (NODE_NAME): TEST_DIR/t.qcow2.2 (qcow2) - Attached to: /machine/peripheral-anon/device[N] - Removable device: not locked, tray closed - Cache mode: writeback - -ide1-cd0: [not inserted] - Attached to: /machine/unattached/device[N] - Removable device: not locked, tray closed - -sd0: [not inserted] - Removable device: not locked, tray closed -(qemu) quit - - Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -global floppy.drive=3Dn= one0 -device floppy,unit=3D0 =20 dev: isa-fdc, id "" iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1396,16 +864,6 @@ sd0: [not inserted] (qemu) quit =20 =20 -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveA=3Dnone0 -device floppy,drive=3Dno= ne1,unit=3D0 -QEMU_PROG: warning: warning: property isa-fdc.driveA is deprecated -Use -device floppy,unit=3D0,drive=3D... instead. -QEMU_PROG: -device floppy,drive=3Dnone1,unit=3D0: Floppy unit 0 is in use - -Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global isa-fdc.driveB=3Dnone0 -device floppy,drive=3Dno= ne1,unit=3D1 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. -QEMU_PROG: -device floppy,drive=3Dnone1,unit=3D1: Floppy unit 1 is in use - Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -global floppy.drive=3Dnone0 -device floppy,drive=3Dnone= 1,unit=3D0 QEMU_PROG: -device floppy,drive=3Dnone1,unit=3D0: -global floppy.drive=3D.= .. conflicts with drive=3Dnone1 =20 @@ -1430,9 +888,7 @@ QEMU_PROG: -device floppy,drive=3Dfloppy0: Property 'f= loppy.drive' can't find valu =20 =3D=3D=3D Too many floppy drives =3D=3D=3D =20 -Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file= =3DTEST_DIR/t.qcow2.2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.3 -global is= a-fdc.driveB=3Dnone0 -device floppy,drive=3Dnone1 -QEMU_PROG: warning: warning: property isa-fdc.driveB is deprecated -Use -device floppy,unit=3D1,drive=3D... instead. +Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -drive if=3Dnone,file= =3DTEST_DIR/t.qcow2.2 -drive if=3Dnone,file=3DTEST_DIR/t.qcow2.3 -device fl= oppy,drive=3Dnone0 -device floppy,drive=3Dnone1 QEMU_PROG: -device floppy,drive=3Dnone1: Can't create floppy unit 2, bus s= upports only 2 units =20 =20 @@ -1444,8 +900,6 @@ Testing: -device floppy iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1470,8 +924,6 @@ Testing: -device floppy,drive-type=3D120 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1496,8 +948,6 @@ Testing: -device floppy,drive-type=3D144 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1522,8 +972,6 @@ Testing: -device floppy,drive-type=3D288 iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1551,8 +999,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -dev= ice floppy,drive=3Dnone0,drive-t iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1590,8 +1036,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,drive-t iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1632,8 +1076,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,logical iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" @@ -1671,8 +1113,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,physica iobase =3D 1008 (0x3f0) irq =3D 6 (0x6) dma =3D 2 (0x2) - driveA =3D "" - driveB =3D "" fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" --=20 2.26.2 From nobody Mon May 6 10:44:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615449157; cv=none; d=zohomail.com; s=zohoarc; b=FMSWKaCJisavCfR56c/cAIiM0ezcWl2WekwkO6QkCidW4WFT5cZutANSR7Tr+KL08cuSrPnHqATi1lhIjCMTs7EBfmF4x+fRVTuqu4lZL8F0NG5VHNUvXvz8n1i40oPaDODFW3DjisfH35M8JGNGS7vezIKfe/32VnMK4LjoaA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615449157; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jO/U9oC1uDnEofr01HB/mG7JYp6NvbgVHNrMl4bHw1U=; b=HqCE30Fagp+80t6A0GCBGxYHleBTrlZL4uZxQ0lD3nbadeCKK/JCV8EMYw1NlerkEHgyPgD6R6xD9aNMXri36EkixcnWOPhdCXH5HcmQkzeodfQrGqB/GdVxDIv1HQgUdRMxFALRUJIZcVu2LED3dqDzrCElXsDmr1y9Y10N/ds= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615449157556623.0835582252761; Wed, 10 Mar 2021 23:52:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-181-JqA4LSXLOpyg7ppztUna4w-1; Thu, 11 Mar 2021 02:52:34 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4C5C910866AA; Thu, 11 Mar 2021 07:52:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2B2C5C1BD; Thu, 11 Mar 2021 07:52:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08CF418006D9; Thu, 11 Mar 2021 07:52:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12B7qQKi004878 for ; Thu, 11 Mar 2021 02:52:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 550DF5DF26; Thu, 11 Mar 2021 07:52:26 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-83.phx2.redhat.com [10.3.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 06F1D5DEF9; Thu, 11 Mar 2021 07:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8DA8E1131C01; Thu, 11 Mar 2021 08:52:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615449156; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jO/U9oC1uDnEofr01HB/mG7JYp6NvbgVHNrMl4bHw1U=; b=Aa4KYQaMdPzcPMJbY96JaSa+LVW9AOdqLf1O5zZyLpqrHhzBvbatOrGfK2noOzz7muCQrw 8RIKCwVIeX6yi1U5oPHOw8AZpJVILennCVRdCHmWLiwv4lmt+lY/Hv9yZ7fl93xVbjxZW6 zJ8yF2z4E6CsoTPhWJTpC3WvSeVRAdc= X-MC-Unique: JqA4LSXLOpyg7ppztUna4w-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v4 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common() Date: Thu, 11 Mar 2021 08:52:20 +0100 Message-Id: <20210311075221.1795266-4-armbru@redhat.com> In-Reply-To: <20210311075221.1795266-1-armbru@redhat.com> References: <20210311075221.1795266-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, richard.henderson@linaro.org, mreitz@redhat.com, jsnow@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The previous commit rendered the name fdctrl_connect_drives() somewhat misleading. Get rid of it by inlining the (now pretty simple) function into its only caller. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: John Snow --- hw/block/fdc.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index f978ddf647..5210ab85e2 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -2511,20 +2511,6 @@ void isa_fdc_init_drives(ISADevice *fdc, DriveInfo *= *fds) fdctrl_init_drives(&ISA_FDC(fdc)->state.bus, fds); } =20 -static void fdctrl_connect_drives(FDCtrl *fdctrl, DeviceState *fdc_dev, - Error **errp) -{ - unsigned int i; - FDrive *drive; - - for (i =3D 0; i < MAX_FD; i++) { - drive =3D &fdctrl->drives[i]; - drive->fdctrl =3D fdctrl; - fd_init(drive); - fd_revalidate(drive); - } -} - void fdctrl_init_sysbus(qemu_irq irq, int dma_chann, hwaddr mmio_base, DriveInfo **fds) { @@ -2604,7 +2590,14 @@ static void fdctrl_realize_common(DeviceState *dev, = FDCtrl *fdctrl, } =20 floppy_bus_create(fdctrl, &fdctrl->bus, dev); - fdctrl_connect_drives(fdctrl, dev, errp); + + for (i =3D 0; i < MAX_FD; i++) { + FDrive *drive =3D &fdctrl->drives[i]; + + drive->fdctrl =3D fdctrl; + fd_init(drive); + fd_revalidate(drive); + } } =20 static const MemoryRegionPortio fdc_portio_list[] =3D { --=20 2.26.2 From nobody Mon May 6 10:44:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615449159; cv=none; d=zohomail.com; s=zohoarc; b=e8u2MhU/tNLBFgca3YDgEcCwGQYZriRkk1LN70UhyTvSCiNUT4XQD3BcaYdrsqJv68NAepQqDU7ztROO/I+KDEd9Rj2gPmVsJzTnz6h0b9VWK7DsVL/sIhDFH1Slzult9bP7APIjmmdgVCfZaJjt6iHxC6MBxjuBHHkNtnzqZ0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615449159; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=origTRd/6QwIFTBf2+vHW/E+QKQjO0XtzaaIEuVWKvI=; b=Rf8qGbhZpxF634tMTuTH78OZJHDhmK6Es2q7j9FWIGWNrW5I0t8M+fR7bbh+uiPS5ZsvDNRiNd1ozQdz4PE6AwQhcqKnYuGNX1PNBmKRicaKlY50DqNn2z1v8n/JwF3WxgGVSonBPBOqsAlt8vW0SqdWgwbOkQAy6JZztgPOo14= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615449159907484.7703804850894; Wed, 10 Mar 2021 23:52:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-FsGP-bIpPWy0_aafzwx91Q-1; Thu, 11 Mar 2021 02:52:35 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DA1DE10866A0; Thu, 11 Mar 2021 07:52:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B850C5B6BF; Thu, 11 Mar 2021 07:52:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7EE1B57DC2; Thu, 11 Mar 2021 07:52:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12B7qQAK004888 for ; Thu, 11 Mar 2021 02:52:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 854A75D6D7; Thu, 11 Mar 2021 07:52:26 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-112-83.phx2.redhat.com [10.3.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0800A5B6BF; Thu, 11 Mar 2021 07:52:23 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 90F991141CBD; Thu, 11 Mar 2021 08:52:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615449158; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=origTRd/6QwIFTBf2+vHW/E+QKQjO0XtzaaIEuVWKvI=; b=hqC8KkjEL5QFMjSqFUhjO1S6efkfqMfYxgkRiqa+X3L609Nj5hfjyY9Pb5iKgkPKixiyB+ /hNn2WtamTuEeTRqNU8UsTEvLzZGqGkqKiMlt7ir4KW2jLR6hY63pgFAOpyiJCBkgtU2uc xhchk1JBUbqtuCyz7tNmMWlU9/P59MI= X-MC-Unique: FsGP-bIpPWy0_aafzwx91Q-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v4 4/4] blockdev: Drop deprecated bogus -drive interface type Date: Thu, 11 Mar 2021 08:52:21 +0100 Message-Id: <20210311075221.1795266-5-armbru@redhat.com> In-Reply-To: <20210311075221.1795266-1-armbru@redhat.com> References: <20210311075221.1795266-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, richard.henderson@linaro.org, mreitz@redhat.com, jsnow@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Drop the crap deprecated in commit a1b40bda08 "blockdev: Deprecate -drive with bogus interface type" (v5.1.0). drive_check_orphaned() no longer depends on qemu_create_cli_devices(). Call it right after board initialization for clarity. Signed-off-by: Markus Armbruster Reviewed-by: John Snow --- docs/system/deprecated.rst | 7 ------ docs/system/removed-features.rst | 7 ++++++ include/sysemu/blockdev.h | 1 - blockdev.c | 37 +++++++++++++------------------- softmmu/vl.c | 11 +--------- 5 files changed, 23 insertions(+), 40 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 8d43b9336a..1279b57ee2 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -94,13 +94,6 @@ QEMU 5.1 has three options: to the user to load all the images they need. 3. ``-bios `` - Tells QEMU to load the specified file as the firmwr= ae. =20 -``-drive`` with bogus interface type (since 5.1) -'''''''''''''''''''''''''''''''''''''''''''''''' - -Drives with interface types other than ``if=3Dnone`` are for onboard -devices. It is possible to use drives the board doesn't pick up with --device. This usage is now deprecated. Use ``if=3Dnone`` instead. - Short-form boolean options (since 6.0) '''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/system/removed-features.rst b/docs/system/removed-feature= s.rst index d10fc8cc17..40b1a5ede3 100644 --- a/docs/system/removed-features.rst +++ b/docs/system/removed-features.rst @@ -87,6 +87,13 @@ becomes -device isa-fdc,... -device floppy,unit=3D1,drive=3D... =20 +``-drive`` with bogus interface type (removed in 6.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Drives with interface types other than ``if=3Dnone`` are for onboard +devices. Drives the board doesn't pick up can no longer be used with +-device. Use ``if=3Dnone`` instead. + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index 3b5fcda08d..32c2d6023c 100644 --- a/include/sysemu/blockdev.h +++ b/include/sysemu/blockdev.h @@ -35,7 +35,6 @@ struct DriveInfo { bool is_default; /* Added by default_drive() ? */ int media_cd; QemuOpts *opts; - bool claimed_by_board; QTAILQ_ENTRY(DriveInfo) next; }; =20 diff --git a/blockdev.c b/blockdev.c index 68f022827c..c6149fe6a8 100644 --- a/blockdev.c +++ b/blockdev.c @@ -239,19 +239,10 @@ DriveInfo *drive_get(BlockInterfaceType type, int bus= , int unit) return NULL; } =20 -void drive_mark_claimed_by_board(void) -{ - BlockBackend *blk; - DriveInfo *dinfo; - - for (blk =3D blk_next(NULL); blk; blk =3D blk_next(blk)) { - dinfo =3D blk_legacy_dinfo(blk); - if (dinfo && blk_get_attached_dev(blk)) { - dinfo->claimed_by_board =3D true; - } - } -} - +/* + * Check board claimed all -drive that are meant to be claimed. + * Fatal error if any remain unclaimed. + */ void drive_check_orphaned(void) { BlockBackend *blk; @@ -261,7 +252,17 @@ void drive_check_orphaned(void) =20 for (blk =3D blk_next(NULL); blk; blk =3D blk_next(blk)) { dinfo =3D blk_legacy_dinfo(blk); - if (dinfo->is_default || dinfo->type =3D=3D IF_NONE) { + /* + * Ignore default drives, because we create certain default + * drives unconditionally, then leave them unclaimed. Not the + * user's fault. + * Ignore IF_VIRTIO, because it gets desugared into -device. + * Leave failing to -device. + * Ignore IF_NONE, because leaving unclaimed IF_NONE available + * for device_add is a feature. + */ + if (dinfo->is_default || dinfo->type =3D=3D IF_VIRTIO + || dinfo->type =3D=3D IF_NONE) { continue; } if (!blk_get_attached_dev(blk)) { @@ -272,14 +273,6 @@ void drive_check_orphaned(void) if_name[dinfo->type], dinfo->bus, dinfo->unit); loc_pop(&loc); orphans =3D true; - continue; - } - if (!dinfo->claimed_by_board && dinfo->type !=3D IF_VIRTIO) { - loc_push_none(&loc); - qemu_opts_loc_restore(dinfo->opts); - warn_report("bogus if=3D%s is deprecated, use if=3Dnone", - if_name[dinfo->type]); - loc_pop(&loc); } } =20 diff --git a/softmmu/vl.c b/softmmu/vl.c index ff488ea3e7..acaba95346 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2460,13 +2460,7 @@ static void qemu_init_board(void) /* From here on we enter MACHINE_PHASE_INITIALIZED. */ machine_run_board_init(current_machine); =20 - /* - * TODO To drop support for deprecated bogus if=3D..., move - * drive_check_orphaned() here, replacing this call. Also drop - * its deprecation warning, along with DriveInfo member - * @claimed_by_board. - */ - drive_mark_claimed_by_board(); + drive_check_orphaned(); =20 realtime_init(); =20 @@ -2500,9 +2494,6 @@ static void qemu_machine_creation_done(void) { MachineState *machine =3D MACHINE(qdev_get_machine()); =20 - /* Did we create any drives that we failed to create a device for? */ - drive_check_orphaned(); - /* Don't warn about the default network setup that you get if * no command line -net or -netdev options are specified. There * are two cases that we would otherwise complain about: --=20 2.26.2