All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Huang <wei@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, gleb@kernel.org
Subject: Re: [PATCH V1 0/4] KVM vPMU support for x86
Date: Mon, 03 Nov 2014 12:47:08 -0600	[thread overview]
Message-ID: <5457CDAC.3060408@redhat.com> (raw)
In-Reply-To: <20141103183951.GB2009@potion.brq.redhat.com>



On 11/03/2014 12:39 PM, Radim Krčmář wrote:
> 2014-11-03 12:23-0600, Wei Huang:
>>
>>
>> On 11/03/2014 11:56 AM, Radim Krčmář wrote:
>>> 2014-10-31 12:05-0400, Wei Huang:
>>>> Currently KVM only supports vPMU for Intel platforms. This patch set 
>>>> enable vPMU support for AMD platform by creating a common PMU
>>>> interface for x86. The PMU calls from guest VMs are dispatched
>>>> to corresponding functions defined in arch specific files.
>>>
>>> The functionality looks good, so I just want verify the basic design:
>>> why don't we emulate AMD PMU on Intel, and vice versa?
>>> (Underlying PERF_COUNTs are identical in both.)
>>
>> Thanks. The underlining perf counters can be very different between AMD
>> and Intel. I think we can emulate AMD on Intel, or vice versa, for some
>> common perfmon_events (such as PERF_COUNT_HW_CPU_CYCLES). But as soon as
>> guest VMs access raw counters (see PERF_TYPE_RAW), we can't emulate them
>> anymore.
> 
> Thanks, I guess raw counters are used more than I thought, so code
> complexity would overshadow the gain of having at least something.
To be honest I did try. But it became a big rat-hole as soon as I tried
to abstract them. This problem also applies to Intel CPUs between
generations, if perf counters are not arch_counters.

-Wei

> 
> And then, there is the always perfect, "who cares" :)


> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2014-11-03 18:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 16:05 [PATCH V1 0/4] KVM vPMU support for x86 Wei Huang
2014-10-31 16:05 ` [PATCH V1 1/4] KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch Wei Huang
2014-10-31 16:05 ` [PATCH V1 2/4] KVM: x86/vPMU: Convert pmu.c code into Intel specific code Wei Huang
2014-11-03 18:36   ` Radim Krčmář
2014-11-04 18:38     ` Wei Huang
2014-10-31 16:05 ` [PATCH V1 3/4] KVM: x86/vPMU: Implement AMD PMU support for KVM Wei Huang
2014-11-03 18:17   ` Radim Krčmář
2014-11-04 18:20     ` Wei Huang
2014-10-31 16:05 ` [PATCH V1 4/4] KVM: x86/vPMU: Enable PMU handling for AMD PERFCTRn and EVNTSELn MSRs Wei Huang
2014-11-03 17:56 ` [PATCH V1 0/4] KVM vPMU support for x86 Radim Krčmář
2014-11-03 18:23   ` Wei Huang
2014-11-03 18:39     ` Radim Krčmář
2014-11-03 18:47       ` Wei Huang [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=5457CDAC.3060408@redhat.com \
    --to=wei@redhat.com \
    --cc=gleb@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.