On 13 November 2018 at 16:52, Samuel Ortiz <sa...@linux.intel.com> wrote:
> do_interrupt, do_unaligned_access, do_transaction_failed and debug_excp
> are only relevant in the TCG context, so we should not define them
> when TCG is disabled.
>
> Signed-off-by: Samuel Ortiz <sa...@linux.intel.com>
> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> Reviewed-by: Robert Bradford <robert.bradf...@intel.com>
> ---
>  target/arm/cpu.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 60411f6bfe..fb2e5d430e 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -1444,7 +1444,7 @@ static void arm_v7m_class_init(ObjectClass *oc, void 
> *data)
>  {
>      CPUClass *cc = CPU_CLASS(oc);
>
> -#ifndef CONFIG_USER_ONLY
> +#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
>      cc->do_interrupt = arm_v7m_cpu_do_interrupt;
>  #endif
>
> @@ -2061,9 +2061,14 @@ static void arm_cpu_class_init(ObjectClass *oc, void 
> *data)
>  #ifdef CONFIG_USER_ONLY
>      cc->handle_mmu_fault = arm_cpu_handle_mmu_fault;
>  #else
> +
> +#ifdef CONFIG_TCG
>      cc->do_interrupt = arm_cpu_do_interrupt;
As noted on an earlier patch, this breaks KVM injection of
interrupts into the guest.

>      cc->do_unaligned_access = arm_cpu_do_unaligned_access;
>      cc->do_transaction_failed = arm_cpu_do_transaction_failed;
> +    cc->debug_excp_handler = arm_debug_excp_handler;
> +#endif

thanks
-- PMM

Reply via email to