Re: [PATCH v2 1/8] x86/xen/pv: Don't setup runstate area too early
From: Teddy Astie
Date: Mon Oct 19 2026 - 05:06:54 EST
Le 16/10/2026 à 20:04, Andrew Cooper a écrit :
On 16/10/2026 6:33 pm, Andrew Cooper wrote:
On 16/10/2026 6:06 pm, Teddy Astie wrote:
This is no longer required since [1].This isn't really correct.
At this moment of boot, per_cpu areas are not initialized, which prevents
using VCPUOP_register_runstate_phys_area as per_cpu_ptr_to_phys() would
misbehave in this case.
The per-cpu area for the BSP is within the main image, which is why the
logic functions today. What's missing is the call to
pcpu_setup_first_chunk() which tells per_cpu_ptr_to_phys() about where
the BSP data is.
I think you want to say:
"A future change wants to use per_cpu_ptr_to_phys() in
xen_setup_runstate_info(), but this call is too early. It turns out to
be no longer required since ..."
[1] 8a22b9996b00 ("xen: drop xen_sched_clock in favour of using plain wallclock time")Missing SoB.
---
~Andrew
But this does pose another question... Linux only ever registers time
referencing vCPU 0. Why are the targets of the registration in the
per-cpu area? That's presumably wasted space on all APs.
Yes but only for this early PV case, there are other places where xen_setup_runstate_info() is called for other APs.
But looking at it, there may be redundant calls of xen_setup_runstate_info().
~Andrew
Teddy
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature