From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLSMH-0001LK-H8 for qemu-devel@nongnu.org; Wed, 11 Feb 2015 03:09:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLSME-0005Ne-7W for qemu-devel@nongnu.org; Wed, 11 Feb 2015 03:09:17 -0500 Received: from mga11.intel.com ([192.55.52.93]:5924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLSME-0005Mi-3G for qemu-devel@nongnu.org; Wed, 11 Feb 2015 03:09:14 -0500 Message-ID: <54DB0E16.9010809@intel.com> Date: Wed, 11 Feb 2015 16:08:54 +0800 From: "Chen, Tiejun" MIME-Version: 1.0 References: <1423511512-29208-1-git-send-email-mst@redhat.com> <54DAB20F.6020604@intel.com> <54DAC381.1080400@intel.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 , Alexander Graf , QEMU Developers , Stefan Hajnoczi , "Michael S. Tsirkin" On 2015/2/11 11:46, 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. I guess this mean this patch should be extended to smooth something in include/hw/virtio* in some ways. > > Personally I think that option 1 is more reliable and overall Agreed. > less effort, since automatiing the fixups is hard and virtio > doesn't change very much. > So sounds my original patch is fine to you. Thanks Tiejun