* [PATCH] Build fix for kvm/ia64 userspace.
@ 2008-05-05 5:12 Zhang, Xiantao
2008-05-06 14:41 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Xiantao @ 2008-05-05 5:12 UTC (permalink / raw)
To: kvm-ia64-devel, kvm-devel; +Cc: Avi Kivity
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
Hi, Avi
This patch should go into RC1, otherwise it will block kvm/ia64
userspace build.
Xiantao
>From 55584a9ecdfbea61ab90014c9cc14c5a22b696dd Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Mon, 5 May 2008 12:49:35 +0800
Subject: [PATCH] KVM: KVM/ia64: built fix for kvm userspace.
kvm.h is shared by userspace and kernel, and it needs to
include different headers in two cases.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
include/asm-ia64/kvm.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h
index eb2d355..62b5fad 100644
--- a/include/asm-ia64/kvm.h
+++ b/include/asm-ia64/kvm.h
@@ -22,7 +22,12 @@
*/
#include <asm/types.h>
+
+#ifdef __KERNEL__
#include <asm/fpu.h>
+#else
+#include <signal.h>
+#endif
#include <linux/ioctl.h>
--
1.5.2
[-- Attachment #2: 0001-KVM-KVM-ia64-built-fix-for-kvm-userspace.patch --]
[-- Type: application/octet-stream, Size: 779 bytes --]
From 55584a9ecdfbea61ab90014c9cc14c5a22b696dd Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Mon, 5 May 2008 12:49:35 +0800
Subject: [PATCH] KVM: KVM/ia64: built fix for kvm userspace.
kvm.h is shared by userspace and kernel, and it needs to
include different headers in two cases.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
include/asm-ia64/kvm.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h
index eb2d355..62b5fad 100644
--- a/include/asm-ia64/kvm.h
+++ b/include/asm-ia64/kvm.h
@@ -22,7 +22,12 @@
*/
#include <asm/types.h>
+
+#ifdef __KERNEL__
#include <asm/fpu.h>
+#else
+#include <signal.h>
+#endif
#include <linux/ioctl.h>
--
1.5.2
[-- Attachment #3: Type: text/plain, Size: 320 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
[-- Attachment #4: Type: text/plain, Size: 158 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Build fix for kvm/ia64 userspace.
2008-05-05 5:12 [PATCH] Build fix for kvm/ia64 userspace Zhang, Xiantao
@ 2008-05-06 14:41 ` Avi Kivity
2008-05-07 6:23 ` Zhang, Xiantao
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2008-05-06 14:41 UTC (permalink / raw)
To: Zhang, Xiantao; +Cc: kvm-devel, kvm-ia64-devel
Zhang, Xiantao wrote:
> Hi, Avi
> This patch should go into RC1, otherwise it will block kvm/ia64
> userspace build.
>
> diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h
> index eb2d355..62b5fad 100644
> --- a/include/asm-ia64/kvm.h
> +++ b/include/asm-ia64/kvm.h
> @@ -22,7 +22,12 @@
> */
>
> #include <asm/types.h>
> +
> +#ifdef __KERNEL__
> #include <asm/fpu.h>
> +#else
> +#include <signal.h>
> +#endif
>
Fishy. A kernel header including a userspace header?
Maybe you need to include <linux/signal.h> unconditionally?
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Build fix for kvm/ia64 userspace.
2008-05-06 14:41 ` Avi Kivity
@ 2008-05-07 6:23 ` Zhang, Xiantao
2008-05-07 8:00 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Xiantao @ 2008-05-07 6:23 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel, kvm-ia64-devel
Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Hi, Avi
>> This patch should go into RC1, otherwise it will block kvm/ia64
>> userspace build.
>>
>> diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h index
>> eb2d355..62b5fad 100644 --- a/include/asm-ia64/kvm.h
>> +++ b/include/asm-ia64/kvm.h
>> @@ -22,7 +22,12 @@
>> */
>>
>> #include <asm/types.h>
>> +
>> +#ifdef __KERNEL__
>> #include <asm/fpu.h>
>> +#else
>> +#include <signal.h>
>> +#endif
>>
>
> Fishy. A kernel header including a userspace header?
>
> Maybe you need to include <linux/signal.h> unconditionally?
Hi, Avi
You know, kvm.h is shared by userspace and kernel. But
unfortunately, the usersapce header files have redefinition for one
strucutre (structure ia64_fpreg) {One in asm/fpu.h and the other one in
bits/sigcontext}, maybe a bug here.
Therefore, if userspace code includes fpu.h and sigcontext.h in
one source file, it will complain the redefinition. Do you have good
idea to cope with this issue ?
Xiantao
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Build fix for kvm/ia64 userspace.
2008-05-07 6:23 ` Zhang, Xiantao
@ 2008-05-07 8:00 ` Avi Kivity
2008-05-07 10:30 ` Zhang, Xiantao
0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2008-05-07 8:00 UTC (permalink / raw)
To: Zhang, Xiantao; +Cc: kvm-devel, Tony Luck, kvm-ia64-devel
Zhang, Xiantao wrote:
>>> #include <asm/types.h>
>>> +
>>> +#ifdef __KERNEL__
>>> #include <asm/fpu.h>
>>> +#else
>>> +#include <signal.h>
>>> +#endif
>>>
>>>
>> Fishy. A kernel header including a userspace header?
>>
>> Maybe you need to include <linux/signal.h> unconditionally?
>>
> Hi, Avi
> You know, kvm.h is shared by userspace and kernel. But
> unfortunately, the usersapce header files have redefinition for one
> strucutre (structure ia64_fpreg) {One in asm/fpu.h and the other one in
> bits/sigcontext}, maybe a bug here.
> Therefore, if userspace code includes fpu.h and sigcontext.h in
> one source file, it will complain the redefinition. Do you have good
> idea to cope with this issue ?
One way would be to define a new kvm_ia64_fpreg and use that. Seems
that the standard ia64_fpreg is unusable in userspace due to the issue
you mentioned.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] Build fix for kvm/ia64 userspace.
2008-05-07 8:00 ` Avi Kivity
@ 2008-05-07 10:30 ` Zhang, Xiantao
2008-05-07 11:07 ` Avi Kivity
0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Xiantao @ 2008-05-07 10:30 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel, Luck, Tony, kvm-ia64-devel
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
> One way would be to define a new kvm_ia64_fpreg and use that. Seems
> that the standard ia64_fpreg is unusable in userspace due to the issue
> you mentioned.
Better way. Attached the patch.
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Wed, 7 May 2008 17:37:32 +0800
Subject: [PATCH] KVM: kvm/ia64 : Using self-defined kvm_fpreg strucutre
to replace
kernel's ia64_fpreg for avoiding conflicts with userspace headers.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
include/asm-ia64/kvm.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h
index eb2d355..a1da4c4 100644
--- a/include/asm-ia64/kvm.h
+++ b/include/asm-ia64/kvm.h
@@ -22,7 +22,6 @@
*/
#include <asm/types.h>
-#include <asm/fpu.h>
#include <linux/ioctl.h>
@@ -61,6 +60,13 @@ struct kvm_ioapic_state {
#define KVM_CONTEXT_SIZE 8*1024
+struct kvm_fpreg {
+ union {
+ unsigned long bits[2];
+ long double __dummy; /* force 16-byte alignment */
+ } u;
+};
+
union context {
/* 8K size */
char dummy[KVM_CONTEXT_SIZE];
@@ -77,7 +83,7 @@ union context {
unsigned long ibr[8];
unsigned long dbr[8];
unsigned long pkr[8];
- struct ia64_fpreg fr[128];
+ struct kvm_fpreg fr[128];
};
};
--
1.5.2
[-- Attachment #2: 0002-KVM-kvm-ia64-Using-self-defined-kvm_fpreg-strucut.patch --]
[-- Type: application/octet-stream, Size: 1189 bytes --]
From d03191b934072b12be29ecaaf1cb68b359d51c71 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Wed, 7 May 2008 17:37:32 +0800
Subject: [PATCH] KVM: kvm/ia64 : Using self-defined kvm_fpreg strucutre to replace
kernel's ia64_fpreg for avoiding conflicts with userspace headers.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
include/asm-ia64/kvm.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/include/asm-ia64/kvm.h b/include/asm-ia64/kvm.h
index eb2d355..a1da4c4 100644
--- a/include/asm-ia64/kvm.h
+++ b/include/asm-ia64/kvm.h
@@ -22,7 +22,6 @@
*/
#include <asm/types.h>
-#include <asm/fpu.h>
#include <linux/ioctl.h>
@@ -61,6 +60,13 @@ struct kvm_ioapic_state {
#define KVM_CONTEXT_SIZE 8*1024
+struct kvm_fpreg {
+ union {
+ unsigned long bits[2];
+ long double __dummy; /* force 16-byte alignment */
+ } u;
+};
+
union context {
/* 8K size */
char dummy[KVM_CONTEXT_SIZE];
@@ -77,7 +83,7 @@ union context {
unsigned long ibr[8];
unsigned long dbr[8];
unsigned long pkr[8];
- struct ia64_fpreg fr[128];
+ struct kvm_fpreg fr[128];
};
};
--
1.5.2
[-- Attachment #3: Type: text/plain, Size: 320 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
[-- Attachment #4: Type: text/plain, Size: 158 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] Build fix for kvm/ia64 userspace.
2008-05-07 10:30 ` Zhang, Xiantao
@ 2008-05-07 11:07 ` Avi Kivity
0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2008-05-07 11:07 UTC (permalink / raw)
To: Zhang, Xiantao; +Cc: kvm-devel, Luck, Tony, kvm-ia64-devel
Zhang, Xiantao wrote:
> From: Xiantao Zhang <xiantao.zhang@intel.com>
> Date: Wed, 7 May 2008 17:37:32 +0800
> Subject: [PATCH] KVM: kvm/ia64 : Using self-defined kvm_fpreg strucutre
> to replace
> kernel's ia64_fpreg for avoiding conflicts with userspace headers.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-07 11:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05 5:12 [PATCH] Build fix for kvm/ia64 userspace Zhang, Xiantao
2008-05-06 14:41 ` Avi Kivity
2008-05-07 6:23 ` Zhang, Xiantao
2008-05-07 8:00 ` Avi Kivity
2008-05-07 10:30 ` Zhang, Xiantao
2008-05-07 11:07 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox