Re: [PATCH v4 18/30] KVM: x86: Move "struct kvm_x86_msr_filter" definition to msrs.c

From: Binbin Wu

Date: Mon Jun 15 2026 - 23:14:42 EST


On 6/13/2026 8:03 AM, Sean Christopherson wrote:
> Move the definition of "struct kvm_x86_msr_filter" and its associate,
> "struct msr_bitmap_range", to msrs.c, as the details of the filters are
> very much implementation details that can and should be buried in msrs.c.
> While the _existence_ of filters is public knowledge, almost by definition,
> the contents don't need to be exposed outside of the MSR code as the filter
> data is provided by userspace, i.e. it pretty much has to be dynamically
> allocated, and thus never should be fully embedded in a globally visible
> structure.
>
> Note, this creates a discrepancy with the PMU event filter structure; that
> will be remedied shortly.
>
> No functional change intended.
>
> Suggested-by: Kai Huang <kai.huang@xxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>