Received: from eggs.gnu.org ([2001:4830:134:3::10]:46489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjWAx-0006yx-U1 for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:41:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjWAt-00038v-5R for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:41:49 -0400 References: <1473495817-29952-1-git-send-email-maxime.coquelin@redhat.com> From: Eric Blake Message-ID: Date: Mon, 12 Sep 2016 13:41:40 -0500 MIME-Version: 1.0 In-Reply-To: <1473495817-29952-1-git-send-email-maxime.coquelin@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ao900uURjcFa79hHD5qJjeCdnDFjGlaQU" Subject: Re: [Qemu-devel] [PATCH] virtio-bus: Plug devices after features are negotiated List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Maxime Coquelin , mst@redhat.com, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com Cc: marcel@redhat.com, vkaplans@redhat.com, qemu-stable@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ao900uURjcFa79hHD5qJjeCdnDFjGlaQU From: Eric Blake To: Maxime Coquelin , mst@redhat.com, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com Cc: marcel@redhat.com, vkaplans@redhat.com, qemu-stable@nongnu.org Message-ID: Subject: Re: [Qemu-devel] [PATCH] virtio-bus: Plug devices after features are negotiated References: <1473495817-29952-1-git-send-email-maxime.coquelin@redhat.com> In-Reply-To: <1473495817-29952-1-git-send-email-maxime.coquelin@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/10/2016 03:23 AM, Maxime Coquelin wrote: > Currently, devices are plugged before features are negotiated. > If the backend doesn't support VIRTIO_F_VERSION_1, the transport > need to rewind some settings. >=20 > This is the case for CCW, for which a post_plugged callback had > been introduced, where max_rev field is just updated if > VIRTIO_F_VERSION_1 is not supported by the backend. > For PCI, implementing the post_plugged would be much more > complicated, so it needs to know whether the backend supports > VIRTIO_F_VERSION_1 at plug time. >=20 > Currently, nothing is done for PCI. Modern capabilitities get s/capabilitities/capabilities/ > exposed to the guest even if VIRTIO_F_VERSION_1 is not supported > by the backend, which confuses the guest. >=20 > This patch proposes to replace existing post_plugged solution > with an approach that fits with both transports. > Features negociation is performed before ->device_plugged() call. s/negociation/negotiation/ > A pre_plugged callback is introduced so that the transports can > set their supported features. >=20 > Cc: Cornelia Huck > Cc: Marcel Apfelbaum > Cc: qemu-stable@nongnu.org > Acked-by: Michael S. Tsirkin > Signed-off-by: Maxime Coquelin > --- --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ao900uURjcFa79hHD5qJjeCdnDFjGlaQU 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX1vbkAAoJEKeha0olJ0Nq+/8H+wYTstcnwWvrn1jpsnNaQ1eY c0lF29CkqzSRI/LjMG/rAMlbffYpj8t/rithS7Si1mGnJZs3LS9607lOGNjIB7bp RgcVbRnGIIysnjqpiy1U5akengGJ/i5ik+bXgCERNqBGASNHA9EFxtPcT/vJVyRR 9ZXOnQtOTsIm6SR6VvEP7rJcQfk2Y4B/bGszSWhzl6AoBDDJZ15EETzAeZjfRyhZ EJBwQTRfhVKxkZoA5FiiiTyMlpfZngFMBwoWlzLfQeb2lKn7EUgknaptOPFHiitm wqjJFlTD6fP8Ngh9esMjqKycHPHNqO2wyRGdw2NKsPWqLoHoVI20kyKNcj8R2qY= =a+BT -----END PGP SIGNATURE----- --ao900uURjcFa79hHD5qJjeCdnDFjGlaQU--