All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: "andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	"jbeulich@suse.com" <jbeulich@suse.com>
Subject: Re: [PATCH v2 1/3] x86/vpmu: Add get/put_vpmu() and VPMU_AVAILABLE
Date: Wed, 22 Feb 2017 09:06:28 -0500	[thread overview]
Message-ID: <9f77089f-f656-2af0-e684-b737665d6748@oracle.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D190C42EEC@SHSMSX101.ccr.corp.intel.com>


>>>> +
>>>> +void vpmu_initialise(struct vcpu *v)
>>>> +{
>>>> +    get_vpmu(v);
>>>> +
>>>> +    /*
>>>> +     * Guests without LAPIC (i.e. PV) call vpmu_arch_initialise()
>>>> +     * from pvpmu_init().
>>>> +     */
>>> implication is that PV VPMU is not counted then?
>> No. get_vpmu() is what does the counting now. Since we do
>> vcpu_initialise() -> vpmu_initialise() for all type of VCPUs both PV and
>> HVM VPMUs are counted here. But we defer arch-specific intialization
>> (which doesn't do the counting) for PV until the hypercall.
>>
> earlier comment said vpmu_count is to count active VPMUs.
> what's the definition of 'active' here?  An uninitialized pv VPMU
> is also considered active?

Yes. Whenever a VCPU with appropriately defined CPUID leaf  0xa is
initialized we should assume that it eventually will be used. I can
clarify the comment.

(In the second patch I claim that "appropriately defined" is version=0
but perhaps there is a better definition.)

-boris


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-02-22 14:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 17:40 [PATCH v2 0/3] VPMU management update Boris Ostrovsky
2017-02-17 17:40 ` [PATCH v2 1/3] x86/vpmu: Add get/put_vpmu() and VPMU_AVAILABLE Boris Ostrovsky
2017-02-21  8:09   ` Tian, Kevin
2017-02-21 14:09     ` Boris Ostrovsky
2017-02-22  3:05       ` Tian, Kevin
2017-02-22 14:06         ` Boris Ostrovsky [this message]
2017-02-21 11:00   ` Andrew Cooper
2017-02-21 14:12     ` Boris Ostrovsky
2017-02-17 17:40 ` [PATCH v2 2/3] x86/vpmu: Disable VPMU if guest's CPUID indicates no PMU support Boris Ostrovsky
2017-02-21  8:13   ` Tian, Kevin
2017-02-22  9:55   ` Jan Beulich
2017-02-22 14:15     ` Boris Ostrovsky
2017-02-22 14:38       ` Jan Beulich
2017-02-22 15:02         ` Boris Ostrovsky
2017-02-22 15:10           ` Andrew Cooper
2017-02-22 16:34             ` Boris Ostrovsky
2017-02-22 16:42               ` Andrew Cooper
2017-02-22 15:16           ` Jan Beulich
2017-02-17 17:40 ` [PATCH v2 3/3] libxc/x86: PV guests should see leaf 0xa on Intel Boris Ostrovsky
2017-02-20 14:15   ` Wei Liu
2017-02-20 14:16     ` Andrew Cooper
2017-02-20 14:17       ` Wei Liu

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=9f77089f-f656-2af0-e684-b737665d6748@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xen.org \
    /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.