All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Pu Wen <puwen@hygon.cn>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Brian Woods <brian.woods@amd.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v4 04/15] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU
Date: Mon, 01 Apr 2019 02:35:21 -0600	[thread overview]
Message-ID: <5CA1CD49020000780022376C@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <e82e93b090e004d2b9a679d656de96ca915e92da.1553935727.git.puwen@hygon.cn>

>>> On 30.03.19 at 11:42, <puwen@hygon.cn> wrote:
> @@ -876,6 +877,10 @@ static int __init vpmu_init(void)
>          if ( amd_vpmu_init() )
>             vpmu_mode = XENPMU_MODE_OFF;
>          break;
> +    case X86_VENDOR_HYGON:
> +        if ( hygon_vpmu_init() )
> +           vpmu_mode = XENPMU_MODE_OFF;
> +        break;
>      case X86_VENDOR_INTEL:
>          if ( core2_vpmu_init() )
>             vpmu_mode = XENPMU_MODE_OFF;

While I realize they're missing right now, I would have appreciated
if you had taken the opportunity to add the missing blank lines
between case blocks here.

> --- a/xen/arch/x86/cpu/vpmu_amd.c
> +++ b/xen/arch/x86/cpu/vpmu_amd.c
> @@ -538,28 +538,12 @@ int svm_vpmu_initialise(struct vcpu *v)
>      return 0;
>  }
>  
> -int __init amd_vpmu_init(void)
> +static int common_init(void)

__init

>  {
>      unsigned int i;
>  
> -    switch ( current_cpu_data.x86 )
> +    if (!num_counters)

Style (missing blanks).

> @@ -586,3 +570,43 @@ int __init amd_vpmu_init(void)
>      return 0;
>  }
>  
> +int __init amd_vpmu_init(void)
> +{
> +    switch ( current_cpu_data.x86 )
> +    {
> +    case 0x15:
> +    case 0x17:
> +        num_counters = F15H_NUM_COUNTERS;
> +        counters = AMD_F15H_COUNTERS;
> +        ctrls = AMD_F15H_CTRLS;
> +        k7_counters_mirrored = 1;
> +        break;
> +    case 0x10:

Same as above.

I won't insist on the first item getting addressed, but the other
three should be. They're all mechanical, so could be done while
committing, and with them in place
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan



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

  reply	other threads:[~2019-04-01  8:35 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 10:40 [PATCH v4 00/15] Add support for Hygon Dhyana Family 18h processor Pu Wen
2019-03-30 10:42 ` [PATCH v4 01/15] x86/cpu: Create Hygon Dhyana architecture support file Pu Wen
2019-04-02 12:13   ` Andrew Cooper
2019-04-02 13:09     ` Pu Wen
2019-04-03  8:42   ` Jan Beulich
2019-04-03 10:05     ` Pu Wen
2019-04-03 10:21       ` Jan Beulich
2019-04-03 15:27         ` Pu Wen
2019-03-30 10:42 ` [PATCH v4 02/15] x86/cpu: Fix common cpuid faulting probing for AMD and Hygon Pu Wen
2019-04-01  8:40   ` Jan Beulich
2019-04-02  6:46     ` Pu Wen
2019-04-02 10:19       ` Jan Beulich
2019-04-02 11:58         ` Pu Wen
2019-04-02 15:46           ` Jan Beulich
2019-04-02 15:49             ` Andrew Cooper
2019-04-02 16:14             ` Pu Wen
2019-04-02 17:04               ` Andrew Cooper
2019-04-02 10:30     ` Andrew Cooper
2019-04-02 15:44       ` Jan Beulich
2019-03-30 10:42 ` [PATCH v4 03/15] x86/cpu/mtrr: Add Hygon Dhyana support to get TOP_MEM2 Pu Wen
2019-03-30 10:42 ` [PATCH v4 04/15] x86/cpu/vpmu: Add Hygon Dhyana and AMD Zen support for vPMU Pu Wen
2019-04-01  8:35   ` Jan Beulich [this message]
2019-04-02  6:46     ` Pu Wen
2019-04-02 10:20       ` Jan Beulich
2019-04-02 12:11         ` Pu Wen
2019-04-02 15:50           ` Jan Beulich
2019-04-02 16:26             ` Pu Wen
2019-03-30 10:43 ` [PATCH v4 05/15] x86/cpu/mce: Add Hygon Dhyana support to the MCA infrastructure Pu Wen
2019-03-30 10:43 ` [PATCH v4 06/15] x86/spec_ctrl: Add Hygon Dhyana to the respective mitigation machinery Pu Wen
2019-03-30 10:43 ` [PATCH v4 07/15] x86/apic: Add Hygon Dhyana support Pu Wen
2019-03-30 10:43 ` [PATCH v4 08/15] x86/acpi: " Pu Wen
2019-03-30 10:44 ` [PATCH v4 09/15] x86/iommu: " Pu Wen
2019-03-30 10:44 ` [PATCH v4 10/15] x86/pv: Add Hygon Dhyana support to emulate MSRs access Pu Wen
2019-03-30 10:44 ` [PATCH v4 11/15] x86/domain: Add Hygon Dhyana support Pu Wen
2019-03-30 10:44 ` [PATCH v4 12/15] x86/domctl: " Pu Wen
2019-03-30 10:44 ` [PATCH v4 13/15] x86/traps: " Pu Wen
2019-03-30 10:44 ` [PATCH v4 14/15] x86/cpuid: " Pu Wen
2019-03-30 10:44 ` [PATCH v4 15/15] tools/libxc: " Pu Wen
2019-04-02 15:00 ` [PATCH v4 00/15] Add support for Hygon Dhyana Family 18h processor Andrew Cooper
2019-04-02 16:00   ` Pu Wen
2019-04-02 16:15     ` Jan Beulich
2019-04-03 15:21       ` Pu Wen
2019-04-03 15:33         ` Jan Beulich

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=5CA1CD49020000780022376C@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=brian.woods@amd.com \
    --cc=puwen@hygon.cn \
    --cc=roger.pau@citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.