Re: [PATCH v2 1/3] s390/cpufeature: rework to allow more than only hwcap bits

Heiko Carstens
2022-07-15T09:32:19Z

On Fri, Jul 15, 2022 at 09:59:49AM +0200, Hendrik Brueckner wrote:
> Regarding facility bits for cpu features: Initially, I used
> MSA hwcap to cover all ciphers among all hw generations. With facility bit
> checks, it makes more sense to fine-tune and load based on respective
> MSA level or CPACF functions that is required for ciphers/hashes.
...
> > -module_cpu_feature_match(MSA, init);
> > +module_cpu_feature_match(S390_CPU_FEATURE_MSA, init);
> > module_exit(fini);
>
> which becomes automatically loaded if (any) MSA is available and then
> performs this check:
>
> cpacf_query_func(CPACF_KIMD, CPACF_KIMD_SHA_512
>
> which in the worst case would fail.
>
> This might be a very useful follow-up patch to remove those mod init checks
> into the cpu feature.

Yes, that makes a lot of sense. Thanks for suggesting this!