From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54601 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEQ4D-0001BT-0d for qemu-devel@nongnu.org; Tue, 18 May 2010 12:54:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEQ49-0002U7-UZ for qemu-devel@nongnu.org; Tue, 18 May 2010 12:54:52 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:59372) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEQ49-0002TP-AO for qemu-devel@nongnu.org; Tue, 18 May 2010 12:54:49 -0400 Message-ID: <4BF2C64D.9030603@web.de> Date: Tue, 18 May 2010 18:54:37 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <913f4f6a67305a72ed3d994bd12d5b34de9b9bb9.1273843151.git.jan.kiszka@siemens.com> <4BF288BC.40409@redhat.com> In-Reply-To: <4BF288BC.40409@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7EBEF4823821E74BF99F6D2D" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 1/8] qdev: Allow device addressing via 'driver.instance' List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Anthony Liguori , Juan Quintela , Markus Armbruster , qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7EBEF4823821E74BF99F6D2D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gerd Hoffmann wrote: > On 05/18/10 14:15, Markus Armbruster wrote: >> Jan Kiszka writes: >> >>> Extend qbus_find_dev to allow addressing of devices without an unique= id >>> via an optional instance number. The new formats are 'driver.instance= ' >>> and 'alias.instance'. >>> >>> Signed-off-by: Jan Kiszka >> >> How's the instance number defined? Should be documented. OK, will do. For now it is the per-bus instance ID. I think that makes most sense and is easily handleable. Still, we should probably print it also via "info qtree" (and a future "query-qtree"). >=20 > savevm instance id, used to identify multiple instances of some device > on loadvm. By default is just incrementing (0,1,2,...) for each new > device instance I think. Drivers can also specify one. Most don't do > that. IIRC some ISA drivers use the base ioport as instance id, which > sort-of makes sense as it makes sure the id identifies the correct > device no matter what the initialization order is. That io-address-based instance numbers have just been deprecated, see 4d2ffa08b601bdd40d9ccf225480c0a7e90ca078. ISA devices are already converted, there are just a few non-PC devices remaining that don't use the (auto-generated) vmstate instance number. But that is actually a different, user-invisible numbering scheme. >=20 > It probably makes sense to replace the instance id with the device path= > once all devices are converted over to qdev+vmstate, so we avoid the > nasty ordering issues altogether. You are always free to address devices via a unique user-defined ID. Jan --------------enig7EBEF4823821E74BF99F6D2D 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.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkvyxlUACgkQitSsb3rl5xRr+wCffYMg+2h6nN0m4Pd8wJu2UHk6 mnsAn304xf/VNy+TQCgpdP6sFtTgb30h =ECV8 -----END PGP SIGNATURE----- --------------enig7EBEF4823821E74BF99F6D2D--