diff options
author | Sean Christopherson <seanjc@google.com> | 2023-11-10 05:28:55 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-02-01 20:35:48 +0300 |
commit | afda2d7666f894d1d7b8406cf54801e6c11f63c2 (patch) | |
tree | 4a19958f4a1a6e95e3ae38a4b6e316b5b3d148c4 /lib/test-string_helpers.c | |
parent | f19063b1ca058b3971d6883b5ec45955b7f53f9c (diff) | |
download | linux-afda2d7666f894d1d7b8406cf54801e6c11f63c2.tar.xz |
KVM: x86/pmu: Expand the comment about what bits are check emulating events
Expand the comment about what bits are and aren't checked when emulating
PMC events in software. As pointed out by Jim, AMD's mask includes bits
35:32, which on Intel overlap with the IN_TX and IN_TXCP bits (32 and 33)
as well as reserved bits (34 and 45).
Checking The IN_TX* bits is actually correct, as it's safe to assert that
the vCPU can't be in an HLE/RTM transaction if KVM is emulating an
instruction, i.e. KVM *shouldn't count if either of those bits is set.
For the reserved bits, KVM is has equal odds of being right if Intel adds
new behavior, i.e. ignoring them is just as likely to be correct as
checking them.
Opportunistically explain *why* the other flags aren't checked.
Suggested-by: Jim Mattson <jmattson@google.com>
Link: https://lore.kernel.org/r/20231110022857.1273836-9-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions