lkml.org 
[lkml]   [2012]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [06/34] perf, kvm: Support the intx/intx_cp modifiers in KVM arch perfmon emulation v2
    On Thu, Oct 18, 2012 at 11:19:14PM -0000, Andi Kleen wrote:
    > static inline u8 fixed_en_pmi(u64 ctrl, int idx)
    > @@ -400,7 +407,7 @@ int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, u32 index, u64 data)
    > } else if ((pmc = get_gp_pmc(pmu, index, MSR_P6_EVNTSEL0))) {
    > if (data == pmc->eventsel)
    > return 0;
    > - if (!(data & 0xffffffff00200000ull)) {
    > + if (!(data & 0xfffffffc00200000ull)) {
    > reprogram_gp_counter(pmc, data);
    > return 0;
    > }

    Mask should depend on cpuid bits provided to a guest. SDM says TSX is
    available if CPUID.(EAX=7, ECX=0):RTM[bit 11]=1, or if
    CPUID.07H.EBX.HLE [bit 4] = 1, so we need to check for this in
    kvm_pmu_cpuid_update() and initialize mask accordingly.

    --
    Gleb.


    \
     
     \ /
      Last update: 2012-10-23 15:41    [W:4.100 / U:0.052 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site