On 21/10/2024 1:45 am, Daniel P. Smith wrote: > The purpose of struct boot_module is to encapsulate the state of boot module > as > it is processed by Xen. Locating boot module state struct boot_module reduces > the number of global variables as well as the number of state variables that > must be passed around. It also lays the groundwork for hyperlaunch mult-domain > construction, where multiple instances of state variables like headroom will > be > needed. > > Signed-off-by: Daniel P. Smith <dpsm...@apertussolutions.com> > Reviewed-by: Jason Andryuk <jason.andr...@amd.com>
Actually, based on the observation in the subsequent patch about pulling the initial_image deletion earlier in the series, I'm going to recommend something else here. You should fully remove the mod pointer in __start_xen() (i.e. convert mod[] references to bi->mods[]) before starting to remove other variables such as module_headroom here. This is largely doable because microcode and xsm both take the mbi pointer and map mbi->module_addr themselves, rather than take __start_xen()'s pointer. Again, this reduces churn in the series, and minimises the extent to which we're operating on multiple representations of the same data. ~Andrew