All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc
@ 2008-09-16  8:48 ` ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc, kvm; +Cc: hollisb, ehrhardt

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

Updating and testing kvm-userspace for ppc after a too long time brought up
some issues fixed in this series.

The patches are small and their description should be comprehendible. Due to
the fact that most of the issues where build time issues I also started to
discuss about/establish some kind of automated build test for us that should
allow us to find such things faster.
let me know if qumranet has such a process for x86 already and I should help
you to include ppc.

[patches in series]
[PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
[PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

---
[diffstat]
 Makefile                       |    3 ++-
 kernel/powerpc/Makefile.pre    |    1 +
 kernel/powerpc/hack-module.awk |    5 +++++
 libkvm/libkvm-powerpc.c        |   14 +++++---------
 qemu/Makefile.target           |    2 +-
 qemu/configure                 |   13 +++++++------
 6 files changed, 21 insertions(+), 17 deletions(-)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc
@ 2008-09-16  8:48 ` ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc, kvm; +Cc: hollisb, ehrhardt

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

Updating and testing kvm-userspace for ppc after a too long time brought up
some issues fixed in this series.

The patches are small and their description should be comprehendible. Due to
the fact that most of the issues where build time issues I also started to
discuss about/establish some kind of automated build test for us that should
allow us to find such things faster.
let me know if qumranet has such a process for x86 already and I should help
you to include ppc.

[patches in series]
[PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
[PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

---
[diffstat]
 Makefile                       |    3 ++-
 kernel/powerpc/Makefile.pre    |    1 +
 kernel/powerpc/hack-module.awk |    5 +++++
 libkvm/libkvm-powerpc.c        |   14 +++++---------
 qemu/Makefile.target           |    2 +-
 qemu/configure                 |   13 +++++++------
 6 files changed, 21 insertions(+), 17 deletions(-)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
       [not found] ` <1221554914-29751-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  1 sibling, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

It came up in the review of the s390 libkvm code that we have some
broken headers too.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 libkvm-powerpc.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

[diff]
diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c
--- a/libkvm/libkvm-powerpc.c
+++ b/libkvm/libkvm-powerpc.c
@@ -1,10 +1,7 @@
 /*
- * This header is for functions & variables that will ONLY be
- * used inside libkvm for x86.
- * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
- * WITHIN LIBKVM.
- *
- * derived from libkvm.c
+ * This file contains the powerpc specific implementation for the 
+ * architecture dependent functions defined in kvm-common.h and
+ * libkvm.h
  *
  * Copyright (C) 2006 Qumranet, Inc.
  *
@@ -12,11 +9,10 @@
  *      Avi Kivity   <avi@qumranet.com>
  *      Yaniv Kamay  <yaniv@qumranet.com>
  *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
+ * Copyright IBM Corp. 2007,2008
+ * Added by:
  * 	Jerone Young <jyoung5@us.ibm.com>
  * 	Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
- *
  *
  * This work is licensed under the GNU LGPL license, version 2.
  */

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
@ 2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8 @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

It came up in the review of the s390 libkvm code that we have some
broken headers too.

Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---

[diffstat]
 libkvm-powerpc.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

[diff]
diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c
--- a/libkvm/libkvm-powerpc.c
+++ b/libkvm/libkvm-powerpc.c
@@ -1,10 +1,7 @@
 /*
- * This header is for functions & variables that will ONLY be
- * used inside libkvm for x86.
- * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
- * WITHIN LIBKVM.
- *
- * derived from libkvm.c
+ * This file contains the powerpc specific implementation for the 
+ * architecture dependent functions defined in kvm-common.h and
+ * libkvm.h
  *
  * Copyright (C) 2006 Qumranet, Inc.
  *
@@ -12,11 +9,10 @@
  *      Avi Kivity   <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  *      Yaniv Kamay  <yaniv-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
+ * Copyright IBM Corp. 2007,2008
+ * Added by:
  * 	Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  * 	Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
- *
  *
  * This work is licensed under the GNU LGPL license, version 2.
  */
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
       [not found] ` <1221554914-29751-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  1 sibling, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

The kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

I tried to change that detection so that it works with&without cross
compilation with only a small change and especially without an addtional
configure command line switch. Including the bits/wordsize.h header a platform
usually can check its wordsize and by doing that configure can check the
hostlongbits without executing the binary. Instead it now stops after
preprocessing stage which resolved the __WORDSIZE constant and retrieves
that value.

I don't like that check style, but it is at least less broken than before.
Comments and other approaches welcome.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 configure |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

[diff]

diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -685,14 +685,15 @@
 # ppc specific hostlongbits selection
 if test "$cpu" = "powerpc" ; then
     cat > $TMPC <<EOF
-int main(void){return sizeof(long);}
+#include <bits/wordsize.h>
+__WORDSIZE
 EOF
 
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
-        $TMPE
-        case $? in
-            4) hostlongbits="32";;
-            8) hostlongbits="64";;
+    if $cc $ARCH_CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
+        wordsize=`tail -n 1 ${TMPE}.E`
+        case $wordsize in
+            32) hostlongbits="32";;
+            64) hostlongbits="64";;
             *) echo "Couldn't determine bits per long value"; exit 1;;
         esac
     else

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
@ 2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8 @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

The kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

I tried to change that detection so that it works with&without cross
compilation with only a small change and especially without an addtional
configure command line switch. Including the bits/wordsize.h header a platform
usually can check its wordsize and by doing that configure can check the
hostlongbits without executing the binary. Instead it now stops after
preprocessing stage which resolved the __WORDSIZE constant and retrieves
that value.

