]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
xen/acpi: only evaluate Processor objects matching online CPUs
authorRoger Pau Monné <royger@FreeBSD.org>
Tue, 29 Nov 2022 15:21:51 +0000 (16:21 +0100)
committerRoger Pau Monné <royger@FreeBSD.org>
Tue, 29 Nov 2022 15:36:34 +0000 (16:36 +0100)
commitbc9a5b049797fb7484dc1448f5d806955499f1f0
tree3cbdae5c799600eb21f409ff7dcb401340dd9eab
parentbad602850e56d9e3b4900c0063a40dd29ea448fe
xen/acpi: only evaluate Processor objects matching online CPUs

Current Xen Processor driver will evaluate any Processor object on the
ACPI tables regardless of whether the processor is online or not.
Avoid doing so for processors that are not online, as evaluating
methods of processors that are not online could lead to accesses to
invalid memory, and in any case the data that the driver fetches from
the Processor ACPI object only makes sense for processors that are
online.

Note the CPU related data fetched from Xen using XENPF_get_cpuinfo
hypercall could be cached, I leave that as a future optimization.

Sponsored by: Citrix Systems R&D
Fixes: b93f47eaeef7 ('xen/acpi: upload Cx and Px data to Xen')
sys/dev/xen/cpu/xen_acpi_cpu.c