Received: from eggs.gnu.org ([2001:4830:134:3::10]:44448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQBm9-0004To-Vn for qemu-devel@nongnu.org; Thu, 21 Jul 2016 07:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQBm4-00015G-Tr for qemu-devel@nongnu.org; Thu, 21 Jul 2016 07:04:20 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34486 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQBm4-00014H-Ov for qemu-devel@nongnu.org; Thu, 21 Jul 2016 07:04:16 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6LAx2CC137141 for ; Thu, 21 Jul 2016 07:04:14 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 24aeh539fd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 21 Jul 2016 07:04:13 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 21 Jul 2016 12:04:10 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id C2DEA2190023 for ; Thu, 21 Jul 2016 12:03:20 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u6LB3rv160227764 for ; Thu, 21 Jul 2016 11:03:53 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u6LA3t5S024722 for ; Thu, 21 Jul 2016 04:03:55 -0600 Date: Thu, 21 Jul 2016 13:03:49 +0200 From: Cornelia Huck In-Reply-To: <5790952B.1090506@redhat.com> References: <1469028501-23780-1-git-send-email-marcel@redhat.com> <20160721105421.4dfe9669.cornelia.huck@de.ibm.com> <5790952B.1090506@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160721130349.2ad620e3.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH V3] hw/virtio-pci: fix virtio behaviour List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: qemu-devel@nongnu.org, mst@redhat.com, kraxel@redhat.com On Thu, 21 Jul 2016 12:26:03 +0300 Marcel Apfelbaum wrote: > On 07/21/2016 11:54 AM, Cornelia Huck wrote: > > On Wed, 20 Jul 2016 18:28:21 +0300 > > Marcel Apfelbaum wrote: > > > >> Enable transitional virtio devices by default. > >> Enable virtio-1.0 for devices plugged into > >> PCIe ports (Root ports or Downstream ports). > > > > Hi Cornelia, > Thank you for the review. > > > Add "by default", as this can still be overridden? > > > > Yes, using -device virtio*,disable-modern=x,disable-legacy=y > are respected as before. > > > >> > >> Using the virtio-1 mode will remove the limitation > > > > s/Using the virtio-1 mode/Disabling the legacy mode/ > > > > ? > > > > Well, the way I see it virtio-1 'pure' is not using the IO BAR. > This is why virtio-1 == disable-modern=off && disable-legacy=on IMHO. IMV: transitional = legacy + modern and therefore modern = transitional - legacy (with modern and virtio-1 the same for pci). I think taking legacy away from transitional is clearer. > > If you or Michael see this differently I have nothing against re-wording it. Let's see what Michael prefers. > > >> of the number of devices that can be attached to a machine > >> by removing the need for the IO BAR. > >> > >> Signed-off-by: Marcel Apfelbaum > > > > (...) > > > >> +static inline bool virtio_pci_modern(VirtIOPCIProxy *proxy) > >> +{ > >> + return !proxy->disable_modern; > >> +} > >> + > >> +static inline bool virtio_pci_legacy(VirtIOPCIProxy *proxy) > >> +{ > >> + return proxy->disable_legacy == ON_OFF_AUTO_OFF; > >> +} > >> + > >> +static inline void virtio_pci_force_virtio_1(VirtIOPCIProxy *proxy) > > > > One thing I still find a bit confusing is that you refer to 'modern' > > above, but force to 'virtio_1' here... but that's a minor thing. > > > > I went for 'virtio-1' because of the existing comments (force virtio-1) > and also because 'modern' does not imply "no legacy" - those are independent flags. Hm, for my view see above. > > BTW, instead of the 'disable*' properties (which I find hard to follow) I would go for one > property : "mode" with "legacy"/"transitional"/"virtio-1"/"auto" values. > But is too late for that (at least for 2.7). It would need some compat handling as well. If you really want to go with such a 'mode' property, I'd prefer 'modern' over 'virtio-1': 'modern' is a virtio-pci concept, while 'virtio-1' is transport-agnostic. But it's all just words in the end :) Regardless what you end up with, feel free to add my Reviewed-by: Cornelia Huck