I don't like that check style, but it is at least less broken than before.
Comments and other approaches welcome.

Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---

[diffstat]
 configure |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

[diff]

diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -685,14 +685,15 @@
 # ppc specific hostlongbits selection
 if test "$cpu" = "powerpc" ; then
     cat > $TMPC <<EOF
-int main(void){return sizeof(long);}
+#include <bits/wordsize.h>
+__WORDSIZE
 EOF
 
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
-        $TMPE
-        case $? in
-            4) hostlongbits="32";;
-            8) hostlongbits="64";;
+    if $cc $ARCH_CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
+        wordsize=`tail -n 1 ${TMPE}.E`
+        case $wordsize in
+            32) hostlongbits="32";;
+            64) hostlongbits="64";;
             *) echo "Couldn't determine bits per long value"; exit 1;;
         esac
     else
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] kvm-userspace: kvmppc: fix building userspace for powerpc
  2008-09-16  8:48 ` ehrhardt
@ 2008-09-16  8:48   ` ehrhardt
  -1 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc, kvm; +Cc: hollisb, ehrhardt

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

Commit 2d5737d8 added the requirement for an $arch/Makefile.pre in the
kernel subdirectory. This patch adds a stub for powerpc.
Additionally now a file kernel/$arch/hack-module.awk is needed and a simple
version for ppc is added for that one too.
In the root Makefile ia64 patch 030253bf added ia64 with a comma which should
break both architectures because filter works without. The patch removes that
comma.
The commit 76ff90aa fixed the dependency to DEPLIBS, but the definition of the
libfdt dependency lacks the right path (../libfdt/).

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 Makefile                       |    2 +-
 kernel/powerpc/Makefile.pre    |    1 +
 kernel/powerpc/hack-module.awk |    5 +++++
 qemu/Makefile.target           |    2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

[diff]

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@
 ifneq '$(filter $(ARCH), i386 x86_64)' ''
     qemu: extboot
 endif
-ifneq '$(filter $(ARCH), powerpc, ia64)' ''
+ifneq '$(filter $(ARCH), powerpc ia64)' ''
     qemu: libfdt
 endif
 user: libkvm
diff --git a/kernel/powerpc/Makefile.pre b/kernel/powerpc/Makefile.pre
new file mode 100644
--- /dev/null
+++ b/kernel/powerpc/Makefile.pre
@@ -0,0 +1,1 @@
+prerequisite:
diff --git a/kernel/powerpc/hack-module.awk b/kernel/powerpc/hack-module.awk
new file mode 100644
--- /dev/null
+++ b/kernel/powerpc/hack-module.awk
@@ -0,0 +1,5 @@
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{ print }
diff --git a/qemu/Makefile.target b/qemu/Makefile.target
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -579,7 +579,7 @@
 
 ifdef CONFIG_LIBFDT
 LIBS += -lfdt
