From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D0EDC5686 for ; Mon, 10 Oct 2016 01:20:25 +0200 (CEST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB802A0B5F; Sun, 9 Oct 2016 23:20:24 +0000 (UTC) Received: from redhat.com (vpn-53-157.rdu2.redhat.com [10.10.53.157]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id u99NKNci016160; Sun, 9 Oct 2016 19:20:23 -0400 Date: Mon, 10 Oct 2016 02:20:22 +0300 From: "Michael S. Tsirkin" To: Yuanhan Liu Cc: Stephen Hemminger , Maxime Coquelin , dev@dpdk.org, qemu-devel@nongnu.org Message-ID: <20161010014900-mutt-send-email-mst@kernel.org> References: <1474872056-24665-1-git-send-email-yuanhan.liu@linux.intel.com> <1474872056-24665-2-git-send-email-yuanhan.liu@linux.intel.com> <20160926221112-mutt-send-email-mst@kernel.org> <20160927031158.GA25823@yliu-dev.sh.intel.com> <20160927224935-mutt-send-email-mst@kernel.org> <20160928022848.GE1597@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160928022848.GE1597@yliu-dev.sh.intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sun, 09 Oct 2016 23:20:25 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 1/2] vhost: enable any layout feature X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 23:20:26 -0000 On Wed, Sep 28, 2016 at 10:28:48AM +0800, Yuanhan Liu wrote: > On Tue, Sep 27, 2016 at 10:56:40PM +0300, Michael S. Tsirkin wrote: > > On Tue, Sep 27, 2016 at 11:11:58AM +0800, Yuanhan Liu wrote: > > > On Mon, Sep 26, 2016 at 10:24:55PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Sep 26, 2016 at 11:01:58AM -0700, Stephen Hemminger wrote: > > > > > I assume that if using Version 1 that the bit will be ignored > > > > > > Yes, but I will just quote what you just said: what if the guest > > > virtio device is a legacy device? I also gave my reasons in another > > > email why I consistently set this flag: > > > > > > - we have to return all features we support to the guest. > > > > > > We don't know the guest is a modern or legacy device. That means > > > we should claim we support both: VERSION_1 and ANY_LAYOUT. > > > > > > Assume guest is a legacy device and we just set VERSION_1 (the current > > > case), ANY_LAYOUT will never be negotiated. > > > > > > - I'm following the way Linux kernel takes: it also set both features. > > > > > > Maybe, we could unset ANY_LAYOUT when VERSION_1 is _negotiated_? > > > > > > The unset after negotiation I proposed turned out it won't work: the > > > feature is already negotiated; unsetting it only in vhost side doesn't > > > change anything. Besides, it may break the migration as Michael stated > > > below. > > > > I think the reverse. Teach vhost user that for future machine types > > only VERSION_1 implies ANY_LAYOUT. So I guess at this point, we can teach vhost-user in qemu that version 1 implies any_layout but only for machine types qemu 2.8 and up. It sets a bad precedent but oh well. -- MST