* Broken userspace module Makefile
@ 2008-10-09 13:48 Sheng Yang
2008-10-10 1:47 ` Zhang, Xiantao
2008-10-19 9:25 ` Avi Kivity
0 siblings, 2 replies; 6+ messages in thread
From: Sheng Yang @ 2008-10-09 13:48 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
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.
How do you think...
--
regards
Yang,Sheng
--
From: Sheng Yang <sheng@linux.intel.com>
Date: Thu, 9 Oct 2008 20:45:02 +0800
Subject: [PATCH 1/1] kvm: Fix broken Makefile of kernel module
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
kernel/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
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); \
--
1.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: Broken userspace module Makefile
2008-10-09 13:48 Broken userspace module Makefile Sheng Yang
@ 2008-10-10 1:47 ` Zhang, Xiantao
2008-10-10 1:56 ` Sheng Yang
2008-10-19 9:25 ` Avi Kivity
1 sibling, 1 reply; 6+ messages in thread
From: Zhang, Xiantao @ 2008-10-10 1:47 UTC (permalink / raw)
To: Sheng Yang, Avi Kivity; +Cc: kvm
CONFIG_X86 is defined to compile every qemu's objects, so even if
unifdef doesn't work, we shouldn't meet the problems related to this
header file. Maybe other pential issues casues the problem you met.
Anyway we had better enable unifdef to work in its right way. :)
BTW, seems unifdef can't handle the case like #if defined(CONFIG_X86) ||
defined(CONFIG_IA64) from the manual, who can clarify it ?
Thanks
Xiantao
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.
>
> How do you think...
> --
> regards
> Yang,Sheng
>
> --
> From: Sheng Yang <sheng@linux.intel.com>
> Date: Thu, 9 Oct 2008 20:45:02 +0800
> Subject: [PATCH 1/1] kvm: Fix broken Makefile of kernel module
>
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> ---
> kernel/Makefile | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> 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); \
> --
> 1.5.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Broken userspace module Makefile
2008-10-10 1:47 ` Zhang, Xiantao
@ 2008-10-10 1:56 ` Sheng Yang
2008-10-10 2:03 ` Zhang, Xiantao
0 siblings, 1 reply; 6+ messages in thread
From: Sheng Yang @ 2008-10-10 1:56 UTC (permalink / raw)
To: kvm; +Cc: Zhang, Xiantao, Sheng Yang, Avi Kivity
On Friday 10 October 2008 09:47:15 Zhang, Xiantao wrote:
> CONFIG_X86 is defined to compile every qemu's objects, so even if
> unifdef doesn't work, we shouldn't meet the problems related to this
> header file. Maybe other pential issues casues the problem you met.
> Anyway we had better enable unifdef to work in its right way. :)
> BTW, seems unifdef can't handle the case like #if defined(CONFIG_X86) ||
> defined(CONFIG_IA64) from the manual, who can clarify it ?
Yeah, CONFIG_X86 is for qemu. But kernel/ is not a part of qemu code, and
can't be cover by qemu/config-host.mak...
regards
Yang, Sheng
> Thanks
> Xiantao
>
> 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.
> >
> > How do you think...
> > --
> > regards
> > Yang,Sheng
> >
> > --
> > From: Sheng Yang <sheng@linux.intel.com>
> > Date: Thu, 9 Oct 2008 20:45:02 +0800
> > Subject: [PATCH 1/1] kvm: Fix broken Makefile of kernel module
> >
> >
> > Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> > ---
> > kernel/Makefile | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > 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); \
> > --
> > 1.5.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Broken userspace module Makefile
2008-10-10 1:56 ` Sheng Yang
@ 2008-10-10 2:03 ` Zhang, Xiantao
0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Xiantao @ 2008-10-10 2:03 UTC (permalink / raw)
To: Sheng Yang, kvm; +Cc: Sheng Yang, Avi Kivity
The following patch should solve the issue you met before unifdef gets
work again.
diff --git a/libkvm/config-i386.mak b/libkvm/config-i386.mak
index 2706b70..3579985 100644
--- a/libkvm/config-i386.mak
+++ b/libkvm/config-i386.mak
@@ -1,6 +1,6 @@
LIBDIR := /lib
CFLAGS += -m32
-CFLAGS += -D__i386__
+CFLAGS += -D__i386__ -DCONFIG_X86
libkvm-$(ARCH)-objs := libkvm-x86.o
diff --git a/libkvm/config-x86_64.mak b/libkvm/config-x86_64.mak
index e638977..9d02eb0 100644
--- a/libkvm/config-x86_64.mak
+++ b/libkvm/config-x86_64.mak
@@ -1,6 +1,6 @@
LIBDIR := /lib64
CFLAGS += -m64
-CFLAGS += -D__x86_64__
+CFLAGS += -D__x86_64__ -DCONFIG_X86
libkvm-$(ARCH)-objs := libkvm-x86.o
>
> Yeah, CONFIG_X86 is for qemu. But kernel/ is not a part of qemu code,
> and can't be cover by qemu/config-host.mak...
No, when you use ./configure in userspace, it will generate a qemu_cflag
which includes -DCONFIG_X86 for compiling qemu's objects. So when
compile qemu's objects, CONFIG_X86 is defined for every targets! :)
Xiantao
> regards
> Yang, Sheng
>> Thanks
>> Xiantao
>>
>> 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.
>>>
>>> How do you think...
>>> --
>>> regards
>>> Yang,Sheng
>>>
>>> --
>>> From: Sheng Yang <sheng@linux.intel.com>
>>> Date: Thu, 9 Oct 2008 20:45:02 +0800
>>> Subject: [PATCH 1/1] kvm: Fix broken Makefile of kernel module
>>>
>>>
>>> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
>>> ---
>>> kernel/Makefile | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> 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); \
>>> --
>>> 1.5.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Broken userspace module Makefile
2008-10-09 13:48 Broken userspace module Makefile Sheng Yang
2008-10-10 1:47 ` Zhang, Xiantao
@ 2008-10-19 9:25 ` Avi Kivity
2008-10-20 7:52 ` Sheng Yang
1 sibling, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2008-10-19 9:25 UTC (permalink / raw)
To: Avi Kivity, kvm
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?
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Broken userspace module Makefile
2008-10-19 9:25 ` Avi Kivity
@ 2008-10-20 7:52 ` Sheng Yang
0 siblings, 0 replies; 6+ messages in thread
From: Sheng Yang @ 2008-10-20 7:52 UTC (permalink / raw)
To: kvm; +Cc: Avi Kivity
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-20 7:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 13:48 Broken userspace module Makefile Sheng Yang
2008-10-10 1:47 ` Zhang, Xiantao
2008-10-10 1:56 ` Sheng Yang
2008-10-10 2:03 ` Zhang, Xiantao
2008-10-19 9:25 ` Avi Kivity
2008-10-20 7:52 ` Sheng Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox