]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: SVM: Add a helper to allocate and initialize permissions bitmaps
authorSean Christopherson <seanjc@google.com>
Tue, 10 Jun 2025 22:57:35 +0000 (15:57 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:07:37 +0000 (13:07 -0700)
commit73be81b3bb7cd7951046eedee6efb00e4afc5e02
treef0769853d5f445ad5de0140e1634f2f4c74651b4
parent54f1c770611b9f8d7e8f8a50a60384291f143689
KVM: SVM: Add a helper to allocate and initialize permissions bitmaps

Add a helper to allocate and initialize an MSR or I/O permissions map, as
the logic is identical between the two map types, the only difference is
the size of the bitmap.  Opportunistically add a comment to explain why
the bitmaps are initialized with 0xff, e.g. instead of the more common
zero-initialized behavior, which is the main motivation for deduplicating
the code.

No functional change intended.

Link: https://lore.kernel.org/r/20250610225737.156318-31-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h