[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v11 for-xen-4.5 15/20] x86/VPMU: Add support for PMU register handling on PV guests
- To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- From: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
- Date: Tue, 23 Sep 2014 11:49:50 -0400
- Cc: kevin.tian@xxxxxxxxx, keir@xxxxxxx, jbeulich@xxxxxxxx, jun.nakajima@xxxxxxxxx, andrew.cooper3@xxxxxxxxxx, tim@xxxxxxx, dietmar.hahn@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxx, Aravind.Gopalakrishnan@xxxxxxx, suravee.suthikulpanit@xxxxxxx
- Delivery-date: Tue, 23 Sep 2014 15:49:14 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On 09/23/2014 11:08 AM, Konrad Rzeszutek Wilk wrote:
static void core2_vpmu_load(struct vcpu *v)
@@ -447,7 +461,6 @@ static int core2_vpmu_msr_common_check(u32 msr_index, int
*type, int *index)
static int core2_vpmu_do_wrmsr(unsigned int msr, uint64_t msr_content,
uint64_t supported)
{
- u64 global_ctrl;
int i, tmp;
int type = -1, index = -1;
struct vcpu *v = current;
@@ -492,6 +505,7 @@ static int core2_vpmu_do_wrmsr(unsigned int msr, uint64_t
msr_content,
{
case MSR_CORE_PERF_GLOBAL_OVF_CTRL:
core2_vpmu_cxt->global_status &= ~msr_content;
+ wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, msr_content);
The original code does the write in core2_vpmu_do_interrupt with a bunch of
filtering.
Is there a particular reason we don't want to do that?
No good reason. We definitely should check whether the value we are
writing is valid.
(And masking in core2_vpmu_do_interrupt is slightly incorrect so I'll
fix it as well)
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|