From: Wang Hui <john.whui1985@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM/X86: vpmu migration, make perf_event associated with vcpu thread
Date: Sat, 30 Nov 2013 19:47:53 +0800 [thread overview]
Message-ID: <5299D069.3090108@gmail.com> (raw)
In-Reply-To: <5299C741.40609@redhat.com>
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
prev parent reply other threads:[~2013-11-30 11:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 17:59 [PATCH] KVM/X86: vpmu migration, make perf_event associated with vcpu thread Wang Hui
2013-11-30 10:54 ` Gleb Natapov
2013-11-30 11:42 ` Wang Hui
2013-11-30 11:08 ` Paolo Bonzini
2013-11-30 11:47 ` Wang Hui [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5299D069.3090108@gmail.com \
--to=john.whui1985@gmail.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox