On 4/8/21 3:39 AM, Claudio Fontana wrote:
On 3/28/21 6:22 PM, Richard Henderson wrote:
On 3/26/21 1:36 PM, Claudio Fontana wrote:
+int fp_exception_el(CPUARMState *env, int cur_el)
+{
+    return 0;
+}

Oh, I'm pretty sure this should be identical with sve_exception_el, where the
fpu may or may not be enabled for a given cpu state (e.g. lazy fpu switching in
the kvm guest kernel).

Are we really returning constant 0 for kvm before your patch set?


r~


I tried to remember and follow the fp_exception_el in detail,
and _maybe_ the assumption here was the same as I had before, ie: KVM 
arm_hcr_el2_eff() = 0?

So as we changed this assumption for arm_hcr_el2_eff(), and ended up taking the 
whole implementation for KVM too,
we might need to do the same for fp_exception_el?

Yes, take the whole function.

The initial assumption for arm_hcr_el2_eff was correct, until nested virt came along.

The initial assumption for fp_exception_el was simply false. The kernel can and does disable the fpu from time to time. We were simply ignoring this for the purpose of arch_dump or whatever corner cases KVM actually uses this function.


r~

Reply via email to