From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzKAf-0003wM-Vo for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:30:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzKAf-0005ro-4T for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:30:05 -0400 Date: Mon, 1 Jun 2015 09:29:55 +0200 From: "Michael S. Tsirkin" Message-ID: <20150601092825-mutt-send-email-mst@redhat.com> References: <1432885880-9847-1-git-send-email-kraxel@redhat.com> <20150529165138-mutt-send-email-mst@redhat.com> <1433143408.19671.17.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433143408.19671.17.camel@nilsson.home.kraxel.org> Subject: Re: [Qemu-devel] [PATCH v2] virtio: make features 64bit wide List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Kevin Wolf , "open list:virtio-blk" , qemu-devel@nongnu.org, Amit Shah , "Aneesh Kumar K.V" , Stefan Hajnoczi , Cornelia Huck , Paolo Bonzini On Mon, Jun 01, 2015 at 09:23:28AM +0200, Gerd Hoffmann wrote: > On Fr, 2015-05-29 at 16:53 +0200, Michael S. Tsirkin wrote: > > On Fri, May 29, 2015 at 09:51:20AM +0200, Gerd Hoffmann wrote: > > > Make features 64bit wide everywhere. Exception: command line flags > > > remain 32bit and are copyed into the lower 32 host_features at > > > initialization time. > > > > > > On migration a full 64bit guest_features field is sent if one of the > > > high bits is set, additionally to the lower 32bit guest_features field > > > which must stay for compatibility reasons. That way we send the lower > > > 32 feature bits twice, but that way the code is simpler because we don't > > > have to split and compose the 64bit features into two 32bit fields. > > > > > > This depends on "move host_features" patch by cornelia. > > > > > > Signed-off-by: Gerd Hoffmann > > > > > > Thanks, this is very close to what I had in mind. > > Question: why do we need the feature_flags field? > > What's wrong with setting bits in host_features directly? > > DEFINE_PROP_BIT works on uint32_t. > > Alternative approach would be to introduce a DEFINE_PROP_BIT64 and use > that for DEFINE_VIRTIO_COMMON_FEATURES. > > cheers, > Gerd > Yes - previous versions of this patch did exactly that. Can you do DEFINE_PROP_BIT64 please? We'll need DEFINE_PROP_BIT64 down the road anyway when we add properties > 32. If you prefer, I'm fine with this being a patch on top. Let me know. -- MST