-DEPLIBS += libfdt.a
+DEPLIBS += ../libfdt/libfdt.a
 endif
 
 # SCSI layer

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] kvm-userspace: kvmppc: fix building userspace for powerpc
@ 2008-09-16  8:48   ` ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-16  8:48 UTC (permalink / raw)
  To: kvm-ppc, kvm; +Cc: hollisb, ehrhardt

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

Commit 2d5737d8 added the requirement for an $arch/Makefile.pre in the
kernel subdirectory. This patch adds a stub for powerpc.
Additionally now a file kernel/$arch/hack-module.awk is needed and a simple
version for ppc is added for that one too.
In the root Makefile ia64 patch 030253bf added ia64 with a comma which should
break both architectures because filter works without. The patch removes that
comma.
The commit 76ff90aa fixed the dependency to DEPLIBS, but the definition of the
libfdt dependency lacks the right path (../libfdt/).

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 Makefile                       |    2 +-
 kernel/powerpc/Makefile.pre    |    1 +
 kernel/powerpc/hack-module.awk |    5 +++++
 qemu/Makefile.target           |    2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

[diff]

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@
 ifneq '$(filter $(ARCH), i386 x86_64)' ''
     qemu: extboot
 endif
-ifneq '$(filter $(ARCH), powerpc, ia64)' ''
+ifneq '$(filter $(ARCH), powerpc ia64)' ''
     qemu: libfdt
 endif
 user: libkvm
diff --git a/kernel/powerpc/Makefile.pre b/kernel/powerpc/Makefile.pre
new file mode 100644
--- /dev/null
+++ b/kernel/powerpc/Makefile.pre
@@ -0,0 +1,1 @@
+prerequisite:
diff --git a/kernel/powerpc/hack-module.awk b/kernel/powerpc/hack-module.awk
new file mode 100644
--- /dev/null
+++ b/kernel/powerpc/hack-module.awk
@@ -0,0 +1,5 @@
+/MODULE_AUTHOR/ {
+    printf("MODULE_INFO(version, \"%s\");\n", version)
+}
+
+{ print }
diff --git a/qemu/Makefile.target b/qemu/Makefile.target
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -579,7 +579,7 @@
 
 ifdef CONFIG_LIBFDT
 LIBS += -lfdt
-DEPLIBS += libfdt.a
+DEPLIBS += ../libfdt/libfdt.a
 endif
 
 # SCSI layer

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c v2
@ 2008-09-30  6:36       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-30  6:36 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	avi-atKUWr5tajBWk0Htik3J/w
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

It came up in the review of the s390 libkvm code that we have some
broken headers too.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 libkvm-powerpc.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

[diff]
diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c
--- a/libkvm/libkvm-powerpc.c
+++ b/libkvm/libkvm-powerpc.c
@@ -1,10 +1,7 @@
 /*
- * This header is for functions & variables that will ONLY be
- * used inside libkvm for x86.
- * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
- * WITHIN LIBKVM.
- *
- * derived from libkvm.c
+ * This file contains the powerpc specific implementation for the 
+ * architecture dependent functions defined in kvm-common.h and
+ * libkvm.h
  *
  * Copyright (C) 2006 Qumranet, Inc.
  *
@@ -12,11 +9,10 @@
  *      Avi Kivity   <avi@qumranet.com>
  *      Yaniv Kamay  <yaniv@qumranet.com>
  *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
+ * Copyright IBM Corp. 2007,2008
+ * Authors:
  * 	Jerone Young <jyoung5@us.ibm.com>
  * 	Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
- *
  *
  * This work is licensed under the GNU LGPL license, version 2.
  */

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2
@ 2008-09-30  6:36   ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-30  6:36 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	avi-atKUWr5tajBWk0Htik3J/w, qemu-devel-qX2TKyscuCcdnm+yROfE0A
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

*update
Short after resending v1 I realized that I forgot to put Avi and
qemu-devel@nongnu.org (for 2/3) on cc. I also updated the header text in 1/3 a
bit and verified my hostlongbits proposal on recent cross toolchain versions
because there was a question about that.

Updating and testing kvm-userspace for ppc after a too long time brought up
some issues fixed in this series.

The patches are small and their description should be comprehendible. Due to
the fact that most of the issues where build time issues I also started to
discuss about/establish some kind of automated build test for us that should
allow us to find such things faster.
Let me know if qumranet has such a process for x86 already and I should help
you to include powerpc.

[patches in series]
[PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
[PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

---
[diffstat]
 Makefile                       |    3 ++-
 kernel/powerpc/Makefile.pre    |    1 +
 kernel/powerpc/hack-module.awk |    5 +++++
 libkvm/libkvm-powerpc.c        |   14 +++++---------
 qemu/Makefile.target           |    2 +-
 qemu/configure                 |   13 +++++++------
 6 files changed, 21 insertions(+), 17 deletions(-)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2
@ 2008-09-30  6:36   ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8 @ 2008-09-30  6:36 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	avi-atKUWr5tajBWk0Htik3J/w, qemu-devel-qX2TKyscuCcdnm+yROfE0A
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

*update
Short after resending v1 I realized that I forgot to put Avi and
qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org (for 2/3) on cc. I also updated the header text in 1/3 a
bit and verified my hostlongbits proposal on recent cross toolchain versions
because there was a question about that.

Updating and testing kvm-userspace for ppc after a too long time brought up
some issues fixed in this series.

The patches are small and their description should be comprehendible. Due to
the fact that most of the issues where build time issues I also started to
discuss about/establish some kind of automated build test for us that should
allow us to find such things faster.
Let me know if qumranet has such a process for x86 already and I should help
you to include powerpc.

[patches in series]
[PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
[PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
[PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

---
[diffstat]
 Makefile                       |    3 ++-
 kernel/powerpc/Makefile.pre    |    1 +
 kernel/powerpc/hack-module.awk |    5 +++++
 libkvm/libkvm-powerpc.c        |   14 +++++---------
 qemu/Makefile.target           |    2 +-
 qemu/configure                 |   13 +++++++------
 6 files changed, 21 insertions(+), 17 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c v2
@ 2008-09-30  6:36       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8 @ 2008-09-30  6:36 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	avi-atKUWr5tajBWk0Htik3J/w
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

It came up in the review of the s390 libkvm code that we have some
broken headers too.

Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---

[diffstat]
 libkvm-powerpc.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

[diff]
diff --git a/libkvm/libkvm-powerpc.c b/libkvm/libkvm-powerpc.c
--- a/libkvm/libkvm-powerpc.c
+++ b/libkvm/libkvm-powerpc.c
@@ -1,10 +1,7 @@
 /*
- * This header is for functions & variables that will ONLY be
- * used inside libkvm for x86.
- * THESE ARE NOT EXPOSED TO THE USER AND ARE ONLY FOR USE
- * WITHIN LIBKVM.
- *
- * derived from libkvm.c
+ * This file contains the powerpc specific implementation for the 
+ * architecture dependent functions defined in kvm-common.h and
+ * libkvm.h
  *
  * Copyright (C) 2006 Qumranet, Inc.
  *
@@ -12,11 +9,10 @@
  *      Avi Kivity   <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  *      Yaniv Kamay  <yaniv-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  *
- * Copyright 2007 IBM Corporation.
- * Added by & Authors:
+ * Copyright IBM Corp. 2007,2008
+ * Authors:
  * 	Jerone Young <jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  * 	Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
- *
  *
  * This work is licensed under the GNU LGPL license, version 2.
  */
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
@ 2008-09-30  6:36       ` ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-30  6:36 UTC (permalink / raw)
  To: kvm-ppc, kvm, avi, qemu-devel; +Cc: hollisb, ehrhardt

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

A recent kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

