public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM compile fails on s390x
@ 2008-07-31 14:07 Robin Atwood
  2008-08-01 12:09 ` Christian Borntraeger
  0 siblings, 1 reply; 7+ messages in thread
From: Robin Atwood @ 2008-07-31 14:07 UTC (permalink / raw)
  To: kvm

I guess I am doing something very dumb, but when I try to compile kvm-72 on 
z900 architecture (actually Hercules) I immediately get a compile error:

zgentoo kvm-72 # ./configure --disable-gfx-check --disable-sdl
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /usr/tmp/kvm-72/qemu
C compiler        gcc
Host C compiler   gcc
ARCH_CFLAGS       -march=z900
make              make
install           install
host CPU          s390
host big endian   yes
target list       i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu 
m68k-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu 
ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu 
sparc-softmmu i386-linux-user x86_64-linux-user alpha-linux-user 
arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user 
mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user 
ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user 
sparc64-linux-user sparc32plus-linux-user
gprof enabled     no
profiler          no
static build      no
-Werror enabled   no
SDL support       no
curses support    yes
mingw32 support   no
Audio drivers     oss
Extra audio cards
Mixer emulation   no
VNC TLS support   no
kqemu support     no
kvm support       no
CPU emulation     yes
brlapi support    no
Documentation     yes
NPTL support      yes
vde support       no
zgentoo kvm-72 # make
make -C libkvm
make[1]: Entering directory `/var/tmp/kvm-72/libkvm'
gcc -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall  -fno-stack-protector   -I /var/tmp/kvm-72/kernel/include   -c -o 
libkvm.o libkvm.c
libkvm.c: In function 'kvm_run':
libkvm.c:1003: warning: label 'more' defined but not used
gcc -MMD -MF ./.libkvm-s390.d -g -fomit-frame-pointer -Wall  -fno-stack-protector   -I /var/tmp/kvm-72/kernel/include   -c -o 
libkvm-s390.o libkvm-s390.c
libkvm-s390.c: In function 'kvm_show_regs':
libkvm-s390.c:63: error: 'struct kvm_regs' has no member named 'gprs'
libkvm-s390.c:64: error: 'struct kvm_regs' has no member named 'gprs'
libkvm-s390.c:65: error: 'struct kvm_regs' has no member named 'gprs'
.... <snip> ....

Obviously some s390-specific equates are missing but I can't find any options 
to enable them and the arch seems correctly detected. The kernel is 2.6.26.

TIA
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------









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

* Re: KVM compile fails on s390x
  2008-07-31 14:07 KVM compile fails on s390x Robin Atwood
@ 2008-08-01 12:09 ` Christian Borntraeger
  2008-08-01 12:20   ` Daniel P. Berrange
  2008-08-02 12:00   ` Robin Atwood
  0 siblings, 2 replies; 7+ messages in thread
From: Christian Borntraeger @ 2008-08-01 12:09 UTC (permalink / raw)
  To: Robin Atwood; +Cc: kvm

Am Donnerstag, 31. Juli 2008 schrieb Robin Atwood:
> I guess I am doing something very dumb, but when I try to compile kvm-72 on 
> z900 architecture (actually Hercules) I immediately get a compile error:
> 
> zgentoo kvm-72 # ./configure --disable-gfx-check --disable-sdl

Your userspace headers dont have all the necessary pieces...
You want to add --with-patched-kernel, that should trigger an headers_sync to 
get the header files from the kernel.

Anyway, that wont give you anything useful by now, as we only have kvmlib done 
in the userspace. Until we ported the rest of our userspace part over to 
kvm-userspace, you can use our prototype code found on 

http://www-128.ibm.com/developerworks/linux/linux390/kuli.html

It supports a subset of the qemu syntax, e.g. somethin like
kuli -drive file=disks/root -megs 128 -n tap,ifname=tap0 -smp=2
works.
You might need "tunctl" and "screen" for better results. If you want to stay 
at 2.6.26 there are some kernel patches in the kuli package. They add virtio 
console support as well as a fix for the z900. 2.6.27-rc1 should work out of 
the box.

Christian

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

* Re: KVM compile fails on s390x
  2008-08-01 12:09 ` Christian Borntraeger
