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

RE: [PATCH v3 01/15] xen/cpufreq: introduces XEN_PM_PSD for solely delivery of _PSD


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Penny, Zheng" <penny.zheng@xxxxxxx>
  • Date: Tue, 1 Apr 2025 03:25:05 +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=A/KU+f+4WVQIKdgF9kt5wfqdUCJyew4L+MSOgiPW6js=; b=ROO3hz9zofrJTckDx4mGk5/f3+JDyl9WezpjwEUjY+M01ji+H9YhogdGJoMBwfv+Oab7h2eXC+OaDPcp8egM+0bpNY3cYsRIX69Ut7+/8dTgM4J61X0cb8TuxpXWMqU7ifVRUMq4qGUKC71svXjtuod05DomIBGMBq/VWpWKKt3VFlW/vxpYmh4zFExSqzP/IBU7U9gjI/yo/4NqbeukKEvSG75r5H9tIzRO8/jlr4bcs+SsX9vMDJiigKSM+zZzaOENgdK3Wb2egb7dcIFNd3KIu76YvCGiZlVyGVbSrXwDzugo62wI3tYK1JK+5EM3XP5OAPIp364HI69hEqqiBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WCW84NTgb1RghfbNfLXFRVh/sNGpdd2CX8I8brhHdoCY/dJ15TxlEAKrF0d5xJ7LgM3IidIBdkYRe1MHF59Cyuy0bR8Iwdychqkw+rN9RKuc/LuQcG+KZLe9oXlHJLBp/7aG5/vrPaI7MMGNCCZmdflVdXqSS2vDRvUNbaNN6GVXisZTHYpjblicgd8PekPaDA7Nju0el+ebUyTXlqpm9WFFGzPPJrb1n1Y9xuHthD5HS6Ddwo7iYpRdnnzVS/vo87lbJynH0SYjJ8sTBYeezOoIyuxTCkVweT3XE8/Loz+2qjPeitSMODbDiQKevWod3490UQ7FgtAsQE8/+y1xrA==
  • 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: Tue, 01 Apr 2025 03:25:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_f265efc6-e181-49d6-80f4-fae95cf838a0_ActionId=342404d3-5c86-4c97-b390-9f0e78de4631;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-03-31T07:55:06Z;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: AQHbjnNoTRyqRKkrMUKJ/Guu/RHDX7OCb44AgAqX8RA=
  • Thread-topic: [PATCH v3 01/15] xen/cpufreq: introduces XEN_PM_PSD for solely delivery of _PSD

[Public]

Hi,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Monday, March 24, 2025 10:09 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 v3 01/15] xen/cpufreq: introduces XEN_PM_PSD for solely
> delivery of _PSD
>
> On 06.03.2025 09:39, Penny Zheng wrote:
> > --- a/xen/include/public/platform.h
> > +++ b/xen/include/public/platform.h
> > @@ -363,12 +363,12 @@
> DEFINE_XEN_GUEST_HANDLE(xenpf_getidletime_t);
> >  #define XEN_PM_PX   1
> >  #define XEN_PM_TX   2
> >  #define XEN_PM_PDC  3
> > +#define XEN_PM_PSD  4
> >
> >  /* Px sub info type */
> >  #define XEN_PX_PCT   1
> >  #define XEN_PX_PSS   2
> >  #define XEN_PX_PPC   4
> > -#define XEN_PX_PSD   8
> >
> >  struct xen_power_register {
> >      uint32_t     space_id;
> > @@ -439,6 +439,7 @@ struct xen_psd_package {
> >      uint64_t coord_type;
> >      uint64_t num_processors;
> >  };
> > +typedef struct xen_psd_package xen_psd_package_t;
> >
> >  struct xen_processor_performance {
> >      uint32_t flags;     /* flag for Px sub info type */
> > @@ -447,12 +448,6 @@ struct xen_processor_performance {
> >      struct xen_pct_register status_register;
> >      uint32_t state_count;     /* total available performance states */
> >      XEN_GUEST_HANDLE(xen_processor_px_t) states;
> > -    struct xen_psd_package domain_info;
> > -    /* Coordination type of this processor */
> > -#define XEN_CPUPERF_SHARED_TYPE_HW   1 /* HW does needed
> coordination */
> > -#define XEN_CPUPERF_SHARED_TYPE_ALL  2 /* All dependent CPUs
> should
> > set freq */ -#define XEN_CPUPERF_SHARED_TYPE_ANY  3 /* Freq can be set
> from any dependent CPU */
> > -    uint32_t shared_type;
> >  };
> >  typedef struct xen_processor_performance xen_processor_performance_t;
> > DEFINE_XEN_GUEST_HANDLE(xen_processor_performance_t);
> > @@ -463,9 +458,15 @@ struct xenpf_set_processor_pminfo {
> >      uint32_t type;  /* {XEN_PM_CX, XEN_PM_PX} */
> >      union {
> >          struct xen_processor_power          power;/* Cx: _CST/_CSD */
> > -        struct xen_processor_performance    perf; /* Px: 
> > _PPC/_PCT/_PSS/_PSD
> */
> > +        xen_psd_package_t                   domain_info; /* _PSD */
> > +        struct xen_processor_performance    perf; /* Px: _PPC/_PCT/_PSS/ */
> >          XEN_GUEST_HANDLE(uint32)            pdc;  /* _PDC */
> >      } u;
> > +    /* Coordination type of this processor */
> > +#define XEN_CPUPERF_SHARED_TYPE_HW   1 /* HW does needed
> coordination */
> > +#define XEN_CPUPERF_SHARED_TYPE_ALL  2 /* All dependent CPUs
> should
> > +set freq */ #define XEN_CPUPERF_SHARED_TYPE_ANY  3 /* Freq can be
> set from any dependent CPU */
> > +    uint32_t shared_type;
> >  };
> >  typedef struct xenpf_set_processor_pminfo
> > xenpf_set_processor_pminfo_t;
> > DEFINE_XEN_GUEST_HANDLE(xenpf_set_processor_pminfo_t);
>
> With this change to stable hypercall structures, how is an older Dom0 kernel 
> going
> to be able to properly upload the necessary data? IOW: No, you can't alter 
> existing
> stable hypercall structures like this.
>

Understood.
I'll expand the newly added "struct xen_processor_cppc", to let it also include 
_PSD info
and shared type
```
+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 */
+    /* Coordination type of this processor */
+    uint32_t shared_type;
+};
+typedef struct xen_processor_cppc xen_processor_cppc_t;
```

> Jan

 


Rackspace

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