[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6] x86/VPMU: implement ipc and arch filter flags





On Fri, Jan 8, 2016 at 7:06 AM, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
On 01/08/2016 05:15 AM, Brendan Gregg wrote:
This introduces a way to have a restricted VPMU, by specifying one of two
predefined groups of PMCs to make available. For secure environments, this
allows the VPMU to be used without needing to enable all PMCs.

Signed-off-by: Brendan Gregg <bgregg@xxxxxxxxxxx>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>

This still stands with one correction below

@@ -656,12 +661,51 @@ static int core2_vpmu_do_wrmsr(unsigned int msr, uint64_t msr_content,
     tmp = msr - MSR_P6_EVNTSEL(0);
     if ( tmp >= 0 && tmp < arch_pmc_cnt )
     {
+Â Â Â Â Â Â bool_t blocked = 0;
+Â Â Â Â Â Â uint64_t umaskevent;
       struct xen_pmu_cntr_pair *xen_pmu_cntr_pair =
         vpmu_reg_pointer(core2_vpmu_cxt, arch_counters);
        if ( msr_content & ARCH_CTRL_MASK )
         return -EINVAL;
 +      /* PMC filters */
+Â Â Â Â Â Â umaskevent = msr_content & MSR_IA32_CMT_EVTSEL_UE_MASK;
+Â Â Â Â Â Â if ( vpmu_features & (XENPMU_FEATURE_IPC_ONLY ||
+Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â XENPMU_FEATURE_ARCH_ONLY) )
+Â Â Â Â Â Â {



Typo: Should be '|', not '||'.



Ah, well spotted, thanks Boris. Patch v7 coming...

Brendan

Â
-boris



--
Brendan Gregg, Senior Performance Architect, Netflix
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.