I tried to change that detection so that it works with&without cross
compilation with only a small change and especially without an addtional
configure command line switch. Including the bits/wordsize.h header a platform
usually can check its wordsize and by doing that configure can check the
hostlongbits without executing the binary. Instead it now stops after
preprocessing stage which resolved the __WORDSIZE constant and retrieves
that value.

I don't like my new check style, but it is at least less broken than before.
Another approach that was suggested was that qemu might end up needing
something like asm-offsets in the kernel to manage architecture sizes etc.
Comments and other approaches welcome.
 
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 configure |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

[diff]

diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -685,14 +685,15 @@
 # ppc specific hostlongbits selection
 if test "$cpu" = "powerpc" ; then
     cat > $TMPC <<EOF
-int main(void){return sizeof(long);}
+#include <bits/wordsize.h>
+__WORDSIZE
 EOF
 
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
-        $TMPE
-        case $? in
-            4) hostlongbits="32";;
-            8) hostlongbits="64";;
+    if $cc $ARCH_CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
+        wordsize=`tail -n 1 ${TMPE}.E`
+        case $wordsize in
+            32) hostlongbits="32";;
+            64) hostlongbits="64";;
             *) echo "Couldn't determine bits per long value"; exit 1;;
         esac
     else

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
@ 2008-09-30  6:36       ` ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-30  6:36 UTC (permalink / raw)
  To: kvm-ppc, kvm, avi, qemu-devel; +Cc: hollisb, ehrhardt

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

A recent kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

I tried to change that detection so that it works with&without cross
compilation with only a small change and especially without an addtional
configure command line switch. Including the bits/wordsize.h header a platform
usually can check its wordsize and by doing that configure can check the
hostlongbits without executing the binary. Instead it now stops after
preprocessing stage which resolved the __WORDSIZE constant and retrieves
that value.

I don't like my new check style, but it is at least less broken than before.
Another approach that was suggested was that qemu might end up needing
something like asm-offsets in the kernel to manage architecture sizes etc.
Comments and other approaches welcome.
 
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 configure |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

[diff]

diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -685,14 +685,15 @@
 # ppc specific hostlongbits selection
 if test "$cpu" = "powerpc" ; then
     cat > $TMPC <<EOF
-int main(void){return sizeof(long);}
+#include <bits/wordsize.h>
+__WORDSIZE
 EOF
 
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
-        $TMPE
-        case $? in
-            4) hostlongbits="32";;
-            8) hostlongbits="64";;
+    if $cc $ARCH_CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
+        wordsize=`tail -n 1 ${TMPE}.E`
+        case $wordsize in
+            32) hostlongbits="32";;
+            64) hostlongbits="64";;
             *) echo "Couldn't determine bits per long value"; exit 1;;
         esac
     else

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2
@ 2008-09-30  9:10       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt @ 2008-09-30  9:10 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	avi-atKUWr5tajBWk0Htik3J/w, qemu-devel-qX2TKyscuCcdnm+yROfE0A
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

*update*
further debugging according to some requests revealed that ARCH_CFLAGS does
not contain all CFLAGS that might be needed, especially those supplied via
extra-cflags. Therefore people supplying things via extra-cflags instead of an
environment variable might have had issues.

A recent kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

I tried to change that detection so that it works with&without cross
compilation with only a small change and especially without an addtional
configure command line switch. Including the bits/wordsize.h header a platform
usually can check its wordsize and by doing that configure can check the
hostlongbits without executing the binary. Instead it now stops after
preprocessing stage which resolved the __WORDSIZE constant and retrieves
that value.

I don't like my new check style, but it is at least less broken than before.
Another approach that was suggested was that qemu might end up needing
something like asm-offsets in the kernel to manage architecture sizes etc.
Comments and other approaches welcome.
 
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
---

[diffstat]
 configure |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

[diff]

diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -685,14 +685,15 @@
 # ppc specific hostlongbits selection
 if test "$cpu" = "powerpc" ; then
     cat > $TMPC <<EOF
-int main(void){return sizeof(long);}
+#include <bits/wordsize.h>
+__WORDSIZE
 EOF
 
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
-        $TMPE
-        case $? in
-            4) hostlongbits="32";;
-            8) hostlongbits="64";;
+    if $cc $ARCH_CFLAGS $CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
+        wordsize=`tail -n 1 ${TMPE}.E`
+        case $wordsize in
+            32) hostlongbits="32";;
+            64) hostlongbits="64";;
             *) echo "Couldn't determine bits per long value"; exit 1;;
         esac
     else

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2
@ 2008-09-30  9:10       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  0 siblings, 0 replies; 28+ messages in thread
From: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8 @ 2008-09-30  9:10 UTC (permalink / raw)
  To: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	avi-atKUWr5tajBWk0Htik3J/w, qemu-devel-qX2TKyscuCcdnm+yROfE0A
  Cc: hollisb-r/Jw6+rmf7HQT0dZR+AlfA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

*update*
further debugging according to some requests revealed that ARCH_CFLAGS does
not contain all CFLAGS that might be needed, especially those supplied via
extra-cflags. Therefore people supplying things via extra-cflags instead of an
environment variable might have had issues.

A recent kvm merge with qemu brought code for 64bit power that broke cross
compilation. The issue is caused by configure trying to execute target
architecture binaries where configure is executed.

I tried to change that detection so that it works with&without cross
compilation with only a small change and especially without an addtional
configure command line switch. Including the bits/wordsize.h header a platform
usually can check its wordsize and by doing that configure can check the
hostlongbits without executing the binary. Instead it now stops after
preprocessing stage which resolved the __WORDSIZE constant and retrieves
that value.

I don't like my new check style, but it is at least less broken than before.
Another approach that was suggested was that qemu might end up needing
something like asm-offsets in the kernel to manage architecture sizes etc.
Comments and other approaches welcome.
 
Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---

[diffstat]
 configure |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

[diff]

diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -685,14 +685,15 @@
 # ppc specific hostlongbits selection
 if test "$cpu" = "powerpc" ; then
     cat > $TMPC <<EOF
-int main(void){return sizeof(long);}
+#include <bits/wordsize.h>
+__WORDSIZE
 EOF
 
-    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
-        $TMPE
-        case $? in
-            4) hostlongbits="32";;
-            8) hostlongbits="64";;
+    if $cc $ARCH_CFLAGS $CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
+        wordsize=`tail -n 1 ${TMPE}.E`
+        case $wordsize in
+            32) hostlongbits="32";;
+            64) hostlongbits="64";;
             *) echo "Couldn't determine bits per long value"; exit 1;;
         esac
     else
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection
  2008-09-30  9:10       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
@ 2008-09-30 14:13         ` Hollis Blanchard
  -1 siblings, 0 replies; 28+ messages in thread
