[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v5 20/44] x86/boot: convert xsm policy loading to struct boot_module
On 10/8/24 12:13, Jason Andryuk wrote: On 2024-10-06 17:49, Daniel P. Smith wrote:Iterate through the unclaimed struct boot_module to see if any are an XSM FLASKpolicy. If one is located, mark it as an xsm policy. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>@@ -161,6 +162,14 @@ int __init xsm_multiboot_init( } ret = xsm_core_init(policy_buffer, policy_size); + if ( ret == 0 ) + { + int idx = first_boot_module_index(bi, BOOTMOD_XSM_POLICY); ++ /* If the policy was loaded from a boot module, mark it consumed */+ if ( idx >= 0 ) + bi->mods[idx].flags |= BOOTMOD_FLAG_X86_CONSUMED;Maybe xsm_multiboot_policy_init() should return the idx used instead of having a second search? (Also, xsm_multiboot_policy_init() can't fail?) I was debating on whether to make similar changes because the existing logic just seems sub-optimal. Currently I am looking to just write an independent XSM patch that looks at both this function and the device tree version of the function. Specifically, looking to use the IS_ENABLED() macro instead of #ifdef to reduce code, provide better code coverage, and to refine the logic. + } bootstrap_map(NULL); return 0;The other changes look okay. R-b then? v/r, dps
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |