...
[PATCH 2/3] i386: kvm: disable KVM_CAP_PMU_CAPABILITY if "pmu" is disabled
... but not this one which is about to save/restore PMU registers?
[PATCH 3/3] target/i386/kvm: get and put AMD pmu registers
About the legacy registers, here is my understanding just based on the linux amd
A little bit more information from kernel perspective.
https://lkml.org/lkml/2022/10/31/476
I was kindly thinking of the same idea, but not sure if it is expected
from a bare-metal perspective, since the four legacy MSRs
are always there. Also not sure if they are used by other
The QEMU side calls kvm_get_msrs() to save the pmu registers from the KVM
side to QEMU, and calls kvm_put_msrs() to store the pmu registers back to
the KVM side.
However, only the Intel gp/fixed/global pmu registers are involved. There
is not any implementation for AMD pmu registers. The