Re: [PATCH 17/28] KVM: SVM: Manually recalc all MSR intercepts on userspace MSR filter change
From: Sean Christopherson
Date: Mon Jun 02 2025 - 13:08:15 EST
On Sat, May 31, 2025, Francesco Lavra wrote:
> On 2025-05-29 at 23:40, Sean Christopherson wrote:
> > -static_assert(ARRAY_SIZE(direct_access_msrs) ==
> > - MAX_DIRECT_ACCESS_MSRS - 6 * !IS_ENABLED(CONFIG_X86_64));
> > -#undef MAX_DIRECT_ACCESS_MSRS
>
> The MAX_DIRECT_ACCESS_MSRS define should now be removed from
> arch/x86/kvm/svm/svm.harch/x86/kvm/svm/svm.h, since it's no longer used.
/facepalm
All that work to get rid of the darn thing, and then I forget to actually get rid
of it.
I also failed to remove the msrpm_offset declaration (and its size macro)
#define MSRPM_OFFSETS 32
extern u32 msrpm_offsets[MSRPM_OFFSETS] __read_mostly;
which are dead code as of "KVM: SVM: Manually recalc all MSR intercepts on userspace
MSR filter change".
Nice catch, and thank you!