[PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg

2009-04-26 Thread Michael S. Tsirkin
Make kvm configure script and Makefile work again after things have been
moved around, so that you can do 'cd kvm  ./configure' to get a
kvm-enabled qemu.

Also, guard against infinite recursion in case of 'cd' commands failing.

Signed-off-by: Michael S. Tsirkin m...@redhat.com

--

On Thu, Apr 23, 2009 at 06:40:00PM +0300, Avi Kivity wrote:
 After a lengthy testing phase, qemu-kvm.git has replaced  
 kvm-userspace.git as the source repository for kvm userspace development.

This patch makes cd kvm; ./configure work.
Is this the expected mode of operation?

diff --git a/kvm/Makefile b/kvm/Makefile
index 617504c..1ef6493 100644
--- a/kvm/Makefile
+++ b/kvm/Makefile
@@ -7,29 +7,29 @@ rpmrelease = devel
 
 sane-arch = $(subst i386,x86,$(subst x86_64,x86,$(subst s390x,s390,$(ARCH
 
-.PHONY: kernel user libkvm qemu bios vgabios extboot clean libfdt cscope
+.PHONY: kernel user libkvm ${QEMU_DIR} bios vgabios extboot clean libfdt cscope
 
-all: libkvm qemu
+all: libkvm ${QEMU_DIR}
 ifneq '$(filter $(ARCH), x86_64 i386 ia64)' ''
 all: $(if $(WANT_MODULE), kernel) user
 endif
 
 kcmd = $(if $(WANT_MODULE),,@\#)
 
-qemu kernel user libkvm:
+${QEMU_DIR} kernel user libkvm:
$(MAKE) -C $@
 
-qemu: libkvm
+${QEMU_DIR}: libkvm
 ifneq '$(filter $(ARCH), i386 x86_64)' ''
-qemu: extboot
+${QEMU_DIR}: extboot
 endif
 ifneq '$(filter $(ARCH), powerpc ia64)' ''
-qemu: libfdt
+${QEMU_DIR}: libfdt
 endif
 user: libkvm
 
 # sync if kernel/Makefile exists and if using --with-patched-kernel
-user libkvm qemu: header-sync-$(if $(wildcard kernel/Makefile),$(if 
$(WANT_MODULE),n,y),n)
+user libkvm ${QEMU_DIR}: header-sync-$(if $(wildcard kernel/Makefile),$(if 
$(WANT_MODULE),n,y),n)
 
 header-sync-n:
 
@@ -42,18 +42,18 @@ header-sync-y:
 
 bios:
$(MAKE) -C $@
-   cp bios/BIOS-bochs-latest qemu/pc-bios/bios.bin
+   cp bios/BIOS-bochs-latest ${QEMU_DIR}/pc-bios/bios.bin
 
 vgabios:
$(MAKE) -C $@
-   cp vgabios/VGABIOS-lgpl-latest.bin qemu/pc-bios/vgabios.bin
-   cp vgabios/VGABIOS-lgpl-latest.cirrus.bin 
qemu/pc-bios/vgabios-cirrus.bin
+   cp vgabios/VGABIOS-lgpl-latest.bin ${QEMU_DIR}/pc-bios/vgabios.bin
+   cp vgabios/VGABIOS-lgpl-latest.cirrus.bin 
${QEMU_DIR}/pc-bios/vgabios-cirrus.bin
 
 extboot:
$(MAKE) -C $@
-   if ! [ -f qemu/pc-bios/extboot.bin ] \
-   || ! cmp -s qemu/pc-bios/extboot.bin extboot/extboot.bin; then \
-   cp extboot/extboot.bin qemu/pc-bios/extboot.bin; \
+   if ! [ -f ${QEMU_DIR}/pc-bios/extboot.bin ] \
+   || ! cmp -s ${QEMU_DIR}/pc-bios/extboot.bin extboot/extboot.bin; 
then \
+   cp extboot/extboot.bin ${QEMU_DIR}/pc-bios/extboot.bin; \
fi
 libfdt:
$(MAKE) -C $@
@@ -75,7 +75,7 @@ install-rpm:
mkdir -p $(DESTDIR)/$(initdir)
mkdir -p $(DESTDIR)/$(utilsdir)
mkdir -p $(DESTDIR)/etc/udev/rules.d
-   make -C qemu DESTDIR=$(DESTDIR)/ install
+   make -C ${QEMU_DIR} DESTDIR=$(DESTDIR)/ install
ln -sf /usr/kvm/bin/qemu-system-x86_64 $(DESTDIR)/$(bin)
install -m 755 kvm_stat $(DESTDIR)/$(bindir)/kvm_stat
cp scripts/kvm $(DESTDIR)/$(initdir)/kvm
@@ -85,7 +85,7 @@ install-rpm:
 install:
$(kcmd)make -C kernel DESTDIR=$(DESTDIR) install
make -C libkvm DESTDIR=$(DESTDIR) install
-   make -C qemu DESTDIR=$(DESTDIR) install
+   make -C ${QEMU_DIR} DESTDIR=$(DESTDIR) install
 
 tmpspec = .tmp.kvm.spec
 RPMTOPDIR = $$(pwd)/rpmtop
@@ -100,7 +100,7 @@ rpm:srpm
 srpm:
mkdir -p $(RPMTOPDIR)/{SOURCES,SRPMS}
sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec  $(tmpspec)
-   tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz qemu
+   tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz ${QEMU_DIR}
tar czf $(RPMTOPDIR)/SOURCES/user.tar.gz user
tar czf $(RPMTOPDIR)/SOURCES/libkvm.tar.gz libkvm
tar czf $(RPMTOPDIR)/SOURCES/kernel.tar.gz kernel
@@ -111,7 +111,7 @@ srpm:
$(RM) $(tmpspec)
 
 clean:
-   for i in $(if $(WANT_MODULE), kernel) user libkvm qemu libfdt; do \
+   for i in $(if $(WANT_MODULE), kernel) user libkvm ${QEMU_DIR} libfdt; 
do \
make -C $$i clean; \
done
rm -f ./cscope.*
diff --git a/kvm/configure b/kvm/configure
index 249c743..f4873c1 100755
--- a/kvm/configure
+++ b/kvm/configure
@@ -14,6 +14,7 @@ qemu_opts=()
 cross_prefix=
 arch=`uname -m`
 target_exec=
+qemu_directory=$PWD/..
 # don't use uname if kerneldir is set
 no_uname=
 if [ -z TMPDIR ] ; then
@@ -41,8 +42,7 @@ usage() {
Any additional option is given to qemu's configure verbatim; including:
 
 EOF
-cd qemu
-./configure --help | egrep enable-|disable- \
+cd $qemu_directory  ./configure --help | egrep enable-|disable- \
| grep -v user | grep -v system | grep -v kqemu | grep -v kvm \
| sed -e s/^  //g \
| sed -es/  enable/enable/g | sed -e s/  disable/disable/g
@@ -117,7 +117,7 @@ processor=${arch#*-}
 

Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg

2009-04-26 Thread Gleb Natapov
On Sun, Apr 26, 2009 at 10:38:39AM +0300, Michael S. Tsirkin wrote:
 Make kvm configure script and Makefile work again after things have been
 moved around, so that you can do 'cd kvm  ./configure' to get a
 kvm-enabled qemu.
 
 Also, guard against infinite recursion in case of 'cd' commands failing.
 
I suppose changes under kvm/kernel/*  are not relevant to this goal. Also
for me running ./configure  --kerneldir=/path/to/kernel at top dir works.
(/path/to/kernel should be absolute though, otherwise kernel include path
is incorrect).


 Signed-off-by: Michael S. Tsirkin m...@redhat.com
 
 --
 
 On Thu, Apr 23, 2009 at 06:40:00PM +0300, Avi Kivity wrote:
  After a lengthy testing phase, qemu-kvm.git has replaced  
  kvm-userspace.git as the source repository for kvm userspace development.
 
 This patch makes cd kvm; ./configure work.
 Is this the expected mode of operation?
 
 diff --git a/kvm/Makefile b/kvm/Makefile
 index 617504c..1ef6493 100644
 --- a/kvm/Makefile
 +++ b/kvm/Makefile
 @@ -7,29 +7,29 @@ rpmrelease = devel
  
  sane-arch = $(subst i386,x86,$(subst x86_64,x86,$(subst s390x,s390,$(ARCH
  
 -.PHONY: kernel user libkvm qemu bios vgabios extboot clean libfdt cscope
 +.PHONY: kernel user libkvm ${QEMU_DIR} bios vgabios extboot clean libfdt 
 cscope
  
 -all: libkvm qemu
 +all: libkvm ${QEMU_DIR}
  ifneq '$(filter $(ARCH), x86_64 i386 ia64)' ''
  all: $(if $(WANT_MODULE), kernel) user
  endif
  
  kcmd = $(if $(WANT_MODULE),,@\#)
  
 -qemu kernel user libkvm:
 +${QEMU_DIR} kernel user libkvm:
   $(MAKE) -C $@
  
 -qemu: libkvm
 +${QEMU_DIR}: libkvm
  ifneq '$(filter $(ARCH), i386 x86_64)' ''
 -qemu: extboot
 +${QEMU_DIR}: extboot
  endif
  ifneq '$(filter $(ARCH), powerpc ia64)' ''
 -qemu: libfdt
 +${QEMU_DIR}: libfdt
  endif
  user: libkvm
  
  # sync if kernel/Makefile exists and if using --with-patched-kernel
 -user libkvm qemu: header-sync-$(if $(wildcard kernel/Makefile),$(if 
 $(WANT_MODULE),n,y),n)
 +user libkvm ${QEMU_DIR}: header-sync-$(if $(wildcard kernel/Makefile),$(if 
 $(WANT_MODULE),n,y),n)
  
  header-sync-n:
  
 @@ -42,18 +42,18 @@ header-sync-y:
  
  bios:
   $(MAKE) -C $@
 - cp bios/BIOS-bochs-latest qemu/pc-bios/bios.bin
 + cp bios/BIOS-bochs-latest ${QEMU_DIR}/pc-bios/bios.bin
  
  vgabios:
   $(MAKE) -C $@
 - cp vgabios/VGABIOS-lgpl-latest.bin qemu/pc-bios/vgabios.bin
 - cp vgabios/VGABIOS-lgpl-latest.cirrus.bin 
 qemu/pc-bios/vgabios-cirrus.bin
 + cp vgabios/VGABIOS-lgpl-latest.bin ${QEMU_DIR}/pc-bios/vgabios.bin
 + cp vgabios/VGABIOS-lgpl-latest.cirrus.bin 
 ${QEMU_DIR}/pc-bios/vgabios-cirrus.bin
  
  extboot:
   $(MAKE) -C $@
 - if ! [ -f qemu/pc-bios/extboot.bin ] \
 -   || ! cmp -s qemu/pc-bios/extboot.bin extboot/extboot.bin; then \
 - cp extboot/extboot.bin qemu/pc-bios/extboot.bin; \
 + if ! [ -f ${QEMU_DIR}/pc-bios/extboot.bin ] \
 +   || ! cmp -s ${QEMU_DIR}/pc-bios/extboot.bin extboot/extboot.bin; 
 then \
 + cp extboot/extboot.bin ${QEMU_DIR}/pc-bios/extboot.bin; \
   fi
  libfdt:
   $(MAKE) -C $@
 @@ -75,7 +75,7 @@ install-rpm:
   mkdir -p $(DESTDIR)/$(initdir)
   mkdir -p $(DESTDIR)/$(utilsdir)
   mkdir -p $(DESTDIR)/etc/udev/rules.d
 - make -C qemu DESTDIR=$(DESTDIR)/ install
 + make -C ${QEMU_DIR} DESTDIR=$(DESTDIR)/ install
   ln -sf /usr/kvm/bin/qemu-system-x86_64 $(DESTDIR)/$(bin)
   install -m 755 kvm_stat $(DESTDIR)/$(bindir)/kvm_stat
   cp scripts/kvm $(DESTDIR)/$(initdir)/kvm
 @@ -85,7 +85,7 @@ install-rpm:
  install:
   $(kcmd)make -C kernel DESTDIR=$(DESTDIR) install
   make -C libkvm DESTDIR=$(DESTDIR) install
 - make -C qemu DESTDIR=$(DESTDIR) install
 + make -C ${QEMU_DIR} DESTDIR=$(DESTDIR) install
  
  tmpspec = .tmp.kvm.spec
  RPMTOPDIR = $$(pwd)/rpmtop
 @@ -100,7 +100,7 @@ rpm:  srpm
  srpm:
   mkdir -p $(RPMTOPDIR)/{SOURCES,SRPMS}
   sed 's/^Release:.*/Release: $(rpmrelease)/' kvm.spec  $(tmpspec)
 - tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz qemu
 + tar czf $(RPMTOPDIR)/SOURCES/kvm.tar.gz ${QEMU_DIR}
   tar czf $(RPMTOPDIR)/SOURCES/user.tar.gz user
   tar czf $(RPMTOPDIR)/SOURCES/libkvm.tar.gz libkvm
   tar czf $(RPMTOPDIR)/SOURCES/kernel.tar.gz kernel
 @@ -111,7 +111,7 @@ srpm:
   $(RM) $(tmpspec)
  
  clean:
 - for i in $(if $(WANT_MODULE), kernel) user libkvm qemu libfdt; do \
 + for i in $(if $(WANT_MODULE), kernel) user libkvm ${QEMU_DIR} libfdt; 
 do \
   make -C $$i clean; \
   done
   rm -f ./cscope.*
 diff --git a/kvm/configure b/kvm/configure
 index 249c743..f4873c1 100755
 --- a/kvm/configure
 +++ b/kvm/configure
 @@ -14,6 +14,7 @@ qemu_opts=()
  cross_prefix=
  arch=`uname -m`
  target_exec=
 +qemu_directory=$PWD/..
  # don't use uname if kerneldir is set
  no_uname=
  if [ -z TMPDIR ] ; then
 @@ -41,8 +42,7 @@ usage() {
   Any additional option is given to qemu's configure verbatim; including:
  
  

Re: [Lguest] powerpc64 port anyone?

2009-04-26 Thread Alexander Graf


On 22.04.2009, at 23:41, Hollis Blanchard wrote:


On Thu, 2009-04-23 at 01:19 +0400, Wartan Hachaturow wrote:
On Wed, Apr 22, 2009 at 7:41 PM, Hollis Blanchard  
holl...@us.ibm.com wrote:
KVM supports embedded PowerPC (440 and e500 at the moment), and  
there
has been some work to port it to ppc64 cores like 970 (without  
using the
hardware extensions, since these are unavailable on shipping  
systems).

If you're interested, you should check out the trees at
http://powerkvm.org .


Wow, didn't know about that port. I'll have a look.


The main port was PowerPC 440, and that and e500 support are already
upstream in KVM. Some details are available here:
http://www.linux-kvm.org/page/PowerPC

The 970/Cell stuff Alex is doing is only loosely connected to that
(ppc64 supervisor mode is very different from 440/e500), and that's  
the

first URL I gave you.


Actually my 970 stuff virtualizes ppc32 on ppc64, so we don't have  
to mess with conflicting kernel address rooms.


The architecture as is however should allow you to easily add ppc32  
host support as well as ppc64 guest support, as long as you prevent  
the memory segments to collide (BAT for ppc32, 0xc/0xd SLB entries for  
ppc64).


So I for my part would welcome any help I can get to have KVM run  
smoothly on non-embedded POWER :-).


Alex

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


Re: [PATCH] qemu-kvm: configure script fixups after qemu-kvm reorg

2009-04-26 Thread Michael S. Tsirkin

 Also
 for me running ./configure  --kerneldir=/path/to/kernel at top dir works.
 (/path/to/kernel should be absolute though, otherwise kernel include path
 is incorrect).

Ah, I didn't realise kvm/cofigure is obsolete.
--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: qemu-kvm.git now live

2009-04-26 Thread Avi Kivity

Liu Yu-B13201 wrote:

git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git




Is there a http interface?
  


http://www.kernel.org/pub/scm/virt/kvm/qemu-kvm.git

--
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html