aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorGravatar Sean Christopherson <seanjc@google.com> 2023-02-07 00:21:54 +0000
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2023-03-14 10:20:06 -0400
commit3ec7a1b2743c07c45f4a0c508114f6cb410ddef3 (patch)
tree44582722d482a356e6856017184655f8655f1b31 /samples
parentselftests: KVM: skip hugetlb tests if huge pages are not available (diff)
downloadlinux-3ec7a1b2743c07c45f4a0c508114f6cb410ddef3.tar.gz
linux-3ec7a1b2743c07c45f4a0c508114f6cb410ddef3.tar.bz2
linux-3ec7a1b2743c07c45f4a0c508114f6cb410ddef3.zip
KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask
Define the "physical table max index mask" as bits 8:0, not 9:0. x2AVIC currently supports a max of 512 entries, i.e. the max index is 511, and the inputs to GENMASK_ULL() are inclusive. The bug is benign as bit 9 is reserved and never set by KVM, i.e. KVM is just clearing bits that are guaranteed to be zero. Note, as of this writing, APM "Rev. 3.39-October 2022" incorrectly states that bits 11:8 are reserved in Table B-1. VMCB Layout, Control Area. I.e. that table wasn't updated when x2AVIC support was added. Opportunistically fix the comment for the max AVIC ID to align with the code, and clean up comment formatting too. Fixes: 4d1d7942e36a ("KVM: SVM: Introduce logic to (de)activate x2AVIC mode") Cc: stable@vger.kernel.org Cc: Alejandro Jimenez <alejandro.j.jimenez@oracle.com> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Message-Id: <20230207002156.521736-2-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions