Re: [PATCH] xen/acpi-processor: fix _CST detection using undersized evaluation buffer

From: David Thomson (dt@xxxxxxxxx)

Date: Tue Feb 24 2026 - 04:13:06 EST


> I understand you reflect original behavior in this regard, but why involve any
> ACPI function here at all when pblk is non-zero? I.e. why not swap the operands
> of && ? Object evaluation could have wanted side effects (in which case,
> however, some different change would be needed here), but checking for method
> presence surely hasn't.
>
> Jan
>
You're right on both counts. The original evaluate_object() call at least had the appearance of wanting the result (even though buf was undersized and the result was never used). A pure presence check has no such pretense. Swapping the operands is the obvious improvement. I think dropping the _CST check entirely is also defensible since C-state support is confirmed when pblk is set. But I'm not certain there's no edge case where pblk is non-zero and _CST is also not present, so I'd defer to your judgement.

Would you prefer:
a) if (pblk && acpi_has_method(handle, "_CST"))
b) just if (pblk)

Happy to send a v2 either way.

DT