All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, suravee.suthikulpanit@amd.com,
	andrew.cooper3@citrix.com, eddie.dong@intel.com,
	dietmar.hahn@ts.fujitsu.com, jun.nakajima@intel.com,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 11/16] x86/VPMU: Add support for PMU register handling on PV guests
Date: Mon, 13 Jan 2014 10:44:51 -0500	[thread overview]
Message-ID: <52D409F3.20808@oracle.com> (raw)
In-Reply-To: <52D402420200007800113210@nat28.tlf.novell.com>

On 01/13/2014 09:12 AM, Jan Beulich wrote:
>>>> On 06.01.14 at 20:24, Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:
>> @@ -866,7 +867,6 @@ void pv_cpuid(struct cpu_user_regs *regs)
>>           break;
>>   
>>       case 0x00000005: /* MONITOR/MWAIT */
>> -    case 0x0000000a: /* Architectural Performance Monitor Features */
>>       case 0x0000000b: /* Extended Topology Enumeration */
>>       case 0x8000000a: /* SVM revision and features */
>>       case 0x8000001b: /* Instruction Based Sampling */
>> @@ -875,7 +875,9 @@ void pv_cpuid(struct cpu_user_regs *regs)
>>       unsupported:
>>           a = b = c = d = 0;
>>           break;
>> -
>> +    case 0x0000000a: /* Architectural Performance Monitor Features (Intel) */
>> +        vpmu_do_cpuid(0xa, &a, &b, &c, &d);
>> +        break;
>>       default:
> Rather than removing a blank line here, you ought to insert a
> second one so that there's one before _and_ after the added
> code block.
>
> Furthermore the need to pass 0xa as the first argument suggests
> that you're not in line with the intentions of vpmu_do_cpuid():
> Either you drop the first parameter from the function, or you get
> your code in line with the existing caller.

Not sure I understand the problem. We fill a, b, c and d with HW values 
for dom0 and then call vpmu_do_cpuid() to adjust them if needed. And 
whether or not this is needed is based on the first argument.

(There is a bug in this routine in that it looks like I am not calling 
vpmu_do_cpuid() for non-dom0 PV guest but that's a different issue).

-boris

  reply	other threads:[~2014-01-13 15:44 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 19:24 [PATCH v3 00/16] x86/PMU: Xen PMU PV support Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 01/16] common/symbols: Export hypervisor symbols to PV guest Boris Ostrovsky
2014-01-10 17:01   ` Jan Beulich
2014-01-13 15:00     ` Boris Ostrovsky
2014-01-13 15:07       ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 02/16] x86/VPMU: Stop AMD counters when called from vpmu_save_force() Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 03/16] x86/VPMU: Minor VPMU cleanup Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 04/16] intel/VPMU: Clean up Intel VPMU code Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 05/16] x86/VPMU: Handle APIC_LVTPC accesses Boris Ostrovsky
2014-01-13 13:28   ` Jan Beulich
2014-01-13 15:04     ` Boris Ostrovsky
2014-01-13 15:08       ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 06/16] intel/VPMU: MSR_CORE_PERF_GLOBAL_CTRL should be initialized to zero Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 07/16] x86/VPMU: Add public xenpmu.h Boris Ostrovsky
2014-01-13 13:39   ` Jan Beulich
2014-01-13 15:23     ` Boris Ostrovsky
2014-01-13 15:38       ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 08/16] x86/VPMU: Make vpmu not HVM-specific Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 09/16] x86/VPMU: Interface for setting PMU mode and flags Boris Ostrovsky
2014-01-13 14:02   ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 10/16] x86/VPMU: Initialize PMU for PV guests Boris Ostrovsky
2014-01-13 14:04   ` Jan Beulich
2014-01-13 15:25     ` Boris Ostrovsky
2014-01-13 14:05   ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 11/16] x86/VPMU: Add support for PMU register handling on " Boris Ostrovsky
2014-01-13 14:12   ` Jan Beulich
2014-01-13 15:44     ` Boris Ostrovsky [this message]
2014-01-13 15:58       ` Jan Beulich
2014-01-13 16:20         ` Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 12/16] x86/VPMU: Handle PMU interrupts for " Boris Ostrovsky
2014-01-16  9:15   ` Jan Beulich
2014-01-16 14:58     ` Boris Ostrovsky
2014-01-16 15:48       ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 13/16] x86/VPMU: Add privileged PMU mode Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 14/16] x86/VPMU: Save VPMU state for PV guests during context switch Boris Ostrovsky
2014-01-16  9:27   ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 15/16] x86/VPMU: NMI-based VPMU support Boris Ostrovsky
2014-01-16  9:35   ` Jan Beulich
2014-01-16 15:13     ` Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 16/16] x86/VPMU: Move VPMU files up from hvm/ directory Boris Ostrovsky

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=52D409F3.20808@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dietmar.hahn@ts.fujitsu.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=suravee.suthikulpanit@amd.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.