• Dave Martin's avatar
    KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST · 8e3c54c8
    Dave Martin authored
    
    
    This patch includes the SVE register IDs in the list returned by
    KVM_GET_REG_LIST, as appropriate.
    
    On a non-SVE-enabled vcpu, no new IDs are added.
    
    On an SVE-enabled vcpu, IDs for the FPSIMD V-registers are removed
    from the list, since userspace is required to access the Z-
    registers instead in order to access the V-register content.  For
    the variably-sized SVE registers, the appropriate set of slice IDs
    are enumerated, depending on the maximum vector length for the
    vcpu.
    
    As it currently stands, the SVE architecture never requires more
    than one slice to exist per register, so this patch adds no
    explicit support for enumerating multiple slices.  The code can be
    extended straightforwardly to support this in the future, if
    needed.
    Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
    Reviewed-by: default avatarJulien Thierry <julien.thierry@arm.com>
    Tested-by: default avatarzhang.lei <zhang.lei@jp.fujitsu.com>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    8e3c54c8
guest.c 18.6 KB