[Public]

> -----Original Message-----
> From: Jan Beulich <jbeul...@suse.com>
> Sent: Thursday, July 17, 2025 8:55 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 v6 12/19] xen/cpufreq: implement amd-cppc driver for CPPC
> in passive mode
>
> On 11.07.2025 05:50, Penny Zheng wrote:
> > --- a/xen/arch/x86/acpi/cpufreq/amd-cppc.c
> > +++ b/xen/arch/x86/acpi/cpufreq/amd-cppc.c
> > +    if ( res < 0 )
> > +    {
> > +        printk_once(XENLOG_WARNING
> > +                    "Perf value smaller than minimum value 0: %d\n", res);
> > +        *perf = 0;
> > +        return 0;
> > +    }
> > +    *perf = res;
>
> Considering that amd_cppc_init_msrs() rejects perf values of 0 as invalid, is > 0
> actually valid as an output here?
>

Yes... we are rejecting 0 in there. Maybe I shall return -ERANGE here instead

> Jan

Reply via email to