Re: qemu compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs' has no member named 'pvr'
On Wednesday 16 February 2011 02:39 PM, Avi Kivity wrote: On 02/15/2011 05:59 PM, Dushyant Bansal wrote: 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? 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. 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) Thanks a lot for the information. Dushyant -- 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 compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs' has no member named 'pvr'
On 02/15/2011 05:59 PM, Dushyant Bansal wrote: 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? 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. 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) -- 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
Re: qemu compiling error on ppc64: kvm.c:81: error: 'struct kvm_sregs' has no member named 'pvr'
On Tuesday 15 February 2011 08:03 PM, Alexander Graf wrote: On 15.02.2011, at 15:21, Dushyant Bansal wrote: 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 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. 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. The kernel log ring buffer is probably faster filled than read :). 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? 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. 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). I think, its reason 2. I'll try this. Thanks, Dushyant -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
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 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. 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 -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
On 15.02.2011, at 15:21, Dushyant Bansal wrote: > 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 >>> 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. >>> >> 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. The kernel log ring buffer is probably faster filled than read :). > 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? > 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. 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 -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
On 04.02.2011, at 20:19, Dushyant Bansal wrote: > On Friday 04 February 2011 08:13 PM, Alexander Graf wrote: >> On 04.02.2011, at 14:25, "Dushyant Bansal" >> wrote: >> >> >>> 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 >>> >>> [...] >>> CCslirp/tftp.o >>> CClibdis/ppc-dis.o >>> GEN config-target.h >>> CCppc-softmmu/arch_init.o >>> CCppc-softmmu/cpus.o >>> GEN ppc-softmmu/hmp-commands.h >>> GEN ppc-softmmu/qmp-commands.h >>> CCppc-softmmu/monitor.o >>> CCppc-softmmu/machine.o >>> CCppc-softmmu/gdbstub.o >>> CCppc-softmmu/balloon.o >>> CCppc-softmmu/virtio-blk.o >>> CCppc-softmmu/virtio-balloon.o >>> CCppc-softmmu/virtio-net.o >>> CCppc-softmmu/virtio-serial-bus.o >>> CCppc-softmmu/virtio-pci.o >>> CCppc-softmmu/vhost_net.o >>> CCppc-softmmu/rwhandler.o >>> CCppc-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’ >>> >> 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 >> > 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. Awesome! I'm eager to hear how well it works for you :) Alex > > -- > Dushyant > > -- > 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 -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
On 04.02.2011, at 19:35, Jan Kiszka wrote: > On 2011-02-04 15:43, Alexander Graf wrote: >> >> On 04.02.2011, at 14:25, "Dushyant Bansal" >> wrote: >> >>> 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 >>> >>> [...] >>> CCslirp/tftp.o >>> CClibdis/ppc-dis.o >>> GEN config-target.h >>> CCppc-softmmu/arch_init.o >>> CCppc-softmmu/cpus.o >>> GEN ppc-softmmu/hmp-commands.h >>> GEN ppc-softmmu/qmp-commands.h >>> CCppc-softmmu/monitor.o >>> CCppc-softmmu/machine.o >>> CCppc-softmmu/gdbstub.o >>> CCppc-softmmu/balloon.o >>> CCppc-softmmu/virtio-blk.o >>> CCppc-softmmu/virtio-balloon.o >>> CCppc-softmmu/virtio-net.o >>> CCppc-softmmu/virtio-serial-bus.o >>> CCppc-softmmu/virtio-pci.o >>> CCppc-softmmu/vhost_net.o >>> CCppc-softmmu/rwhandler.o >>> CCppc-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’ >> >> 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? > > < 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... ;) Yes, certainly lacking a configure time dependency :). > > Jan > > -- > Siemens AG, Corporate Technology, CT T DE IT 1 > Corporate Competence Center Embedded Linux -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
On Friday 04 February 2011 08:13 PM, Alexander Graf wrote: On 04.02.2011, at 14:25, "Dushyant Bansal" wrote: 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 [...] CCslirp/tftp.o CClibdis/ppc-dis.o GEN config-target.h CCppc-softmmu/arch_init.o CCppc-softmmu/cpus.o GEN ppc-softmmu/hmp-commands.h GEN ppc-softmmu/qmp-commands.h CCppc-softmmu/monitor.o CCppc-softmmu/machine.o CCppc-softmmu/gdbstub.o CCppc-softmmu/balloon.o CCppc-softmmu/virtio-blk.o CCppc-softmmu/virtio-balloon.o CCppc-softmmu/virtio-net.o CCppc-softmmu/virtio-serial-bus.o CCppc-softmmu/virtio-pci.o CCppc-softmmu/vhost_net.o CCppc-softmmu/rwhandler.o CCppc-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’ 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 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 -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
On 2011-02-04 15:43, Alexander Graf wrote: > > On 04.02.2011, at 14:25, "Dushyant Bansal" > wrote: > >> 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 >> >> [...] >> CCslirp/tftp.o >> CClibdis/ppc-dis.o >> GEN config-target.h >> CCppc-softmmu/arch_init.o >> CCppc-softmmu/cpus.o >> GEN ppc-softmmu/hmp-commands.h >> GEN ppc-softmmu/qmp-commands.h >> CCppc-softmmu/monitor.o >> CCppc-softmmu/machine.o >> CCppc-softmmu/gdbstub.o >> CCppc-softmmu/balloon.o >> CCppc-softmmu/virtio-blk.o >> CCppc-softmmu/virtio-balloon.o >> CCppc-softmmu/virtio-net.o >> CCppc-softmmu/virtio-serial-bus.o >> CCppc-softmmu/virtio-pci.o >> CCppc-softmmu/vhost_net.o >> CCppc-softmmu/rwhandler.o >> CCppc-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’ > > 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? < 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 -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux -- 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 compiling error on ppc64: kvm.c:81: error: struct kvm_sregs has no member named pvr
On 04.02.2011, at 14:25, "Dushyant Bansal" wrote: > 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 > > [...] > CCslirp/tftp.o > CClibdis/ppc-dis.o > GEN config-target.h > CCppc-softmmu/arch_init.o > CCppc-softmmu/cpus.o > GEN ppc-softmmu/hmp-commands.h > GEN ppc-softmmu/qmp-commands.h > CCppc-softmmu/monitor.o > CCppc-softmmu/machine.o > CCppc-softmmu/gdbstub.o > CCppc-softmmu/balloon.o > CCppc-softmmu/virtio-blk.o > CCppc-softmmu/virtio-balloon.o > CCppc-softmmu/virtio-net.o > CCppc-softmmu/virtio-serial-bus.o > CCppc-softmmu/virtio-pci.o > CCppc-softmmu/vhost_net.o > CCppc-softmmu/rwhandler.o > CCppc-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’ 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 > 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.00MHz > revision: 3.1 (pvr 003c 0301) > timebase: > platform: PowerMac > model: PowerMac12,1 > machine: PowerMac12,1 > motherboard: PowerMac12,1 MacRISC4 Power Macintosh > detected as: 337 (iMac G5 (iSight)) > pmac flags: > L2 cache: 512K unified > pmac-generation: NewWorld > > > Thanks, > Dushyant > > > -- > 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 -- 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