From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLWPD-0001co-Iu for qemu-devel@nongnu.org; Wed, 11 Feb 2015 07:28:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLWP7-000269-17 for qemu-devel@nongnu.org; Wed, 11 Feb 2015 07:28:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLWP6-00025k-Qo for qemu-devel@nongnu.org; Wed, 11 Feb 2015 07:28:28 -0500 Date: Wed, 11 Feb 2015 13:28:18 +0100 From: "Michael S. Tsirkin" Message-ID: <20150211122818.GB4623@redhat.com> References: <1423511512-29208-1-git-send-email-mst@redhat.com> <54DAB20F.6020604@intel.com> <54DAC381.1080400@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH RFC] scripts/update-linux-headers.sh: pull virtio hdrs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Cornelia Huck , "Chen, Tiejun" , QEMU Developers , Stefan Hajnoczi , Alexander Graf On Wed, Feb 11, 2015 at 03:46:20AM +0000, Peter Maydell wrote: > On 11 February 2015 at 02:50, Chen, Tiejun wrote: > > On 2015/2/11 10:03, Peter Maydell wrote: > >> The linux-headers/ directory contains header files which can only > >> validly be included if the host we're compiling on is Linux. Some > >> of them will cause compile failures on OSX or Windows if they > >> are in the include path. The idea of this patch is that the > >> standard-headers/ directory has "sanitized" header files which > >> have had the linux-specific types and includes stripped out. > >> So if we take the route this patch proposes we do need two > >> directories. > >> > > > > This confounds me since for instance, one of goals based on this patch is, > > it exposes those Virtio devices ID definition to hw/virtio, instead of my > > original patch, right? So without this sort of standard-hearders, how can we > > compile virtio? Or you mean we still keep those original stuff in > > include/hw/virtio*, but somehow update them once we execute that script > > manually. > > I'm confused about why you're confused. We have two basic > approaches we can take: > > (1) What we do at the moment. There are headers defining the virtio > interface in include/hw/virtio, and these are basically manually > created and updated as necessary. > > (2) What this patch is proposing. The headers defining virtio are > automatically copied into standard-headers/ and fixed up to make > them work with QEMU on all the hosts we support. This happens when > this script is run by a developer to update QEMU's headers based > on some new upstream kernel. > > Personally I think that option 1 is more reliable and overall > less effort, since automatiing the fixups is hard and virtio > doesn't change very much. > > -- PMM It picked up speed recently, so it's too much effort I think. My script seems to have automated fixups - didn't seem hard. -- MST