public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: Re: PMU in KVM
Date: Tue, 26 Nov 2013 11:08:23 +0200	[thread overview]
Message-ID: <20131126090823.GG959@redhat.com> (raw)
In-Reply-To: <CABpY8MKWsw+7TxpQ+c9YSra56q0KM8kKD2VUKuMJBJYoU5sk8w@mail.gmail.com>

On Tue, Nov 26, 2013 at 04:02:36PM +0800, Arthur Chunqi Li wrote:
> Hi Gleb,
> 
> I noticed that arch/x86/kvm/pmu.c is on your management and I have
> some questions about PMU in KVM. Thanks ahead if you can spare time
> answering these questions.
> 
> 1. How could PMU cooperate with Intel VT? For example, I only find
> flags in IA32_PERFEVTSELx MSRs to count in OS and USER mode (Ring 0
> and other rings). What is the consequence when I open VMXON with PMU
> enabled? Can I distinguish the counts in root and non-root mode? I
> cannot find the related descriptions in Intel manual.
> 
No you cannot. You can disable/enable PMU counters before/after
vmexit/vmentry and in this way know in what sate event was counted. That
what MPU emulation does.

> 2. What is the current status of vPMU in KVM? Is it auto-enabled? And
> how can I use (or enable/disable) it?
> 
If you run with -cpu host on Intel machine it will be enabled.

--
			Gleb.

      reply	other threads:[~2013-11-26  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26  8:02 PMU in KVM Arthur Chunqi Li
2013-11-26  9:08 ` Gleb Natapov [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=20131126090823.GG959@redhat.com \
    --to=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=yzt356@gmail.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