[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v1 01/11] xen/x86: add CPPC feature flag for AMD processors


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Tue, 3 Dec 2024 09:20:07 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wpmG62rNwxUCRRSduoBNtHqYfSVIsRfGjwj5dP9BrEw=; b=D+v2DTkTzz7pCSpauHZVoUURcb/eQ2PnJske7HDDe0HZDx4WYBXcTaCx7AZpNN0ry/tp4Ucs+CKmNQdSWW9RqCYd237PfEkodQEDXgnHmX/ylZp+m+RbXQiZiLVwUS+vXmlLhPXA/GdB+nWOuWqmhewP+a6DBPdbI0c5PyRo10QJDErF99FI3ePGlmSlJKGr8QAGiRpRDlFjbKls4ILFB8gzhlQwv9Eyyk8tleVIy/X8v0j6dRzeGb/YOzSgTWx+YWdEyAAZ7PBvQOr8WYnobkghGiDeIiQB628ltvA/BJQd6rHCaEGQ05PGVDHVe4spv3pMtk5q/4p7gQTt78zapQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T2WCnYVTlH5VWOi7zRvKKq1Qc/x9Oa5Hy46jixSAosBMqQz2TDRzsOX44huj4T02F++pN32bEarLKyAwxHmc2RgeK1ZgxaMu+axT+500uYm/p2xsOQ17/1xbQp3V2rCpP3P5NIbAKVqT3n9c9gCeiOHY4VUTXz849AkfIxS7g7sFhbvH66hBIcqFsLebVvAxHnO4jCTm2p5rc8bKQnNiyGvNd9h4Y+FWGaMl8Vjq+k/bDGAMPP9tcTun/t2ry9xESxt/HHH50kDet1/yupN3aQ3r0/DKyjgFp7+sfGHCpdNYmp9LbWu5jKPia3C0ljw+wEiARLMq45jSETL0V/quJA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Stabellini, Stefano" <stefano.stabellini@xxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, "Ragiadakou, Xenia" <Xenia.Ragiadakou@xxxxxxx>, "Andryuk, Jason" <Jason.Andryuk@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 03 Dec 2024 09:20:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ActionId=407fcdab-ec81-48c0-a8ca-3e4e84714271;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ContentBits=0;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Enabled=true;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Method=Standard;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Name=AMD Internal Distribution Only;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SetDate=2024-12-03T09:18:10Z;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;
  • Thread-index: AQHbRVvdfIbZFgMPg0manVVUsTPS8rLUMQcAgAAMzBA=
  • Thread-topic: [PATCH v1 01/11] xen/x86: add CPPC feature flag for AMD processors

[AMD Official Use Only - AMD Internal Distribution Only]

Hi,

> -----Original Message-----
> From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Sent: Tuesday, December 3, 2024 4:32 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Stabellini, Stefano <stefano.stabellini@xxxxxxx>; Huang, Ray
> <Ray.Huang@xxxxxxx>; Ragiadakou, Xenia <Xenia.Ragiadakou@xxxxxxx>;
> Andryuk, Jason <Jason.Andryuk@xxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>;
> Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Subject: Re: [PATCH v1 01/11] xen/x86: add CPPC feature flag for AMD
> processors
>
> On 03/12/2024 8:11 am, Penny Zheng wrote:
> > Add Collaborative Processor Performance Control feature flag for AMD
> > processors.
> >
> > amd-pstate is the AMD CPU performance scaling driver that introduces a
> > new CPU frequency control mechanism on modern AMD APU and CPU series.
> > There are two types of hardware implementations: "Full MSR Support"
> > and "Shared Memory Support".
> >
> > Right now, xen will only implement "Full MSR Support", and this new
> > feature flag indicates whether processor has this feature or not.
>
> Do you have a reference to where this is documented?
>

Yes, 
https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/programmer-references/24594.pdf
See page 628 for CPUID Fn8000_0008_EBX Extended Feature Identifiers

> >
> > Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
> > ---
> >  xen/arch/x86/include/asm/cpufeature.h       | 1 +
> >  xen/include/public/arch-x86/cpufeatureset.h | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/xen/arch/x86/include/asm/cpufeature.h
> > b/xen/arch/x86/include/asm/cpufeature.h
> > index 3a06b6f297..6935703e71 100644
> > --- a/xen/arch/x86/include/asm/cpufeature.h
> > +++ b/xen/arch/x86/include/asm/cpufeature.h
> > @@ -170,6 +170,7 @@ static inline bool boot_cpu_has(unsigned int feat)
> >  #define cpu_has_amd_ssbd        boot_cpu_has(X86_FEATURE_AMD_SSBD)
> >  #define cpu_has_virt_ssbd       boot_cpu_has(X86_FEATURE_VIRT_SSBD)
> >  #define cpu_has_ssb_no          boot_cpu_has(X86_FEATURE_SSB_NO)
> > +#define cpu_has_cppc            boot_cpu_has(X86_FEATURE_CPPC)
> >  #define cpu_has_auto_ibrs       boot_cpu_has(X86_FEATURE_AUTO_IBRS)
> >
> >  /* CPUID level 0x00000007:0.edx */
> > diff --git a/xen/include/public/arch-x86/cpufeatureset.h
> > b/xen/include/public/arch-x86/cpufeatureset.h
> > index 8fa3fb711a..15f707639b 100644
> > --- a/xen/include/public/arch-x86/cpufeatureset.h
> > +++ b/xen/include/public/arch-x86/cpufeatureset.h
> > @@ -265,6 +265,7 @@ XEN_CPUFEATURE(AMD_PPIN,      8*32+23) /*
> Protected Processor Inventory Number
> >  XEN_CPUFEATURE(AMD_SSBD,      8*32+24) /*S  MSR_SPEC_CTRL.SSBD
> available */
> >  XEN_CPUFEATURE(VIRT_SSBD,     8*32+25) /*!
> MSR_VIRT_SPEC_CTRL.SSBD */
> >  XEN_CPUFEATURE(SSB_NO,        8*32+26) /*A  Hardware not vulnerable to
> SSB */
> > +XEN_CPUFEATURE(CPPC,          8*32+27) /*A  Collaborative Processor
> Performance Control */
>
> There needs to be no "A" in this patch, because it's certainly not ready to 
> advertise
> to guests yet.
>
> If you're intending it for eventual use by guests, then the "A" only goes 
> back in at the
> end of the series when the support to correctly virtualise it appears, but it 
> looks like
> it will be Xen-only.
>

Understood! Thx for the explanation. I'll remove in next Serie

> ~Andrew

Many thanks,
Penny

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.