From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLNO6-0007KI-2U for qemu-devel@nongnu.org; Tue, 10 Feb 2015 21:50:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLNO2-0007Yf-Rz for qemu-devel@nongnu.org; Tue, 10 Feb 2015 21:50:50 -0500 Received: from mga09.intel.com ([134.134.136.24]:19349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLNO2-0007YL-LH for qemu-devel@nongnu.org; Tue, 10 Feb 2015 21:50:46 -0500 Message-ID: <54DAC381.1080400@intel.com> Date: Wed, 11 Feb 2015 10:50:41 +0800 From: "Chen, Tiejun" MIME-Version: 1.0 References: <1423511512-29208-1-git-send-email-mst@redhat.com> <54DAB20F.6020604@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 10:03, Peter Maydell wrote: > On 11 February 2015 at 01:36, Chen, Tiejun wrote: >> On 2015/2/10 3:56, Michael S. Tsirkin wrote: >>> >>> It doesn't make sense to copy values manually: >>> the only issue with getting headers from linux >>> seems to be dealing with linux/types, we >>> can easily fix that automatically while importing. >>> >>> Signed-off-by: Michael S. Tsirkin >>> --- >>> >>> FYI this is what I propose instead of the recently >>> suggested >>> virtio: uniform virtio device IDs >>> we can then rework existing code to include these headers. >>> >>> Will automatically bring in goodies as they arrive in linux. >>> >>> This doesn't yet import virtio ccw header, >>> that won't be hard to add later. >>> >>> scripts/update-linux-headers.sh | 10 ++++++++++ >>> 1 file changed, 10 insertions(+) >>> >>> diff --git a/scripts/update-linux-headers.sh >>> b/scripts/update-linux-headers.sh >>> index c8e026d..0bd8437 100755 >>> --- a/scripts/update-linux-headers.sh >>> +++ b/scripts/update-linux-headers.sh >>> @@ -76,4 +76,14 @@ else >>> cp "$linux/COPYING" "$output/linux-headers" >>> fi >>> >>> +rm -rf "$output/standard-headers/linux" >>> +mkdir -p "$output/standard-headers/linux" >> >> >> Shouldn't we add something in configure file to execute this automatically? > > No. We want to run this script only when we're updating the > header files, which only happens when we have a valid > kernel source tree available and you're a developer doing > it as a specific action. configure is run by everybody and > should definitely not be doing header updates. > >> Or instead of creating 'standard-headers/, why can't we go that existing >> linux-headers/? > > 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. Thanks Tiejun