[PATCH 08/10] KVM: arm64: Add a nVHE-specific SVE VQ reset hypercall

Andrew Scull ascull at google.com
Tue Mar 16 14:24:38 GMT 2021


On Tue, Mar 16, 2021 at 10:13:10AM +0000, Marc Zyngier wrote:
> ZCR_EL2 controls the upper bound for ZCR_EL1, and is set to
> a potentially lower limit when the guest uses SVE.
> 
> In order to restore the SVE state on the EL1 host, we must first
> reset ZCR_EL2 to its original value.
> 
> Provide a hypervall that perform this reset.

Is there a good reason to have an explicit hypercall vs trapping the
host access to SVE and restoring in that event?

It's quite easy to do trap handling at EL2 now and it could let things
be even lazier, if that's any benefit in this case.

Trapping seems to have had a bad rep in other conversations but I'm not
sure the same reasoning applies to this as well, or not.



More information about the linux-arm-kernel mailing list