• Dave Martin's avatar
    arm64/sve: Enable SVE state tracking for non-task contexts · 04950674
    Dave Martin authored
    The current FPSIMD/SVE context handling support for non-task (i.e.,
    KVM vcpu) contexts does not take SVE into account.  This means that
    only task contexts can safely use SVE at present.
    
    In preparation for enabling KVM guests to use SVE, it is necessary
    to keep track of SVE state for non-task contexts too.
    
    This patch adds the necessary support, removing assumptions from
    the context switch code about the location of the SVE context
    storage.
    
    When binding a vcpu context, its vector length is arbitrarily
    specified as SVE_VL_MIN for now.  In any case, because TIF_SVE is
    presently cleared at vcpu context bind time, the specified vector
    length will not be used for anything yet.  In later patches TIF_SVE
    will be set here as appropriate, and the appropriate maximum vector
    length for the vcpu will be passed when binding.
    Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
    Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    Reviewed-by: default avatarJulien Grall <julien.grall@arm.com>
    Tested-by: default avatarzhang.lei <zhang.lei@jp.fujitsu.com>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    04950674
fpsimd.h 4.75 KB