On 2013/11/30 19:08, Paolo Bonzini wrote: > Il 29/11/2013 18:59, Wang Hui ha scritto: >> But when I wrote a test module to make IA32_PMC1 to count the event of unhalted >> cpu-cycles, after migration the value of IA32_PMC1 never grows up again. I found >> that after migration perf_event was created exactly, but when it was created, >> "current" is qemu's main thread which won't enter no-root mode, so the count of >> perf_event will never increase. > > I think the fix is to apply the MSRs in QEMU's VCPU thread, through > run_on_cpu. Interesting that I could not reproduce this when testing my > patches. > > Paolo > Thank you for your advice, Paolo. I will try run_on_cpu. And my qemu version was 1.5.1, maybe it is too old. I will try the latest version. Thanks Wang Hui -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html