From: Hollis Blanchard @ 2008-09-30 14:13 UTC (permalink / raw)
  To: ehrhardt; +Cc: kvm-ppc, kvm, avi, qemu-devel

On Tue, 2008-09-30 at 11:10 +0200, ehrhardt@linux.vnet.ibm.com wrote:
> diff --git a/qemu/configure b/qemu/configure
> --- a/qemu/configure
> +++ b/qemu/configure
> @@ -685,14 +685,15 @@
>  # ppc specific hostlongbits selection
>  if test "$cpu" = "powerpc" ; then
>      cat > $TMPC <<EOF
> -int main(void){return sizeof(long);}
> +#include <bits/wordsize.h>
> +__WORDSIZE
>  EOF
> 
> -    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
> -        $TMPE
> -        case $? in
> -            4) hostlongbits="32";;
> -            8) hostlongbits="64";;
> +    if $cc $ARCH_CFLAGS $CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
> +        wordsize=`tail -n 1 ${TMPE}.E`
> +        case $wordsize in
> +            32) hostlongbits="32";;
> +            64) hostlongbits="64";;
>              *) echo "Couldn't determine bits per long value"; exit 1;;
>          esac
>      else

Yeah, trying to execute target-specific code is simply incompatible with
cross-compiling, so clearly this needs to be changed.

<bits/wordsize.h> might be too Linux-specific, not sure. Also, I worry
about the preprocessor being allowed to insert all the whitespace it
wants, so I'm not sure if you can assume that __WORDSIZE will be on the
last output line.

Instead you could use this:
	$cc -E -dM - < /dev/null | grep __powerpc64__

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2
@ 2008-09-30 14:13         ` Hollis Blanchard
  0 siblings, 0 replies; 28+ messages in thread
From: Hollis Blanchard @ 2008-09-30 14:13 UTC (permalink / raw)
  To: ehrhardt; +Cc: kvm-ppc, kvm, avi, qemu-devel

On Tue, 2008-09-30 at 11:10 +0200, ehrhardt@linux.vnet.ibm.com wrote:
> diff --git a/qemu/configure b/qemu/configure
> --- a/qemu/configure
> +++ b/qemu/configure
> @@ -685,14 +685,15 @@
>  # ppc specific hostlongbits selection
>  if test "$cpu" = "powerpc" ; then
>      cat > $TMPC <<EOF
> -int main(void){return sizeof(long);}
> +#include <bits/wordsize.h>
> +__WORDSIZE
>  EOF
> 
> -    if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null; then
> -        $TMPE
> -        case $? in
> -            4) hostlongbits="32";;
> -            8) hostlongbits="64";;
> +    if $cc $ARCH_CFLAGS $CFLAGS -E -o $TMPE.E $TMPC 2> /dev/null; then
> +        wordsize=`tail -n 1 ${TMPE}.E`
> +        case $wordsize in
> +            32) hostlongbits="32";;
> +            64) hostlongbits="64";;
>              *) echo "Couldn't determine bits per long value"; exit 1;;
>          esac
>      else

Yeah, trying to execute target-specific code is simply incompatible with
cross-compiling, so clearly this needs to be changed.

<bits/wordsize.h> might be too Linux-specific, not sure. Also, I worry
about the preprocessor being allowed to insert all the whitespace it
wants, so I'm not sure if you can assume that __WORDSIZE will be on the
last output line.

Instead you could use this:
	$cc -E -dM - < /dev/null | grep __powerpc64__

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2
  2008-09-30  6:36   ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
@ 2008-09-30 14:19     ` Hollis Blanchard
  -1 siblings, 0 replies; 28+ messages in thread
From: Hollis Blanchard @ 2008-09-30 14:19 UTC (permalink / raw)
  To: avi; +Cc: kvm-ppc, kvm, qemu-devel, Christian Ehrhardt

