Re: [PATCH v7 7/9] KVM: x86/pmu: Restrict RDPMC passthrough to known CPUs

"Chen, Zide" <[email protected]>
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.kvm
Message-ID <[email protected]>

On 7/27/2026 2:41 PM, [email protected] wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Compilation failure due to undeclared identifier `INTEL_PANTHERLAKE_R`.
> --
> 
> --- Patch [7]: [PATCH v7 7/9] KVM: x86/pmu: Restrict RDPMC passthrough to known CPUs ---
> commit 4eba5efe34005f159dabad1f08138db5ccbe910e
> Author: Zide Chen <[email protected]>
> 
> KVM: x86/pmu: Restrict RDPMC passthrough to known CPUs
> 
> This commit restricts KVM RDPMC passthrough to a known list of CPUs with
> audited RDPMC encodings to prevent host PMU information leaks to the guest.
> It explicitly requires RDPMC interception for unknown CPUs.
> 
>> diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c
>> index b983030fb910e..444a66ca33240 100644
>> --- a/arch/x86/kvm/pmu.c
>> +++ b/arch/x86/kvm/pmu.c
>> @@ -77,6 +77,21 @@ static const struct x86_cpu_id vmx_pebs_pdist_cpu[] = {
>>  	{}
>>  };
>>  
>> +/*
>> + * CPUs whose RDPMC encodings have been audited for KVM RDPMC
>> + * passthrough support.
>> + */
>> +static const struct x86_cpu_id kvm_rdpmc_known_cpus[] = {
>> +	X86_MATCH_VFM(INTEL_ATOM_DARKMONT_X, NULL),
>> +	X86_MATCH_VFM(INTEL_LUNARLAKE_M, NULL),
>> +	X86_MATCH_VFM(INTEL_NOVALAKE, NULL),
>> +	X86_MATCH_VFM(INTEL_NOVALAKE_L, NULL),
>> +	X86_MATCH_VFM(INTEL_PANTHERLAKE_L, NULL),
>> +	X86_MATCH_VFM(INTEL_PANTHERLAKE_R, NULL),
> 
> [Severity: Low]
> Does this code build correctly on x86? It appears that INTEL_PANTHERLAKE_R
> is an undeclared macro, which could cause a compilation failure when building
> arch/x86/kvm/pmu.c.

Yes, it builds, INTEL_PANTHERLAKE_R is already in the master branch.

> 
>> +	X86_MATCH_VFM(INTEL_WILDCATLAKE_L, NULL),
>> +	{}
>> +};
>> +
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.