• Paolo Bonzini's avatar
    Merge tag 'kvm-x86-pmu-6.9' of https://github.com/kvm-x86/linux into HEAD · e9025cdd
    Paolo Bonzini authored
    KVM x86 PMU changes for 6.9:
    
     - Fix several bugs where KVM speciously prevents the guest from utilizing
       fixed counters and architectural event encodings based on whether or not
       guest CPUID reports support for the _architectural_ encoding.
    
     - Fix a variety of bugs in KVM's emulation of RDPMC, e.g. for "fast" reads,
       priority of VMX interception vs #GP, PMC types in architectural PMUs, etc.
    
     - Add a selftest to verify KVM correctly emulates RDMPC, counter availability,
       and a variety of other PMC-related behaviors that depend on guest CPUID,
       i.e. are difficult to validate via KVM-Unit-Tests.
    
     - Zero out PMU metadata on AMD if the virtual PMU is disabled to avoid wasting
       cycles, e.g. when checking if a PMC event needs to be synthesized when
       skipping an instruction.
    
     - Optimize triggering of emulated events, e.g. for "count instructions" events
       when skipping an instruction, which yields a ~10% performance improvement in
       VM-Exit microbenchmarks when a vPMU is exposed to the guest.
    
     - Tighten the check for "PMI in guest" to reduce false positives if an NMI
       arrives in the host while KVM is handling an IRQ VM-Exit.
    e9025cdd
nested.c 221 KB