KVM: arm64: Use active guest SVE vector length on guest restore

On restoring guest SVE state, use the guest's current active
vector length. This reduces the amount of restoring for the cases
where the maximum size isn't used. Moreover, it fixes a bug where
the ZCR_EL2 value wasn't being set when restoring the guest
state, potentially corrupting it.

Fixes: 52029198c1ce ("KVM: arm64: Rework SVE host-save/guest-restore")
Signed-off-by: Fuad Tabba <tabba@google.com>
1 file changed