On 10/29/22 00:43, Sean Christopherson wrote:
Checking 'dat' doesn't restrict counter 0, it skips printing if the guest (or host)
is writing '0', e.g. it would also skip the case you encountered where the host is
blindly "restoring" unused MSRs.
The VMM is only blind because KVM_GET_MSR_INDEX_LIST poked it in the
eye. It would be nice to have an API that the VMM could query for the
list of supported MSRs.
That should be a fairly easy bug fix, kvm_init_msr_list() can and should omit PMU
MSRs if enable_pmu==false.
Aaron, are you going to send a patch for this?
Thanks,
Paolo