@ 2008-08-01 12:20   ` Daniel P. Berrange
  2008-08-01 12:32     ` Christian Borntraeger
  2008-08-02 12:00   ` Robin Atwood
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel P. Berrange @ 2008-08-01 12:20 UTC (permalink / raw)
  To: Christian Borntraeger; +Cc: Robin Atwood, kvm

On Fri, Aug 01, 2008 at 02:09:02PM +0200, Christian Borntraeger wrote:
> Am Donnerstag, 31. Juli 2008 schrieb Robin Atwood:
> > I guess I am doing something very dumb, but when I try to compile kvm-72 on 
> > z900 architecture (actually Hercules) I immediately get a compile error:
> > 
> > zgentoo kvm-72 # ./configure --disable-gfx-check --disable-sdl
> 
> Your userspace headers dont have all the necessary pieces...
> You want to add --with-patched-kernel, that should trigger an headers_sync to 
> get the header files from the kernel.
> 
> Anyway, that wont give you anything useful by now, as we only have kvmlib done 
> in the userspace. Until we ported the rest of our userspace part over to 
> kvm-userspace, you can use our prototype code found on 
> 
> http://www-128.ibm.com/developerworks/linux/linux390/kuli.html
> 
> It supports a subset of the qemu syntax, e.g. somethin like
> kuli -drive file=disks/root -megs 128 -n tap,ifname=tap0 -smp=2
> works.

What are your intentions for this part longer term. Are you planning to
create a QEMU target for s390 so we can use real QEMU binaries instead
of emulating a subset of its features. If s390 userspace were QEMU based
them you'd be able to use libvirt as a management API in same way as
the other architectures.

Experiance with the 'xenner' work has shown that trying to write a tool
that behaves like qemu is a non-trivial, never ending task. As soon as
libvirt makes use of some new feature of QEMU's CLI or monitor console,
we find Xenner doesn't cope and have to duplicate yet more code. Hence
xenner is slowly switching over to use QEMU fully, rather than emulating
its CLI syntax

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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

* Re: KVM compile fails on s390x
  2008-08-01 12:20   ` Daniel P. Berrange
@ 2008-08-01 12:32     ` Christian Borntraeger
  2008-08-01 13:19       ` Robin Atwood
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Borntraeger @ 2008-08-01 12:32 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Robin Atwood, kvm

Am Freitag, 1. August 2008 schrieb Daniel P. Berrange:
> What are your intentions for this part longer term. Are you planning to
> create a QEMU target for s390 so we can use real QEMU binaries instead
> of emulating a subset of its features. If s390 userspace were QEMU based
> them you'd be able to use libvirt as a management API in same way as
> the other architectures.

Yes, the goal is to move towards qemu. kuli is not intended as a long term 
solution. Consider it a proof of concept/testing code to show that the kernel 
part is working.

You can also look at our KVM Forum presentation:
http://kvm.qumranet.com/kvmwiki/KvmForum2008?action=AttachFile&do=get&target=kdf2008_17.pdf
The slide "Next step" contains the merge into common kvm userspace.

I dont think we will see a full s390 backend just to make kvm work. We are 
considering Anthonys proposal for an kvm backend in qemu instead.

Christian

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

* Re: KVM compile fails on s390x
  2008-08-01 12:32     ` Christian Borntraeger
@ 2008-08-01 13:19       ` Robin Atwood
  0 siblings, 0 replies; 7+ messages in thread
From: Robin Atwood @ 2008-08-01 13:19 UTC (permalink / raw)
  To: Christian Borntraeger; +Cc: Daniel P. Berrange, kvm

On Friday 01 Aug 2008, Christian Borntraeger wrote:
> Am Freitag, 1. August 2008 schrieb Daniel P. Berrange:
> > What are your intentions for this part longer term. Are you planning to
> > create a QEMU target for s390 so we can use real QEMU binaries instead
> > of emulating a subset of its features. If s390 userspace were QEMU based
> > them you'd be able to use libvirt as a management API in same way as
> > the other architectures.

Christian, Daniel,
Thanks for the response. I was simply intrigued by the possibility of using 
KVM to virtualise zLinux and avoid having to use z/VM. 

> Yes, the goal is to move towards qemu. kuli is not intended as a long term
> solution. Consider it a proof of concept/testing code to show that the
> kernel part is working.

> You can also look at our KVM Forum presentation:
> http://kvm.qumranet.com/kvmwiki/KvmForum2008?action=AttachFile&do=get&targe
>t=kdf2008_17.pdf The slide "Next step" contains the merge into common kvm
> userspace.

That would have been my next question: now the kernel modules is build, how do 
I IPL  a guest machine?!

> I dont think we will see a full s390 backend just to make kvm work. We are
> considering Anthonys proposal for an kvm backend in qemu instead.

I have used Qemu for some years and It has always seemed to me since the 
inception of KVM that the code bases should be merged to avoid duplication of 
effort and to make things easier for the users.

I will follow up your links, thanks very much for the pointers.

Cheers...
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------









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

