• Like Xu's avatar
    KVM: vmx/pmu: Release guest LBR event via lazy release mechanism · 9aa4f622
    Like Xu authored
    The vPMU uses GUEST_LBR_IN_USE_IDX (bit 58) in 'pmu->pmc_in_use' to
    indicate whether a guest LBR event is still needed by the vcpu. If the
    vcpu no longer accesses LBR related registers within a scheduling time
    slice, and the enable bit of LBR has been unset, vPMU will treat the
    guest LBR event as a bland event of a vPMC counter and release it
    as usual. Also, the pass-through state of LBR records msrs is cancelled.
    Signed-off-by: default avatarLike Xu <like.xu@linux.intel.com>
    Message-Id: <20210201051039.255478-10-like.xu@linux.intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    9aa4f622
pmu.c 14.2 KB