From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPo26-0001f0-5z for qemu-devel@nongnu.org; Wed, 20 Jul 2016 05:43:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPo22-00011r-1k for qemu-devel@nongnu.org; Wed, 20 Jul 2016 05:43:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPo21-00011h-SM for qemu-devel@nongnu.org; Wed, 20 Jul 2016 05:43:09 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 1E400C05AA46 for ; Wed, 20 Jul 2016 09:43:09 +0000 (UTC) Message-ID: <1469007786.3363.56.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 20 Jul 2016 11:43:06 +0200 In-Reply-To: <578F3DD8.8050804@redhat.com> References: <1468953778-15295-1-git-send-email-marcel@redhat.com> <20160720013838-mutt-send-email-mst@kernel.org> <1469004067.3363.34.camel@redhat.com> <578F3DD8.8050804@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH V2] hw/virtio-pci: fix virtio behaviour on modern (PCIe) machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: "Michael S. Tsirkin" , qemu-devel@nongnu.org Hi, > >> I guess we could just set VIRTIO_PCI_FLAG_DISABLE_LEGACY, avoid cleari= ng it. > > > > I think we should simply drop the flags and use bool variables instead. > > >=20 > You mean OnOffAuto new fields, right? > We would need a wrapper since "auto" mode is not an actual value. > But is doable, of course. I was thinking about new variables, set to true for "on", false for "off", and whatever we want do by default for "auto". But moving that evaluation to small wrapper functions and just call them when needed (which shouldn't be that often) instead of storing the evaluation result in variables is fine too. cheers, Gerd