* Re: KVM compile fails on s390x
  2008-08-01 12:09 ` Christian Borntraeger
  2008-08-01 12:20   ` Daniel P. Berrange
@ 2008-08-02 12:00   ` Robin Atwood
  2008-08-04 11:02     ` Christian Borntraeger
  1 sibling, 1 reply; 7+ messages in thread
From: Robin Atwood @ 2008-08-02 12:00 UTC (permalink / raw)
  To: Christian Borntraeger; +Cc: kvm

On Friday 01 Aug 2008, Christian Borntraeger wrote:
> Am Donnerstag, 31. Juli 2008 schrieb Robin Atwood:
> > I guess I am doing something very dumb, but when I try to compile kvm-72
> > on z900 architecture (actually Hercules) I immediately get a compile
> > error:
> >
> > zgentoo kvm-72 # ./configure --disable-gfx-check --disable-sdl
>
> Your userspace headers dont have all the necessary pieces...
> You want to add --with-patched-kernel, that should trigger an headers_sync
> to get the header files from the kernel.

The correct headers are now found but later into the compile I get:

In file included 
from /var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/exec.c:41:
/var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/tcg/tcg.h:24:24: error: 
tcg-target.h: No such file or directory
/var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/tcg/tcg.h:37:2: error: 
#error unsupported
<snip>
make[2]: *** [exec.o] Error 1
make[2]: Leaving directory 
`/var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/i386-softmmu'
make[1]: *** [subdir-i386-softmmu] Error 2
make[1]: Leaving directory 
`/var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu'
make: *** [qemu] Error 2

There is no tcg-target.h for the s390 arch but why is i386-softmmu being 
compiled?

TIA
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------









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

* Re: KVM compile fails on s390x
  2008-08-02 12:00   ` Robin Atwood
@ 2008-08-04 11:02     ` Christian Borntraeger
  0 siblings, 0 replies; 7+ messages in thread
From: Christian Borntraeger @ 2008-08-04 11:02 UTC (permalink / raw)
  To: Robin Atwood; +Cc: kvm

Am Samstag, 2. August 2008 schrieb Robin Atwood:
> On Friday 01 Aug 2008, Christian Borntraeger wrote:
> > Am Donnerstag, 31. Juli 2008 schrieb Robin Atwood:
> > > I guess I am doing something very dumb, but when I try to compile kvm-72
> > > on z900 architecture (actually Hercules) I immediately get a compile
> > > error:
> > >
> > > zgentoo kvm-72 # ./configure --disable-gfx-check --disable-sdl
> >
> > Your userspace headers dont have all the necessary pieces...
> > You want to add --with-patched-kernel, that should trigger an headers_sync
> > to get the header files from the kernel.
> 
> The correct headers are now found but later into the compile I get:
> 
> In file included 
> from /var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/exec.c:41:
> /var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/tcg/tcg.h:24:24: 
error: 
> tcg-target.h: No such file or directory
> /var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/tcg/tcg.h:37:2: 
error: 
> #error unsupported
> <snip>
> make[2]: *** [exec.o] Error 1
> make[2]: Leaving directory 
> `/var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu/i386-softmmu'
> make[1]: *** [subdir-i386-softmmu] Error 2
> make[1]: Leaving directory 
> `/var/tmp/portage/app-emulation/kvm-72/work/kvm-72/qemu'
> make: *** [qemu] Error 2
> 
> There is no tcg-target.h for the s390 arch but why is i386-softmmu being 
> compiled?

Yes. Expect further breakage in kvm-userspace on s390. At the moment libkvm is 
the only part of kvm-userspace that is finished. Anything else is not yet 
done.

At the moment you have to use kuli to start a guest.

If you start kuli with:
# kuli -k <yourguestkernel> -a "noinitrd"
you will get a booting kernel until the no device found panic message

you can use a file, disk or partition as a root device. If you have a copy of 
your distribution on lets say /dev/dasdb1 you can boot with:

# kuli -k /boot/image-<xxx> -a "initrd root=/dev/vda" \
-d file=/dev/dasdb1 -i /boot/initrd-<xxx>

Make sure to adopt the guest fstab to /dev/vda and so on.

Christian

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

end of thread, other threads:[~2008-08-04 11:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31 14:07 KVM compile fails on s390x Robin Atwood
2008-08-01 12:09 ` Christian Borntraeger
2008-08-01 12:20   ` Daniel P. Berrange
2008-08-01 12:32     ` Christian Borntraeger
2008-08-01 13:19       ` Robin Atwood
2008-08-02 12:00   ` Robin Atwood
2008-08-04 11:02     ` Christian Borntraeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox