From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biQmq-0001ZJ-NV for qemu-devel@nongnu.org; Fri, 09 Sep 2016 14:44:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biQmm-0005N4-Kz for qemu-devel@nongnu.org; Fri, 09 Sep 2016 14:44:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biQmm-0005Mz-F5 for qemu-devel@nongnu.org; Fri, 09 Sep 2016 14:44:24 -0400 Date: Fri, 9 Sep 2016 21:44:22 +0300 From: "Michael S. Tsirkin" Message-ID: <20160909214356-mutt-send-email-mst@kernel.org> References: <20160909134913.2d9f1f04.cornelia.huck@de.ibm.com> <1473430499-11581-1-git-send-email-maxime.coquelin@redhat.com> <20160909183927-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Maxime Coquelin Cc: qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, marcel@redhat.com, vkaplans@redhat.com On Fri, Sep 09, 2016 at 06:16:27PM +0200, Maxime Coquelin wrote: > > > On 09/09/2016 05:39 PM, Michael S. Tsirkin wrote: > > On Fri, Sep 09, 2016 at 04:14:59PM +0200, 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. > > > > > > > > This is the case for both PCI and CCW. > > > > For CCW, 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 the current fix consists in checking whether > > > > the backend supports VIRTIO_F_VERSION_1 in the backend. > > > > > > > > This patch propose to replace existing solutions with a common > > > > approach by negociating features before ->device_plugged() is > > > > called. A pre_plugged callback is introduced so that the > > > > transports can set their supported features. > > > > > > > > Cc: Cornelia Huck > > > > Cc: Marcel Apfelbaum > > > > Cc: Michael S. Tsirkin > > > > Signed-off-by: Maxime Coquelin > > > > Acked-by: Michael S. Tsirkin > > > > Looks good - can you pls test and post a non-RFC? > > > > Do you mean having this also in stable, or keeping > it based on top of former pci-only patch? > > I already tested it for PCI, but cannot test it for CCW. > > Thanks, > Maxime Once you repost, ask for help testing. -- MST