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

RE: [PATCH v4 03/15] xen/x86: introduce new sub-hypercall to propagate CPPC data


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Fri, 16 May 2025 10:35:30 +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=uO1PhjOK2fmhLrtpYBtEjeTUyUHJHvaSqwq4YTHfA+U=; b=VtWpNhnz92IyI7Sts8lTPXoZ8zeepwew6lkILTZRaFd9OCheN8HLY+NbB48N71YxY4TD6TFU1My9+dhKruz3M4DhOFbsfIWLzD4OprrW9rOZUKzEH1K6LPtrh/4zAjXedn7mL0rg29Y3p3Uk1XkTgsU5fUN+N+z6GFHEFTTf7v0XFP+2pDjVeheVVhzzvjawMDm20gLnT5pNwPMuquq2zs2YokNsB8TkeF9yb5nCaa5yNYDX3dnK4zLLXQU7bWu5JOpWeAMvoxDj92uGPhvdaNed/jABtyQuj7ulzOCuLAfKx/j6ViOF8BQrm7Lu0xm5VxeHrkNuPUJeZO3P2U4Gnw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aPjMg96UZQTaWDKEFNOmR9ZH9xruJOkOwvlFTRtFlNnxjWSRBbRtI6F+SjsG1Eki7ilnx8veGyUYXvCcym+4Mg4UkBR84fjAG6JjtIwDOEMxWBt4qQQQbLWs5yLjdvdxdJMjZp15h+Gpi002MqnQ9dTjO8Zv/XsFoFqvxlnrGTPjVy+ckFYCZS1L1rKSblyOfx0oOvESu9q9Gv+oTp1iBDZqFvpNZMwaij0I2tTjv4UXocq/fhXLPipQIQqwhc7u48U8TtRJf+f6F8GSMFC59DteCQfiUoVpu9n70ydgej+YsO9qnW0j9ghRBJf5S0q13tF5atJJ/TzLSzP9ZQq10A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Huang, Ray" <Ray.Huang@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Orzel, Michal" <Michal.Orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 16 May 2025 10:35:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ActionId=8c18a3d8-a11c-496e-a897-9e0563ae00ed;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ContentBits=0;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Enabled=true;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Method=Privileged;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Name=Open Source;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SetDate=2025-05-16T10:35:21Z;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_Tag=10, 0, 1, 1;
  • Thread-index: AQHbrRCmWPNHyarMuUaK4nZ2TXIaALO5UliAgBvrnhA=
  • Thread-topic: [PATCH v4 03/15] xen/x86: introduce new sub-hypercall to propagate CPPC data

[Public]

Hi

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, April 28, 2025 11:57 PM
> To: Penny, Zheng <penny.zheng@xxxxxxx>
> Cc: Huang, Ray <Ray.Huang@xxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx>;
> Anthony PERARD <anthony.perard@xxxxxxxxxx>; Orzel, Michal
> <Michal.Orzel@xxxxxxx>; Julien Grall <julien@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 03/15] xen/x86: introduce new sub-hypercall to 
> propagate
> CPPC data
>
> On 14.04.2025 09:40, Penny Zheng wrote:
> > @@ -459,6 +464,26 @@ struct xen_processor_performance {  typedef
> > struct xen_processor_performance xen_processor_performance_t;
> > DEFINE_XEN_GUEST_HANDLE(xen_processor_performance_t);
> >
> > +struct xen_processor_cppc {
> > +    uint8_t flags; /* flag for CPPC sub info type */
> > +    /*
> > +     * Subset _CPC fields useful for CPPC-compatible cpufreq
> > +     * driver's initialization
> > +     */
> > +    struct {
> > +        uint32_t highest_perf;
> > +        uint32_t nominal_perf;
> > +        uint32_t lowest_nonlinear_perf;
> > +        uint32_t lowest_perf;
> > +        uint32_t lowest_mhz;
> > +        uint32_t nominal_mhz;
> > +    } cpc;
> > +    struct xen_psd_package domain_info; /* _PSD */
>
> This being a member of the new type, ...
>
> > --- a/xen/include/xlat.lst
> > +++ b/xen/include/xlat.lst
> > @@ -168,6 +168,7 @@
> >  !  processor_performance           platform.h
> >  !  processor_power                 platform.h
> >  ?  processor_px                    platform.h
> > +?  processor_cppc                  platform.h
>
> ... how can it be ? here when it's ...
>
> >  !  psd_package                     platform.h
>
> ... ! here? And with it being ?, you're lacking a place where you invoke the 
> resulting
> checking macro (which I assume would cause a build failure).
>

Understood, I see it automatically generates CHECK_psd_package. I shall change 
psd_package with ? too
In order to avoid causing build failure, I add "typedef struct xen_psd_package 
xen_psd_package_t;"
I'm not familiar with the compat framework, if it isn't the right way to fix, 
plz let me know

> Also when laying out struct xen_processor_cppc, please avoid unnecessary gaps
> or tail padding - it looks like "shared_type" would better move up. I think 
> it would
> also be a good idea to make padding fields explicit, and check them to be 
> zero. This
> way they can be assigned meaning later (if need
> be) without breaking backwards compatibility.
>
> Jan

 


Rackspace

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