[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] target/ppc: powerpc_excp: Guard ALIGNMENT interrupt with CON
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] target/ppc: powerpc_excp: Guard ALIGNMENT interrupt with CONFIG_TCG |
Date: |
Thu, 9 Dec 2021 10:14:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 |
On 12/9/21 00:06, Fabiano Rosas wrote:
> We cannot have TCG code in powerpc_excp because the function is called
> from kvm-only code via ppc_cpu_do_interrupt:
>
> ../target/ppc/excp_helper.c:463:29: error: implicit declaration of
> function ‘cpu_ldl_code’ [-Werror=implicit-function-declaration]
>
> Fortunately, the Alignment interrupt is not among the ones dispatched
> from kvm-only code, so we can keep it out of the disable-tcg build for
> now.
>
> Fixes: 336e91f853 ("target/ppc: Move SPR_DSISR setting to powerpc_excp")
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
>
> ---
>
> Perhaps we could make powerpc_excp TCG only and have a separate
> function that only knows the two interrupts that we use with KVM
> (Program, Machine check). But for now this fix will do, I think.
If KVM only uses 2 exception vectors, you could guard the
enum in target/ppc/cpu.h using #ifdef'ry. While making the
include uglier, it will helps to catch vector misused at
compile time.
> ---
> target/ppc/excp_helper.c | 2 ++
> 1 file changed, 2 insertions(+)