On 15.01.2025 09:18, Penny, Zheng wrote: >> -----Original Message----- >> From: Jan Beulich <jbeul...@suse.com> >> Sent: Thursday, January 9, 2025 5:59 PM >> >> On 03.12.2024 09:11, Penny Zheng wrote: >>> --- a/xen/arch/x86/platform_hypercall.c >>> +++ b/xen/arch/x86/platform_hypercall.c >>> @@ -574,6 +574,12 @@ ret_t do_platform_op( >>> >>> case XEN_PM_CPPC: >>> { >>> + if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_CPPC) ) >>> + { >>> + ret = -ENOSYS; >> >> ENOSYS isn't appropriate for such a situation. > > I've mirrored the return value, so maybe -EINVAL is better?
Generally most wrong uses of ENOSYS want replacing by EOPNOTSUPP. Jan