qemu compiling error on ppc64: kvm.c:81: error:
Hi,
I am trying to install kvm on ppc64 system (imac G5). I have built
kernel with kvm module. When I try to install qemu, I am getting this error
$ ./configure --enable-kvm --target-list="ppc-softmmu" $ make
[...]
CC slirp/tftp.o CC libdis/ppc-dis.o GEN config-target.h CC ppc-softmmu/arch_init.o CC ppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CC ppc-softmmu/monitor.o CC ppc-softmmu/machine.o CC ppc-softmmu/gdbstub.o CC ppc-softmmu/balloon.o CC ppc-softmmu/virtio-blk.o CC ppc-softmmu/virtio-balloon.o CC ppc-softmmu/virtio-net.o CC ppc-softmmu/virtio-serial-bus.o CC ppc-softmmu/virtio-pci.o CC ppc-softmmu/vhost_net.o CC ppc-softmmu/rwhandler.o CC ppc-softmmu/kvm.o
/home/user/project/qemu/target-ppc/kvm.c: In function ‘kvm_arch_init_vcpu’:/home/user/project/qemu/target-ppc/kvm.c:81: error: ‘struct kvm_sregs’ has no member named ‘pvr’
make[1]: *** [kvm.o] Error 1
make: *** [subdir-ppc-softmmu] Error 2
qemu-version: 0.13.5, 0.13.0
Other information:
Host os : ubuntu-desktop-10.04-powerpc
$ uname -a Linux user-desktop 2.6.37-rc6 #2 SMP Fri Feb 4 16:29:05 IST 2011 ppc64 GNU/Linux
$ cat /proc/cpuinfo processor : 0 cpu : PPC970FX, altivec supported clock : 2100.000000MHz revision : 3.1 (pvr 003c 0301) timebase : 33333333 platform : PowerMac model : PowerMac12,1 machine : PowerMac12,1 motherboard : PowerMac12,1 MacRISC4 Power Macintosh detected as : 337 (iMac G5 (iSight)) pmac flags : 00000000 L2 cache : 512K unified pmac-generation : NewWorld
Thanks,
Dushyant
Quoted 28 lines · Dushyant Bansal
Hi,
I am trying to install kvm on ppc64 system (imac G5). I have built
kernel with kvm module. When I try to install qemu, I am getting this error$ ./configure --enable-kvm --target-list="ppc-softmmu" $ make[...]
CC slirp/tftp.o CC libdis/ppc-dis.o GEN config-target.h CC ppc-softmmu/arch_init.o CC ppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CC ppc-softmmu/monitor.o CC ppc-softmmu/machine.o CC ppc-softmmu/gdbstub.o CC ppc-softmmu/balloon.o CC ppc-softmmu/virtio-blk.o CC ppc-softmmu/virtio-balloon.o CC ppc-softmmu/virtio-net.o CC ppc-softmmu/virtio-serial-bus.o CC ppc-softmmu/virtio-pci.o CC ppc-softmmu/vhost_net.o CC ppc-softmmu/rwhandler.o CC ppc-softmmu/kvm.o
Quoted 3 lines
/home/user/project/qemu/target-ppc/kvm.c: In function �ekvm_arch_init_vcpu�f:/home/user/project/qemu/target-ppc/kvm.c:81: error: �estruct kvm_sregs�f has no member named �epvr�f
Hrm. This means that your kernel headers in /usr/include/linux are too old. Can you try and find out which kernel version they are from please?
Thanks,
Alex
Quoted 37 lines
make[1]: *** [kvm.o] Error 1
make: *** [subdir-ppc-softmmu] Error 2qemu-version: 0.13.5, 0.13.0
Other information:
Host os : ubuntu-desktop-10.04-powerpc$ uname -a Linux user-desktop 2.6.37-rc6 #2 SMP Fri Feb 4 16:29:05 IST 2011 ppc64 GNU/Linux$ cat /proc/cpuinfo processor : 0 cpu : PPC970FX, altivec supported clock : 2100.000000MHz revision : 3.1 (pvr 003c 0301) timebase : 33333333 platform : PowerMac model : PowerMac12,1 machine : PowerMac12,1 motherboard : PowerMac12,1 MacRISC4 Power Macintosh detected as : 337 (iMac G5 (iSight)) pmac flags : 00000000 L2 cache : 512K unified pmac-generation : NewWorldThanks,
Dushyant--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: qemu compiling error on ppc64: kvm.c:
Quoted 35 lines · Alexander Graf
Quoted 28 lines · Dushyant Bansal
Hi,
I am trying to install kvm on ppc64 system (imac G5). I have built
kernel with kvm module. When I try to install qemu, I am getting this error$ ./configure --enable-kvm --target-list="ppc-softmmu" $ make[...]
CC slirp/tftp.o CC libdis/ppc-dis.o GEN config-target.h CC ppc-softmmu/arch_init.o CC ppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CC ppc-softmmu/monitor.o CC ppc-softmmu/machine.o CC ppc-softmmu/gdbstub.o CC ppc-softmmu/balloon.o CC ppc-softmmu/virtio-blk.o CC ppc-softmmu/virtio-balloon.o CC ppc-softmmu/virtio-net.o CC ppc-softmmu/virtio-serial-bus.o CC ppc-softmmu/virtio-pci.o CC ppc-softmmu/vhost_net.o CC ppc-softmmu/rwhandler.o CC ppc-softmmu/kvm.oQuoted 3 lines
/home/user/project/qemu/target-ppc/kvm.c: In function ‘kvm_arch_init_vcpu’:/home/user/project/qemu/target-ppc/kvm.c:81: error: ‘struct kvm_sregs’ has no member named ‘pvr’
Quoted 1 line
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from please?
< 2.6.33. Lacking build-time KVM_CAP check? Or is such a kernel too old anyway? Then catch it during configure and point the user to... well... there is no kvm-kmod with kernel header updates for PowerPC. Hmm... ;)
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Quoted 36 lines · Jan Kiszka
Quoted 35 lines · Alexander Graf
Quoted 31 lines · Dushyant Bansal
Hi,
I am trying to install kvm on ppc64 system (imac G5). I have built kernel with kvm module. When I try to install qemu, I am getting this error$ ./configure --enable-kvm --target-list="ppc-softmmu" $ make[...]
CC slirp/tftp.o CC libdis/ppc-dis.o GEN config-target.h CC ppc-softmmu/arch_init.o CC ppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CC ppc-softmmu/monitor.o CC ppc-softmmu/machine.o CC ppc-softmmu/gdbstub.o CC ppc-softmmu/balloon.o CC ppc-softmmu/virtio-blk.o CC ppc-softmmu/virtio-balloon.o CC ppc-softmmu/virtio-net.o CC ppc-softmmu/virtio-serial-bus.o CC ppc-softmmu/virtio-pci.o CC ppc-softmmu/vhost_net.o CC ppc-softmmu/rwhandler.o CC ppc-softmmu/kvm.o
/home/user/project/qemu/target-ppc/kvm.c: In function �ekvm_arch_init_vcpu�f:/home/user/project/qemu/target-ppc/kvm.c:81: error: �estruct kvm_sregs�f has no member named �epvr�f
Quoted 5 lines
Quoted 1 line
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from please?< 2.6.33. Lacking build-time
KVM_CAPcheck? Or is such a kernel too old anyway? Then catch it during configure and point the user to... well... there is no kvm-kmod with kernel header updates for PowerPC. Hmm... ;)
Yes, certainly lacking a configure time dependency :).
Quoted 6 lines
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux
Re: qemu compiling error on ppc64: kvm.c:
In reply to Alexander GrafQuoted 35 lines · Alexander Graf
Quoted 28 lines · Dushyant Bansal
Hi,
I am trying to install kvm on ppc64 system (imac G5). I have built
kernel with kvm module. When I try to install qemu, I am getting this error$ ./configure --enable-kvm --target-list="ppc-softmmu" $ make[...]
CC slirp/tftp.o CC libdis/ppc-dis.o GEN config-target.h CC ppc-softmmu/arch_init.o CC ppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CC ppc-softmmu/monitor.o CC ppc-softmmu/machine.o CC ppc-softmmu/gdbstub.o CC ppc-softmmu/balloon.o CC ppc-softmmu/virtio-blk.o CC ppc-softmmu/virtio-balloon.o CC ppc-softmmu/virtio-net.o CC ppc-softmmu/virtio-serial-bus.o CC ppc-softmmu/virtio-pci.o CC ppc-softmmu/vhost_net.o CC ppc-softmmu/rwhandler.o CC ppc-softmmu/kvm.oQuoted 4 lines
/home/user/project/qemu/target-ppc/kvm.c: In function ‘kvm_arch_init_vcpu’:/home/user/project/qemu/target-ppc/kvm.c:81: error: ‘struct kvm_sregs’ has no member named ‘pvr’
Quoted 2 lines
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from please
Yes, kernel headers version is 2.6.32. For the time being, I copied some of the header files from kvm/arch/powerpc/include/asm/ to kernel headers and qemu build was successful. Thanks a lot.
--
Dushyant
Quoted 36 lines · Dushyant Bansal
Quoted 35 lines · Alexander Graf
Quoted 32 lines · Dushyant Bansal
Hi,
I am trying to install kvm on ppc64 system (imac G5). I have built
kernel with kvm module. When I try to install qemu, I am getting this error$ ./configure --enable-kvm --target-list="ppc-softmmu" $ make[...]
CC slirp/tftp.o CC libdis/ppc-dis.o GEN config-target.h CC ppc-softmmu/arch_init.o CC ppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CC ppc-softmmu/monitor.o CC ppc-softmmu/machine.o CC ppc-softmmu/gdbstub.o CC ppc-softmmu/balloon.o CC ppc-softmmu/virtio-blk.o CC ppc-softmmu/virtio-balloon.o CC ppc-softmmu/virtio-net.o CC ppc-softmmu/virtio-serial-bus.o CC ppc-softmmu/virtio-pci.o CC ppc-softmmu/vhost_net.o CC ppc-softmmu/rwhandler.o CC ppc-softmmu/kvm.o
/home/user/project/qemu/target-ppc/kvm.c: In function �ekvm_arch_init_vcpu�f:/home/user/project/qemu/target-ppc/kvm.c:81: error: �estruct kvm_sregs�f has no member named �epvr�f
Quoted 4 lines
Quoted 2 lines
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from pleaseYes, kernel headers version is 2.6.32. For the time being, I copied some of the header files from kvm/arch/powerpc/include/asm/ to kernel headers and qemu build was successful. Thanks a lot.
Awesome! I'm eager to hear how well it works for you :)
Alex
Quoted 8 lines
--
Dushyant--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: qemu compiling error on ppc64: kvm.c:
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from pleaseYes, kernel headers version is 2.6.32. For the time being, I copied some of the header files from kvm/arch/powerpc/include/asm/ to kernel headers and qemu build was successful. Thanks a lot.
Awesome! I'm eager to hear how well it works for you :)
I collected some performance stats using kvm_stat. To get more information about exit counts of individual instructions, I configured CFLAGS_emulate.o with DDEBUG flag. Now, I can see output of "pr_debug("Emulating opcode %d / %d\n", get_op(inst), get_xop(inst));" instruction in kernel logs.
I have two queries:
1. The count of "Emulating opcode...." statement in /var/log/kern.log (3 million) is coming out to be much less than emulated_inst_exits (22 million) using kvm_stat.
2. How to configure makefiles to get output of printk statements inside kvm/arch/powerpc/kvm/trace.h
Also, every time I start kvm, I get this error "KVM: Couldn't find level irq capability. Expect the VM to stall at times". After some time, the VM just hangs. I traced this output to qemu/target-ppc/kvm.c Is there any way to avoid it.
Thanks,
Dushyant
Re: qemu compiling error on ppc64: kvm.c:
Quoted 7 lines · Dushyant Bansal
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from pleaseYes, kernel headers version is 2.6.32. For the time being, I copied some of the header files from kvm/arch/powerpc/include/asm/ to kernel headers and qemu build was successful. Thanks a lot.
Quoted 7 lines
Quoted 1 line
Awesome! I'm eager to hear how well it works for you :)
I collected some performance stats using
kvm_stat. To get more information about exit counts of individual instructions, I configured CFLAGS_emulate.o with DDEBUG flag. Now, I can see output of "pr_debug("Emulating opcode %d / %d\n", get_op(inst), get_xop(inst));" instruction in kernel logs.
I have two queries:1. The count of "Emulating opcode...." statement in
/var/log/kern.log(3 million) is coming out to be much less thanemulated_inst_exits(22 million) usingkvm_stat.
The kernel log ring buffer is probably faster filled than read :).
Quoted 1 line
2. How to configure makefiles to get output of printk statements inside
kvm/arch/powerpc/kvm/trace.h
Better don't make them printks - just use the tracing framework. I'd write up a small howto here myself, but I'm pretty much on the jump to my plane for vacation. Avi, could you please guide him a bit on how to get data out of tracepoints?
Quoted 1 line
Also, every time I start kvm, I get this error "KVM: Couldn't find level irq capability. Expect the VM to stall at times". After some time, the VM just hangs. I traced this output to
qemu/target-ppc/kvm.cIs there any way to avoid it.
This means exactly what it means. There are two possible causes:
1) Your kernel is too old and doesn't support the capability
2) Qemu was compiled with kernel headers that don't know the capability yet
If it's 2, just copy some of the kvm*.h files from your kernel source over to /usr/include/linux or /usr/include/asm-powerpc and fix them up to compile (remove __user).
Alex
Re: qemu compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs'
Quoted 18 lines · Alexander Graf
Quoted 15 lines · Dushyant Bansal
Quoted 11 lines
Quoted 9 lines
Quoted 5 lines
Hrm. This means that your kernel headers in
/usr/include/linuxare too old. Can you try and find out which kernel version they are from pleaseYes, kernel headers version is 2.6.32. For the time being, I copied some of the header files from kvm/arch/powerpc/include/asm/ to kernel headers and qemu build was successful. Thanks a lot.
Awesome! I'm eager to hear how well it works for you :)
I collected some performance stats using
kvm_stat. To get more information about exit counts of individual instructions, I configured CFLAGS_emulate.o with DDEBUG flag. Now, I can see output of "pr_debug("Emulating opcode %d / %d\n", get_op(inst), get_xop(inst));" instruction in kernel logs.
I have two queries:
Quoted 9 lines
Quoted 2 lines
1. The count of "Emulating opcode...." statement in
/var/log/kern.log(3 million) is coming out to be much less thanemulated_inst_exits(22 million) usingkvm_stat.The kernel log ring buffer is probably faster filled than read :).
Quoted 2 lines
2. How to configure makefiles to get output of printk statements inside
kvm/arch/powerpc/kvm/trace.hBetter don't make them printks - just use the tracing framework. I'd write up a small howto here myself, but I'm pretty much on the jump to my plane for vacation. Avi, could you please guide him a bit on how to get data out of tracepoints?
Thanks for the quick reply :)
I have added some more trace parameters in the tracing framework and currently, it is working fine.
1. Add new field in "struct kvm_vcpu_stat" (kvm_host.h)
2. Add corresponding entry in "struct kvm_stats_debugfs_item debugfs_entries[]" (book3s.c)
3. Increment or Decrement that field where ever necessary.
I can see stats for the new parameter in kvm_stat output. I guess, this approach is okay.
Quoted 8 lines
This means exactly what it means. There are two possible causes:
1) Your kernel is too old and doesn't support the capability
2) Qemu was compiled with kernel headers that don't know the capability yetIf it's 2, just copy some of the kvm*.h files from your kernel source over to
/usr/include/linuxor/usr/include/asm-powerpcand fix them up to compile (remove__user).
I think, its reason 2. I'll try this.
Thanks,
Dushyant
Re: qemu compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs'
Quoted 6 lines · Dushyant Bansal
Quoted 6 lines
Quoted 2 lines
2. How to configure makefiles to get output of printk statements inside
kvm/arch/powerpc/kvm/trace.hBetter don't make them printks - just use the tracing framework. I'd write up a small howto here myself, but I'm pretty much on the jump to my plane for vacation. Avi, could you please guide him a bit on how to get data out of tracepoints?
Quoted 7 lines
Thanks for the quick reply :)
I have added some more trace parameters in the tracing framework and currently, it is working fine.
1. Add new field in "structkvm_vcpu_stat" (kvm_host.h)
2. Add corresponding entry in "structkvm_stats_debugfs_itemdebugfs_entries[]" (book3s.c)
3. Increment or Decrement that field where ever necessary.
Those aren't tracepoints; they're deprecated debug statistics.
For tracepoints, see
include/trace/events/kvm.h (general kvm tracepoints) arch/powerpc/kvm/trace.h (ppc specific tracepoints) arch/powerpc/kvm/book3s_mmu_hpte.c (examples of use, look for
trace_kvm_*)
Documentation/trace/tracepoints.txt (documentation, likely outdated)
Signature · 1 line
error compiling committee.c: too many arguments to function
Re: qemu compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs'
Quoted 11 lines · Avi Kivity
Quoted 7 lines · Dushyant Bansal
Quoted 2 lines
Quoted 1 line
2. How to configure makefiles to get output of printk statements inside
kvm/arch/powerpc/kvm/trace.hBetter don't make them printks - just use the tracing framework. I'd write up a small howto here myself, but I'm pretty much on the jump to my plane for vacation. Avi, could you please guide him a bit on how to get data out of tracepoints?
Thanks for the quick reply :)
I have added some more trace parameters in the tracing framework and currently, it is working fine.
1. Add new field in "structkvm_vcpu_stat" (kvm_host.h)
2. Add corresponding entry in "structkvm_stats_debugfs_itemdebugfs_entries[]" (book3s.c)
3. Increment or Decrement that field where ever necessary.Those aren't tracepoints; they're deprecated debug statistics.
Quoted 8 lines
For tracepoints, see
include/trace/events/kvm.h(general kvm tracepoints)arch/powerpc/kvm/trace.h(ppc specific tracepoints)arch/powerpc/kvm/book3s_mmu_hpte.c(examples of use, look for
trace_kvm_*)
Documentation/trace/tracepoints.txt(documentation, likely outdated)
Thanks a lot for the information.
Dushyant