Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our own u64/s64 definitions, not glibc's, so i think it should be fine -

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 18:28 +1100, Matt Evans wrote: On 07/12/11 18:24, Alexander Graf wrote: On 07.12.2011, at 08:19, Matt Evans m...@ozlabs.org wrote: On 07/12/11 17:34, Sasha Levin wrote: On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote: On 06/12/11 19:20, Sasha Levin wrote:

Exit stats using kvm_stats_debugfs

2011-12-07 Thread Aashish Mittal
Hi I'm working on linux-3.0-rc4 kernel on booke architecture. I've to take some exits stats for benchmarking for e.g counting the number of vm exits due to mfmsr instruction in guests during the guest bootup process. So are the number of counts provided by values in vcpu_stat correct for the

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Paolo Bonzini
On 12/07/2011 09:16 AM, Ingo Molnar wrote: That's what's happening here; we're __powerpc64__ and !__KERNEL__, tools/kvm/include/linux/types.h includes asm/types.h so gets the int-l64.h definition of __u64, as above. :/ builtin-run.c:389: error: format `%llx' expects type `long long

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Avi Kivity
On 12/07/2011 08:44 AM, Alexander Graf wrote: On 07.12.2011, at 01:32, Matt Evans m...@ozlabs.org wrote: On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any chance one of you can loan a temporary ppc shell for the upcoming tests of KVM tool/ppc KVM?

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Avi Kivity
On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any chance one of you can loan a temporary ppc shell for

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 15:12, Avi Kivity a...@redhat.com wrote: On 12/07/2011 08:44 AM, Alexander Graf wrote: On 07.12.2011, at 01:32, Matt Evans m...@ozlabs.org wrote: On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:00 +0100, Alexander Graf wrote: On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 16:25, Sasha Levin levinsasha...@gmail.com wrote: On Wed, 2011-12-07 at 16:00 +0100, Alexander Graf wrote: On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Pekka Enberg
On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our own u64/s64 definitions, not glibc's, so

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Pekka Enberg
On 12/07/2011 09:16 AM, Ingo Molnar wrote: That's what's happening here; we're __powerpc64__ and !__KERNEL__, tools/kvm/include/linux/types.h includes asm/types.h so gets the int-l64.h definition of __u64, as above. :/ builtin-run.c:389: error: format `%llx' expects type `long long

Re: [PATCH 1/8] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-07 Thread Scott Wood
On 12/07/2011 01:35 AM, Matt Evans wrote: Hi Scott, On 07/12/11 05:03, Scott Wood wrote: On 12/05/2011 10:05 PM, Matt Evans wrote: This patch adds a new arch directory, powerpc, basic file structure, register setup and where necessary stubs out arch-specific functions (e.g. interrupts,

CPU requires an RMO

2011-12-07 Thread red f1sh
Hello, I'm trying to use qemu-kvm on a ppc970 box, and when I try to execute qemu-system-ppc64 with -enable-kvm I'm getting an Invalid argument message and CPU requires an RMO in dmesg. For example: # /usr/local/bin/qemu-system- ppc64 -kernel /boot/vmlinux-3.2.0-rc4 -m 1024 -initrd

[PATCH] KVM: PPC: Add KVM_CAP_NR_VCPUS and KVM_CAP_MAX_VCPUS

2011-12-07 Thread Matt Evans
PPC KVM lacks these two capabilities, and as such a userland system must assume a max of 4 VCPUs (following api.txt). With these, a userland can determine a more realistic limit. Signed-off-by: Matt Evans m...@ozlabs.org --- Alex: For when you're back in civilisation -- the kvmtool/PPC stuff

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Matt Evans
Hi Sasha, On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the cases where it happens? It sounds like Alex is considering KVM PPC's return value in this case (and

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types,

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 15:49, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Sasha Levin
On Thu, 2011-12-08 at 14:03 +1100, Matt Evans wrote: Hi Sasha, On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the cases where it happens? It sounds like

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 15:56, Matt Evans wrote: On 08/12/11 15:49, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: Since tools/kvm/include/linux/types.h only requires __u32, __u64 et al from asm/types.h, wouldn't it be most straightforward to just #include asm-generic/int-ll64.h? This avoids #define __KERNEL__ breaking other includes brought into userland, avoids

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 16:49, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: Since tools/kvm/include/linux/types.h only requires __u32, __u64 et al from asm/types.h, wouldn't it be most straightforward to just #include asm-generic/int-ll64.h? This avoids #define __KERNEL__ breaking other