On 13.10.2025 12:15, Penny Zheng wrote: > The following functions have been referenced in places which is either guarded > with CONFIG_MGMT_HYPERCALLS or CONFIG_MEM_SHARING: > - arch_hvm_save > - arch_hvm_check > - arch_hvm_load > - hvm_save_size > - hvm_save > - hvm_load > - hvm_vmtrace_reset > So they shall be wrapped under OR relationship, otherwise they will become > unreachable codes when MGMT_HYPERCALLS=n && MEM_SHARING=n, and hence violating > Misra rule 2.1. > We move arch_hvm_save(), arch_hvm_check(), arch_hvm_load() and hvm_save_size() > nearer to the left functions, to avoid scattered #ifdef-wrapping. > > Signed-off-by: Penny Zheng <[email protected]>
See my earlier remarks towards MEM_SHARING possibly becoming dependent upon MGMT_HYPERCALLS, at which point things may want doing and/or describing a little differently. Jan
