From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: Re: Broken userspace module Makefile Date: Mon, 20 Oct 2008 15:52:10 +0800 Message-ID: <200810201552.10962.sheng@linux.intel.com> References: <20081009134839.GA10960@yukikaze> <48FAFD17.9000302@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Avi Kivity To: kvm@vger.kernel.org Return-path: Received: from mga10.intel.com ([192.55.52.92]:12689 "EHLO fmsmga102.fm.intel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751011AbYJTHxp (ORCPT ); Mon, 20 Oct 2008 03:53:45 -0400 In-Reply-To: <48FAFD17.9000302@redhat.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Sunday 19 October 2008 17:25:43 Avi Kivity wrote: > Sheng Yang wrote: > > Hi, Avi > > > > After Xiantao's irq_common patches were checked in, we found that it's > > impossible to compile with VT-d userspace now. Essentially the problem is > > Makefile missed a $ since unifdef patch checked in half an years ago... > > > > But after I fix it, I found it's still impossible to get unifdef run > > correctly... > > > > First, unifdef report error when processing include/linux/kvm.h, but I > > can't find out what's wrong now. > > > > Second, seems at least my unifdef can't deal with > > > > #if defined(CONFIG_X86) || defined(CONFIG_IA64) > > > > My unifdef version is 1.0(20030701), the latest from debian testing. I > > also tried one for fc9, same result. > > My unifdef manual says it can handle #if and defined(), but only if it > knows about the defines. Can you try adding -UCONFIG_IA64? > > > diff --git a/kernel/Makefile b/kernel/Makefile > > index f2a71fa..e352f77 100644 > > --- a/kernel/Makefile > > +++ b/kernel/Makefile > > @@ -65,7 +65,7 @@ header-sync: > > "$(LINUX)"/arch/$(ARCH_DIR)/include/asm/./kvm*.h \ > > $T/include/asm-$(ARCH_DIR)/ > > > > - set -e && for i in $(find $T -name '*.h'); do \ > > + set -e && for i in $$(find $T -name '*.h'); do \ > > $(call unifdef,$$i); done > > $(call hack, include/linux/kvm.h) > > set -e && for i in $$(find $T -type f -printf '%P '); \ > > @@ -79,7 +79,7 @@ source-sync: > > "$(LINUX)"/virt/kvm/./*.[cSh] \ > > $T/ > > > > - set -e && for i in $(find $T -name '*.c'); do \ > > + set -e && for i in $$(find $T -name '*.c'); do \ > > $(call unifdef,$$i); done > > > > for i in $(hack-files); \ > > Looks good, is this safe to apply given the current brokenness? Yes, add -UCONFIG_IA64 make things fine. And I found the reason of exit is: "EXIT STATUS The unifdef utility exits 0 if the output is an exact copy of the input, 1 if not, and 2 if in trouble." So, set -e is wrong too... I will patch it later. -- regards Yang, Sheng