From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8tEw-0006hg-8v for qemu-devel@nongnu.org; Wed, 07 Jan 2015 11:13:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8tEr-00009Z-LW for qemu-devel@nongnu.org; Wed, 07 Jan 2015 11:13:46 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:39029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8tEr-00006w-BJ for qemu-devel@nongnu.org; Wed, 07 Jan 2015 11:13:41 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Jan 2015 16:13:40 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id BD38717D8066 for ; Wed, 7 Jan 2015 16:14:11 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t07GDaIg63045836 for ; Wed, 7 Jan 2015 16:13:36 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t07GDZKw002920 for ; Wed, 7 Jan 2015 09:13:36 -0700 Date: Wed, 7 Jan 2015 17:13:32 +0100 From: Cornelia Huck Message-ID: <20150107171332.597d428c.cornelia.huck@de.ibm.com> In-Reply-To: <20141230122537.GA17903@redhat.com> References: <1418304322-7546-1-git-send-email-cornelia.huck@de.ibm.com> <1418304322-7546-14-git-send-email-cornelia.huck@de.ibm.com> <20141230122537.GA17903@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC v6 13/20] virtio: allow to fail setting status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: thuth@linux.vnet.ibm.com, rusty@rustcorp.com.au, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org On Tue, 30 Dec 2014 14:25:37 +0200 "Michael S. Tsirkin" wrote: > On Thu, Dec 11, 2014 at 02:25:15PM +0100, Cornelia Huck wrote: > > virtio-1 allow setting of the FEATURES_OK status bit to fail if > > the negotiated feature bits are inconsistent: let's fail > > virtio_set_status() in that case and update virtio-ccw to post an > > error to the guest. > > > > Signed-off-by: Cornelia Huck > > Right but a separate validate_features call is awkward. > How about we defer virtio_set_features until FEATURES_OK, > and teach virtio_set_features that it can fail? Hm. But we would need to keep virtio_set_features() where it is called now for legacy devices, as they will never see FEATURES_OK, right? So we need to make this depending on revisions (or whatever the equivalent is for pci/mmio), as we cannot check for VERSION_1. Not sure whether this makes the code easier to follow.