Received: from eggs.gnu.org ([2001:4830:134:3::10]:52786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biJEn-0006vY-JX for qemu-devel@nongnu.org; Fri, 09 Sep 2016 06:40:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biJEk-0008GL-5W for qemu-devel@nongnu.org; Fri, 09 Sep 2016 06:40:49 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biJEj-0008G3-SQ for qemu-devel@nongnu.org; Fri, 09 Sep 2016 06:40:46 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u89Ac4CQ096399 for ; Fri, 9 Sep 2016 06:40:45 -0400 Received: from e06smtp09.uk.ibm.com (e06smtp09.uk.ibm.com [195.75.94.105]) by mx0a-001b2d01.pphosted.com with ESMTP id 25bc2t4018-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 09 Sep 2016 06:40:44 -0400 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Sep 2016 11:40:42 +0100 Date: Fri, 9 Sep 2016 12:40:38 +0200 From: Cornelia Huck In-Reply-To: <1473416072-7063-3-git-send-email-maxime.coquelin@redhat.com> References: <1473416072-7063-1-git-send-email-maxime.coquelin@redhat.com> <1473416072-7063-3-git-send-email-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160909124038.10fb8181.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Maxime Coquelin Cc: mst@redhat.com, qemu-devel@nongnu.org, marcel@redhat.com, vkaplans@redhat.com, qemu-stable@nongnu.org On Fri, 9 Sep 2016 12:14:32 +0200 Maxime Coquelin wrote: > This patch makes pci devices plugging more robust, by not confusing > guest with modern interface when the backend doesn't support > VIRTIO_F_VERSION_1. > > Cc: Marcel Apfelbaum > Cc: Michael S. Tsirkin > Cc: qemu-stable@nongnu.org > Signed-off-by: Maxime Coquelin > --- > hw/virtio/virtio-pci.c | 15 +++++++++++++++ > hw/virtio/virtio-pci.h | 5 +++++ > 2 files changed, 20 insertions(+) Note that 11380b361 ("virtio: handle non-virtio-1-capable backend for ccw") fixes this issue for ccw via the introduction of a ->post_plugged() callback. Unfortunately, we did not find a good way to make it work for pci back then. Two comments: - ->post_plugged() handles the dependencies (as noticed for your first patch) - and this is due to it being called after the plugging is already done. - I don't really like pci and ccw being too different. We have probably more flexibility with the handling for ccw, so I could probably convert ccw to the same mechanism that pci uses. Maybe there are other uses for ->post_plugged()?