On Wed, Mar 18, 2026 at 05:44:10PM +0000, Jean-Philippe Brucker wrote:
> On Fri, Mar 06, 2026 at 05:01:01PM +0000, Mark Brown wrote:

> > +#define kvm_has_sme(kvm)   (system_supports_sme() &&               \
> > +                            test_bit(KVM_ARCH_FLAG_GUEST_HAS_SME, 
> > &(kvm)->arch.flags))

> Can the GUEST_HAS_SME flag ever be set if !system_supports_sme()?  Seems
> like it depends on KVM_ARM_VCPU_SME feature which can't be set if the
> system doesn't support it, so the system_supports_sme() check is redundant

It can't be, the reason for the system_supports_sme() check is that SME
is a build time option as well as a runtime one.  If the kernel is built
without SME support then the compiler can remove the code at build time,
the existing code does the same thing for at least SVE.

Attachment: signature.asc
Description: PGP signature

Reply via email to