* [PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os
@ 2010-06-21 9:31 Zhang, Yanmin
2010-06-21 12:37 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Yanmin @ 2010-06-21 9:31 UTC (permalink / raw)
To: LKML, kvm, Avi Kivity
Cc: Ingo Molnar, Fr??d??ric Weisbecker, Arnaldo Carvalho de Melo,
Cyrill Gorcunov, Lin Ming, Sheng Yang, Marcelo Tosatti,
oerg Roedel, Jes Sorensen, Gleb Natapov, Zachary Amsden,
zhiteng.huang, tim.c.chen
The 5th patch is applied to the latest qemu-kvm tree.
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
---
diff -Nraup qemu-kvm_0621/kvm/include/linux/kvm.h qemu-kvm_0621_perf/kvm/include/linux/kvm.h
--- qemu-kvm_0621/kvm/include/linux/kvm.h 2010-06-21 11:00:28.000000000 +0800
+++ qemu-kvm_0621_perf/kvm/include/linux/kvm.h 2010-06-21 13:23:51.537999849 +0800
@@ -530,6 +530,7 @@ struct kvm_enable_cap {
#ifdef __KVM_HAVE_XCRS
#define KVM_CAP_XCRS 56
#endif
+#define KVM_CAP_PV_PERF 57
#ifdef KVM_CAP_IRQ_ROUTING
diff -Nraup qemu-kvm_0621/kvm/include/x86/asm/kvm_para.h qemu-kvm_0621_perf/kvm/include/x86/asm/kvm_para.h
--- qemu-kvm_0621/kvm/include/x86/asm/kvm_para.h 2010-06-21 11:00:28.000000000 +0800
+++ qemu-kvm_0621_perf/kvm/include/x86/asm/kvm_para.h 2010-06-21 13:27:04.375999849 +0800
@@ -15,6 +15,7 @@
#define KVM_FEATURE_CLOCKSOURCE 0
#define KVM_FEATURE_NOP_IO_DELAY 1
#define KVM_FEATURE_MMU_OP 2
+#define KVM_FEATURE_PV_PERF 4
#define MSR_KVM_WALL_CLOCK 0x11
#define MSR_KVM_SYSTEM_TIME 0x12
diff -Nraup qemu-kvm_0621/target-i386/kvm.c qemu-kvm_0621_perf/target-i386/kvm.c
--- qemu-kvm_0621/target-i386/kvm.c 2010-06-21 11:00:29.000000000 +0800
+++ qemu-kvm_0621_perf/target-i386/kvm.c 2010-06-21 13:00:14.136999850 +0800
@@ -150,6 +150,9 @@ struct kvm_para_features {
#ifdef KVM_CAP_PV_MMU
{ KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP },
#endif
+#ifdef KVM_CAP_PV_PERF
+ { KVM_CAP_PV_PERF, KVM_FEATURE_PV_PERF },
+#endif
{ -1, -1 }
};
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os
2010-06-21 9:31 [PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os Zhang, Yanmin
@ 2010-06-21 12:37 ` Avi Kivity
2010-06-22 3:15 ` Zhang, Yanmin
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2010-06-21 12:37 UTC (permalink / raw)
To: Zhang, Yanmin
Cc: LKML, kvm, Ingo Molnar, Fr??d??ric Weisbecker,
Arnaldo Carvalho de Melo, Cyrill Gorcunov, Lin Ming, Sheng Yang,
Marcelo Tosatti, oerg Roedel, Jes Sorensen, Gleb Natapov,
Zachary Amsden, zhiteng.huang, tim.c.chen
On 06/21/2010 12:31 PM, Zhang, Yanmin wrote:
> The 5th patch is applied to the latest qemu-kvm tree.
>
> --- qemu-kvm_0621/target-i386/kvm.c 2010-06-21 11:00:29.000000000 +0800
> +++ qemu-kvm_0621_perf/target-i386/kvm.c 2010-06-21 13:00:14.136999850 +0800
> @@ -150,6 +150,9 @@ struct kvm_para_features {
> #ifdef KVM_CAP_PV_MMU
> { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP },
> #endif
> +#ifdef KVM_CAP_PV_PERF
> + { KVM_CAP_PV_PERF, KVM_FEATURE_PV_PERF },
> +#endif
> { -1, -1 }
> };
>
>
Not really necessary any more - if you expose the cpuid bit via
KVM_GET_SUPPORTED_CPUID2 then 'qemu -cpu host' will automatically enable it.
On the other hand, do update target-i386/cpuid.c:kvm_feature_name so
people can enable the feature using qemu -cpu ...,+kvmperf.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os
2010-06-21 12:37 ` Avi Kivity
@ 2010-06-22 3:15 ` Zhang, Yanmin
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Yanmin @ 2010-06-22 3:15 UTC (permalink / raw)
To: Avi Kivity
Cc: LKML, kvm, Ingo Molnar, Fr??d??ric Weisbecker,
Arnaldo Carvalho de Melo, Cyrill Gorcunov, Lin Ming, Sheng Yang,
Marcelo Tosatti, oerg Roedel, Jes Sorensen, Gleb Natapov,
Zachary Amsden, zhiteng.huang, tim.c.chen, Peter Zijlstra
On Mon, 2010-06-21 at 15:37 +0300, Avi Kivity wrote:
> On 06/21/2010 12:31 PM, Zhang, Yanmin wrote:
> > The 5th patch is applied to the latest qemu-kvm tree.
> >
> > --- qemu-kvm_0621/target-i386/kvm.c 2010-06-21 11:00:29.000000000 +0800
> > +++ qemu-kvm_0621_perf/target-i386/kvm.c 2010-06-21 13:00:14.136999850 +0800
> > @@ -150,6 +150,9 @@ struct kvm_para_features {
> > #ifdef KVM_CAP_PV_MMU
> > { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP },
> > #endif
> > +#ifdef KVM_CAP_PV_PERF
> > + { KVM_CAP_PV_PERF, KVM_FEATURE_PV_PERF },
> > +#endif
> > { -1, -1 }
> > };
> >
> >
>
>
> Not really necessary any more - if you expose the cpuid bit via
> KVM_GET_SUPPORTED_CPUID2 then 'qemu -cpu host' will automatically enable it.
>
> On the other hand, do update target-i386/cpuid.c:kvm_feature_name so
> people can enable the feature using qemu -cpu ...,+kvmperf.
Thanks for the good pointer. I will change it.
Avi,
Thanks for your wonderful comments. I will fix all in the patches.
As for the live migration, I need check it carefully. If you could
provide some suggestions on it, especially about how/when to save all perf_events
and restore all pref_events, that would be very helpful.
Yanmin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-22 3:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21 9:31 [PATCH V2 5/5] ara virt interface of perf to support kvm guest os statistics collection in guest os Zhang, Yanmin
2010-06-21 12:37 ` Avi Kivity
2010-06-22 3:15 ` Zhang, Yanmin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox