Re: [RFC][PATCH 09/34] x86/cpu: Introduce address configuration structure

From: Huang, Kai
Date: Tue Feb 27 2024 - 18:47:53 EST




On 23/02/2024 7:39 am, Dave Hansen wrote:

From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

Right now, 'boot_cpu_data' is established in a very ad hoc way. Random
bits of the initialization code write random things to it, either
blowing away state or tweaking it as they see fit. It's madness.

Add some more structure to the process.

Introduce an "address configuration" structure just for the boot CPU.
This will be used to establish system-wide address space configuration.
It is written while bringing up the boot CPU and then read *ONCE* to
establish the configuration.



From the above description, ...

+struct x86_addr_config bsp_addr_config;
+

.. this can be __ro_after_init?

Maybe I am missing something, but if it cannot be annotated with __ro_after_init here, IMHO it would be helpful to call out in the changelog.