diff options
author | Sean Christopherson <seanjc@google.com> | 2021-05-04 10:17:34 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-05-07 06:06:19 -0400 |
commit | 78bba966ee3cdbbfc585d8e39237378fba50a142 (patch) | |
tree | 27a010c32a018ccf1d0c50d3f87a3e17243e7477 /scripts | |
parent | 61a05d444d2ca8d40add453a5f7058fbb1b57eca (diff) | |
download | linux-78bba966ee3cdbbfc585d8e39237378fba50a142.tar.bz2 |
KVM: x86: Hide RDTSCP and RDPID if MSR_TSC_AUX probing failed
If probing MSR_TSC_AUX failed, hide RDTSCP and RDPID, and WARN if either
feature was reported as supported. In theory, such a scenario should
never happen as both Intel and AMD state that MSR_TSC_AUX is available if
RDTSCP or RDPID is supported. But, KVM injects #GP on MSR_TSC_AUX
accesses if probing failed, faults on WRMSR(MSR_TSC_AUX) may be fatal to
the guest (because they happen during early CPU bringup), and KVM itself
has effectively misreported RDPID support in the past.
Note, this also has the happy side effect of omitting MSR_TSC_AUX from
the list of MSRs that are exposed to userspace if probing the MSR fails.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210504171734.1434054-16-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions