From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMD4o-0003wh-92 for qemu-devel@nongnu.org; Tue, 17 May 2011 01:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMD4m-0001h7-MP for qemu-devel@nongnu.org; Tue, 17 May 2011 01:44:14 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:47386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMD4m-0001h2-7I for qemu-devel@nongnu.org; Tue, 17 May 2011 01:44:12 -0400 Message-ID: <4DD20B20.1050403@web.de> Date: Tue, 17 May 2011 07:44:00 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1303722395-10791-1-git-send-email-dbaryshkov@gmail.com> <1303722395-10791-3-git-send-email-dbaryshkov@gmail.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig9D988CD0EE12C9067140CECC" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [RESEND][PATCH 3/9] microdrive: qdevify List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: andrzej zaborowski Cc: Dmitry Eremin-Solenikov , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig9D988CD0EE12C9067140CECC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-05-17 03:38, andrzej zaborowski wrote: > On 16 May 2011 15:08, Dmitry Eremin-Solenikov wr= ote: >> On 5/16/11, andrzej zaborowski wrote: >>> On 16 May 2011 06:54, Dmitry Eremin-Solenikov = wrote: >>>> Socket is required, as we have to know the QBus before creating the >>>> device on it. >>> >>> Let's skip the qbusification then. It seems that qbus is a wrong >>> choice for pcmcia and there are no new features or bugs fixed by the >>> conversion, it's code motion? I also don't see why the socket >>> structure should be needed at the creation time of a PCI device for >>> example, the BusInfo should be enough logically. >> >> Major point for qbus'ification was ability to create PCMCIA devices fr= om >> command line/via other management tools. This would also allow us e.g.= >> to move microdrive driver to common ide parts, etc. >=20 > That would be nice but it may be better to use separate command line > switches / monitor commands for hotpluggable busses. >=20 >> >> For creation of a DeviceState via qdev_create you need BusState (which= >> is a part of PCMCIASocket). Of course I can make one global QBus for >> all PCMCIA devices and make some artificial hacks to attach/detach car= ds >> to artificial sockets, but this seems like a hack. >=20 > I considered that for a moment too but it's uglier than current code > and doesn't achieve what you want, because the command line has no > provision for triggering attachment. A major problem with qdev I see > now is that the creation and attachment of a device are one event > instead of two, which is the case for pcmcia. So your patch tries to > merge these two events. What is the point of allowing the existence of unattached pcmcia devices? I think there was similar discussion about usb to allow attach detach without delete, but IIRC that was finally rejected as there is no real benefit in avoiding full creation/destruction. Keep in mind that there may be a day where we finally obsolete support for non-qdev (or whatever it's name will be then) devices. Every device needs to be discoverable for QEMU in a generic way, e.g. to decide if there are devices attached that do not support save/restore or to explore its state. Rejecting a qdev conversion looks a bit strange from that perspective. Jan --------------enig9D988CD0EE12C9067140CECC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk3SCyMACgkQitSsb3rl5xTiOgCgg5l3npJig4lLLFvxlUCg8GbJ 9vYAoJ34OqGIq7+CwSN4/0o/WYz1h/Ag =fB45 -----END PGP SIGNATURE----- --------------enig9D988CD0EE12C9067140CECC--