qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v12 17/65] target/arm: tcg: add stubs for some helpers for non-


From: Richard Henderson
Subject: Re: [RFC v12 17/65] target/arm: tcg: add stubs for some helpers for non-tcg builds
Date: Thu, 8 Apr 2021 07:35:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

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

[Prev in Thread] Current Thread [Next in Thread]