On Tue, 2008-09-30 at 08:36 +0200, ehrhardt@linux.vnet.ibm.com wrote:
> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> 
> *update
> Short after resending v1 I realized that I forgot to put Avi and
> qemu-devel@nongnu.org (for 2/3) on cc. I also updated the header text in 1/3 a
> bit and verified my hostlongbits proposal on recent cross toolchain versions
> because there was a question about that.
> 
> Updating and testing kvm-userspace for ppc after a too long time brought up
> some issues fixed in this series.
> 
> The patches are small and their description should be comprehendible. Due to
> the fact that most of the issues where build time issues I also started to
> discuss about/establish some kind of automated build test for us that should
> allow us to find such things faster.
> Let me know if qumranet has such a process for x86 already and I should help
> you to include powerpc.
> 
> [patches in series]
> [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
> [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
> [PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

Acked-by: Hollis Blanchard <hollisb@us.ibm.com>

Avi, assuming agreement from qemu folks on patch #2, please apply these.
Thanks.

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2
@ 2008-09-30 14:19     ` Hollis Blanchard
  0 siblings, 0 replies; 28+ messages in thread
From: Hollis Blanchard @ 2008-09-30 14:19 UTC (permalink / raw)
  To: avi; +Cc: kvm-ppc, kvm, qemu-devel, Christian Ehrhardt

On Tue, 2008-09-30 at 08:36 +0200, ehrhardt@linux.vnet.ibm.com wrote:
> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> 
> *update
> Short after resending v1 I realized that I forgot to put Avi and
> qemu-devel@nongnu.org (for 2/3) on cc. I also updated the header text in 1/3 a
> bit and verified my hostlongbits proposal on recent cross toolchain versions
> because there was a question about that.
> 
> Updating and testing kvm-userspace for ppc after a too long time brought up
> some issues fixed in this series.
> 
> The patches are small and their description should be comprehendible. Due to
> the fact that most of the issues where build time issues I also started to
> discuss about/establish some kind of automated build test for us that should
> allow us to find such things faster.
> Let me know if qumranet has such a process for x86 already and I should help
> you to include powerpc.
> 
> [patches in series]
> [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
> [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
> [PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc

Acked-by: Hollis Blanchard <hollisb@us.ibm.com>

Avi, assuming agreement from qemu folks on patch #2, please apply these.
Thanks.

-- 
Hollis Blanchard
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits
  2008-09-30  9:10       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
@ 2008-09-30 19:38         ` malc
  -1 siblings, 0 replies; 28+ messages in thread
From: malc @ 2008-09-30 19:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: ehrhardt, avi, kvm, kvm-ppc, hollisb

On Tue, 30 Sep 2008, ehrhardt@linux.vnet.ibm.com wrote:

> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
>
> *update*
> further debugging according to some requests revealed that ARCH_CFLAGS does
> not contain all CFLAGS that might be needed, especially those supplied via
> extra-cflags. Therefore people supplying things via extra-cflags instead of an
> environment variable might have had issues.

This part i don't get, there are few more checks before/after 
hostlongbits where no CFLAGS are added to the $cc argument list. What
makes hostlongbits selection "special"? Do people specify -m32/-m64 via
--extra-cflags?

>
> A recent kvm merge with qemu brought code for 64bit power that broke cross
> compilation. The issue is caused by configure trying to execute target
> architecture binaries where configure is executed.

Yes, i never thought about cross-compilation, my bad.

> I tried to change that detection so that it works with&without cross
> compilation with only a small change and especially without an addtional
> configure command line switch. Including the bits/wordsize.h header a platform
> usually can check its wordsize and by doing that configure can check the
> hostlongbits without executing the binary. Instead it now stops after
> preprocessing stage which resolved the __WORDSIZE constant and retrieves
> that value.
>
> I don't like my new check style, but it is at least less broken than before.
> Another approach that was suggested was that qemu might end up needing
> something like asm-offsets in the kernel to manage architecture sizes etc.
> Comments and other approaches welcome.
>

I think Hollis Blanchard's method is sound,

Thank you for bringing this up.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2
@ 2008-09-30 19:38         ` malc
  0 siblings, 0 replies; 28+ messages in thread
From: malc @ 2008-09-30 19:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: ehrhardt, avi, kvm, kvm-ppc, hollisb

On Tue, 30 Sep 2008, ehrhardt@linux.vnet.ibm.com wrote:

> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
>
> *update*
> further debugging according to some requests revealed that ARCH_CFLAGS does
> not contain all CFLAGS that might be needed, especially those supplied via
> extra-cflags. Therefore people supplying things via extra-cflags instead of an
> environment variable might have had issues.

This part i don't get, there are few more checks before/after 
hostlongbits where no CFLAGS are added to the $cc argument list. What
makes hostlongbits selection "special"? Do people specify -m32/-m64 via
--extra-cflags?

>
> A recent kvm merge with qemu brought code for 64bit power that broke cross
> compilation. The issue is caused by configure trying to execute target
> architecture binaries where configure is executed.

Yes, i never thought about cross-compilation, my bad.

> I tried to change that detection so that it works with&without cross
> compilation with only a small change and especially without an addtional
> configure command line switch. Including the bits/wordsize.h header a platform
> usually can check its wordsize and by doing that configure can check the
> hostlongbits without executing the binary. Instead it now stops after
> preprocessing stage which resolved the __WORDSIZE constant and retrieves
> that value.
>
> I don't like my new check style, but it is at least less broken than before.
> Another approach that was suggested was that qemu might end up needing
> something like asm-offsets in the kernel to manage architecture sizes etc.
> Comments and other approaches welcome.
>

I think Hollis Blanchard's method is sound,

Thank you for bringing this up.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits
       [not found]       ` <1222765817-26552-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2008-09-30 21:19           ` malc
  0 siblings, 0 replies; 28+ messages in thread
From: malc @ 2008-09-30 21:19 UTC (permalink / raw)
  To: qemu-devel-qX2TKyscuCcdnm+yROfE0A
  Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On Tue, 30 Sep 2008, ehrhardt@linux.vnet.ibm.com wrote:

> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>

The commit message of r5364, the revision which basically exists
because of your posts, was somehow butchered and as such doesn't
include any references, i'm very sorry about that.

The above line was there in the commit message editing buffer, but
then i somehow screwed it all up, probably when trying to reformat
stuff suffling text around.

Once again, i'm sorry.

[..snip..]

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2
@ 2008-09-30 21:19           ` malc
  0 siblings, 0 replies; 28+ messages in thread
From: malc @ 2008-09-30 21:19 UTC (permalink / raw)
  To: qemu-devel-qX2TKyscuCcdnm+yROfE0A
  Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8

On Tue, 30 Sep 2008, ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org wrote:

> From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>

The commit message of r5364, the revision which basically exists
because of your posts, was somehow butchered and as such doesn't
include any references, i'm very sorry about that.

The above line was there in the commit message editing buffer, but
then i somehow screwed it all up, probably when trying to reformat
stuff suffling text around.

Once again, i'm sorry.

[..snip..]

-- 
mailto:av1474-3kx9bbwexCU@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits
       [not found]         ` <Pine.LNX.4.64.0809302317100.2511-KsBd/I2zj1m2ZGm1qqSgDg@public.gmane.org>
@ 2008-10-01 12:26             ` Christian Ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: Christian Ehrhardt @ 2008-10-01 12:26 UTC (permalink / raw)
  To: malc
  Cc: qemu-devel-qX2TKyscuCcdnm+yROfE0A, kvm-ppc-u79uwXL29TY76Z2rM5mHXA,
	kvm-u79uwXL29TY76Z2rM5mHXA, avi-atKUWr5tajBWk0Htik3J/w,
	hollisb-r/Jw6+rmf7HQT0dZR+AlfA

malc wrote:
> On Tue, 30 Sep 2008, ehrhardt@linux.vnet.ibm.com wrote:
>
>> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
>>
>> *update*
>> further debugging according to some requests revealed that 
>> ARCH_CFLAGS does
>> not contain all CFLAGS that might be needed, especially those 
>> supplied via
>> extra-cflags. Therefore people supplying things via extra-cflags 
>> instead of an
>> environment variable might have had issues.
>
> This part i don't get, there are few more checks before/after 
> hostlongbits where no CFLAGS are added to the $cc argument list. What
> makes hostlongbits selection "special"? Do people specify -m32/-m64 via
> --extra-cflags?
>
it was there to ensure availability of the needed include paths to reach 
wordsize.h.
But Hollis approach is much simpler, better and more reliable so never 
mind :-)

>>
>> A recent kvm merge with qemu brought code for 64bit power that broke 
>> cross
>> compilation. The issue is caused by configure trying to execute target
>> architecture binaries where configure is executed.
>
> Yes, i never thought about cross-compilation, my bad.
np, now it's fixed - thanks for quickly applying it.
>
>> I tried to change that detection so that it works with&without cross
>> compilation with only a small change and especially without an addtional
>> configure command line switch. Including the bits/wordsize.h header a 
>> platform
>> usually can check its wordsize and by doing that configure can check the
>> hostlongbits without executing the binary. Instead it now stops after
>> preprocessing stage which resolved the __WORDSIZE constant and retrieves
>> that value.
>>
>> I don't like my new check style, but it is at least less broken than 
>> before.
>> Another approach that was suggested was that qemu might end up needing
>> something like asm-offsets in the kernel to manage architecture sizes 
>> etc.
>> Comments and other approaches welcome.
>>
>
> I think Hollis Blanchard's method is sound,
>
> Thank you for bringing this up.
>


-- 

Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2
@ 2008-10-01 12:26             ` Christian Ehrhardt
  0 siblings, 0 replies; 28+ messages in thread
From: Christian Ehrhardt @ 2008-10-01 12:26 UTC (permalink / raw)
  To: malc
  Cc: qemu-devel-qX2TKyscuCcdnm+yROfE0A, kvm-ppc-u79uwXL29TY76Z2rM5mHXA,
	kvm-u79uwXL29TY76Z2rM5mHXA, avi-atKUWr5tajBWk0Htik3J/w,
	hollisb-r/Jw6+rmf7HQT0dZR+AlfA

malc wrote:
> On Tue, 30 Sep 2008, ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org wrote:
>
>> From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>>
>> *update*
>> further debugging according to some requests revealed that 
>> ARCH_CFLAGS does
>> not contain all CFLAGS that might be needed, especially those 
>> supplied via
>> extra-cflags. Therefore people supplying things via extra-cflags 
>> instead of an
>> environment variable might have had issues.
>
> This part i don't get, there are few more checks before/after 
> hostlongbits where no CFLAGS are added to the $cc argument list. What
> makes hostlongbits selection "special"? Do people specify -m32/-m64 via
> --extra-cflags?
>
it was there to ensure availability of the needed include paths to reach 
wordsize.h.
But Hollis approach is much simpler, better and more reliable so never 
mind :-)

>>
>> A recent kvm merge with qemu brought code for 64bit power that broke 
>> cross
>> compilation. The issue is caused by configure trying to execute target
>> architecture binaries where configure is executed.
>
> Yes, i never thought about cross-compilation, my bad.
np, now it's fixed - thanks for quickly applying it.
>
>> I tried to change that detection so that it works with&without cross
>> compilation with only a small change and especially without an addtional
>> configure command line switch. Including the bits/wordsize.h header a 
>> platform
>> usually can check its wordsize and by doing that configure can check the
>> hostlongbits without executing the binary. Instead it now stops after
>> preprocessing stage which resolved the __WORDSIZE constant and retrieves
>> that value.
>>
>> I don't like my new check style, but it is at least less broken than 
>> before.
>> Another approach that was suggested was that qemu might end up needing
>> something like asm-offsets in the kernel to manage architecture sizes 
>> etc.
>> Comments and other approaches welcome.
>>
>
> I think Hollis Blanchard's method is sound,
>
> Thank you for bringing this up.
>


-- 

Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2
       [not found]   ` <1222756604-10899-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
@ 2008-10-02 12:57       ` Avi Kivity
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Kivity @ 2008-10-02 12:57 UTC (permalink / raw)
  To: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	qemu-devel-qX2TKyscuCcdnm+yROfE0A, hollisb-r/Jw6+rmf7HQT0dZR+AlfA

ehrhardt@linux.vnet.ibm.com wrote:
> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
>
> *update
> Short after resending v1 I realized that I forgot to put Avi and
> qemu-devel@nongnu.org (for 2/3) on cc. I also updated the header text in 1/3 a
> bit and verified my hostlongbits proposal on recent cross toolchain versions
> because there was a question about that.
>
> Updating and testing kvm-userspace for ppc after a too long time brought up
> some issues fixed in this series.
>
> The patches are small and their description should be comprehendible. Due to
> the fact that most of the issues where build time issues I also started to
> discuss about/establish some kind of automated build test for us that should
> allow us to find such things faster.
> Let me know if qumranet has such a process for x86 already and I should help
> you to include powerpc.
>
> [patches in series]
> [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
> [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
> [PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc
>   

Applied 1 and 3, thanks.  2 appears to have already been merged via qemu 
upstream.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2
@ 2008-10-02 12:57       ` Avi Kivity
  0 siblings, 0 replies; 28+ messages in thread
From: Avi Kivity @ 2008-10-02 12:57 UTC (permalink / raw)
  To: ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
  Cc: kvm-ppc-u79uwXL29TY76Z2rM5mHXA, kvm-u79uwXL29TY76Z2rM5mHXA,
	qemu-devel-qX2TKyscuCcdnm+yROfE0A, hollisb-r/Jw6+rmf7HQT0dZR+AlfA

ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org wrote:
> From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
>
> *update
> Short after resending v1 I realized that I forgot to put Avi and
> qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org (for 2/3) on cc. I also updated the header text in 1/3 a
> bit and verified my hostlongbits proposal on recent cross toolchain versions
> because there was a question about that.
>
> Updating and testing kvm-userspace for ppc after a too long time brought up
> some issues fixed in this series.
>
> The patches are small and their description should be comprehendible. Due to
> the fact that most of the issues where build time issues I also started to
> discuss about/establish some kind of automated build test for us that should
> allow us to find such things faster.
> Let me know if qumranet has such a process for x86 already and I should help
> you to include powerpc.
>
> [patches in series]
> [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c
> [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling
> [PATCH 3/3] kvm-userspace: kvmppc: fix building userspace for powerpc
>   

Applied 1 and 3, thanks.  2 appears to have already been merged via qemu 
upstream.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2008-10-02 12:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16  8:48 [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc ehrhardt
2008-09-16  8:48 ` ehrhardt
     [not found] ` <1221554914-29751-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-09-16  8:48   ` [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c ehrhardt
2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-30  6:36     ` [PATCH 1/3] kvm-userspace: kvmppc: fix file header in libkvm-powerpc.c v2 ehrhardt
2008-09-30  6:36       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-16  8:48   ` [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling ehrhardt
2008-09-16  8:48     ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-30  6:36     ` ehrhardt
2008-09-30  6:36       ` ehrhardt
2008-09-30  9:10     ` [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2 ehrhardt
2008-09-30  9:10       ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-30 14:13       ` [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection Hollis Blanchard
2008-09-30 14:13         ` [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2 Hollis Blanchard
2008-09-30 19:38       ` [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits malc
2008-09-30 19:38         ` [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2 malc
     [not found]         ` <Pine.LNX.4.64.0809302317100.2511-KsBd/I2zj1m2ZGm1qqSgDg@public.gmane.org>
2008-10-01 12:26           ` [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits Christian Ehrhardt
2008-10-01 12:26             ` [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2 Christian Ehrhardt
     [not found]       ` <1222765817-26552-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-09-30 21:19         ` [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits malc
2008-09-30 21:19           ` [Qemu-devel] [PATCH 2/3] kvm-userspace: kvmppc: fix hostlonbits detection when cross compiling v2 malc
2008-09-16  8:48 ` [PATCH] kvm-userspace: kvmppc: fix building userspace for powerpc ehrhardt
2008-09-16  8:48   ` ehrhardt
2008-09-30  6:36 ` [PATCH 0/3] kvm-userspace: kvmppc: fix build for ppc v2 ehrhardt
2008-09-30  6:36   ` ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8
2008-09-30 14:19   ` Hollis Blanchard
2008-09-30 14:19     ` Hollis Blanchard
     [not found]   ` <1222756604-10899-1-git-send-email-ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-10-02 12:57     ` Avi Kivity
2008-10-02 12:57       ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.