Re: [PATCH] KVM: arm64: Only default to enabling SVE when present

From: Mark Brown
Date: Thu Sep 14 2023 - 06:32:25 EST


On Thu, Sep 14, 2023 at 12:04:29AM +0000, Oliver Upton wrote:
> On Wed, Sep 13, 2023 at 07:34:16PM +0100, Mark Brown wrote:

> > - if (!vcpu_has_sve(vcpu) ||
> > - (vcpu->arch.fp_state != FP_STATE_GUEST_OWNED))
> > + if (cpus_have_final_cap(ARM64_SVE) &&
> > + (!vcpu_has_sve(vcpu) ||
> > + (vcpu->arch.fp_state != FP_STATE_GUEST_OWNED)))

> vcpu_has_sve() already tests system_supports_sve(), so I don't believe
> this hunk is necessary.

That'll mean that the first branch of the || should always return true
on systems without SVE so we'll set CPTR_EL2_TZ, and there's also the
check for guest ownership as well.

Attachment: signature.asc
Description: PGP signature