On 22.05.2023 12:20, Luca Fancellu wrote: > > >> On 18 May 2023, at 19:30, Julien Grall <jul...@xen.org> wrote: >> >> Hi Luca, >> >> One more remark. >> >> On 24/04/2023 07:02, Luca Fancellu wrote: >>> #else /* !CONFIG_ARM64_SVE */ >>> @@ -46,6 +50,15 @@ static inline unsigned int get_sys_vl_len(void) >>> return 0; >>> } >>> +static inline int sve_context_init(struct vcpu *v) >>> +{ >>> + return 0; >> >> The call is protected by is_domain_sve(). So I think we want to return an >> error just in case someone is calling it outside of its intended use. > > Regarding this one, since it should not be called when SVE is not enabled, > are you ok if I’ll do this: > > static inline int sve_context_init(struct vcpu *v) > { > ASSERT_UNREACHABLE(); > return 0; > }
Do you need such a stub in the first place? I.e. can't you arrange for DCE to take care of unreachable function calls, thus letting you get away with just an always-visible declaration (and no definition when !ARM64_SVE)? Jan