[Public]

Hi,

> -----Original Message-----
> From: Jan Beulich <jbeul...@suse.com>
> Sent: Monday, March 24, 2025 10:09 PM
> To: Penny, Zheng <penny.zh...@amd.com>
> Cc: Huang, Ray <ray.hu...@amd.com>; Andrew Cooper
> <andrew.coop...@citrix.com>; Roger Pau Monné <roger....@citrix.com>;
> Anthony PERARD <anthony.per...@vates.tech>; Orzel, Michal
> <michal.or...@amd.com>; Julien Grall <jul...@xen.org>; Stefano Stabellini
> <sstabell...@kernel.org>; xen-devel@lists.xenproject.org
> 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

Reply via email to