From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzK4S-0000Ev-5q for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:23:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzK4R-0003Dn-29 for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:23:40 -0400 Message-ID: <1433143408.19671.17.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Mon, 01 Jun 2015 09:23:28 +0200 In-Reply-To: <20150529165138-mutt-send-email-mst@redhat.com> References: <1432885880-9847-1-git-send-email-kraxel@redhat.com> <20150529165138-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] virtio: make features 64bit wide List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Kevin Wolf , "open list:virtio-blk" , qemu-devel@nongnu.org, Amit Shah , "Aneesh Kumar K.V" , Stefan Hajnoczi , Cornelia Huck , Paolo Bonzini 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