qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] arm: cpu: Soften no-EL2 virt IRQ error cond


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 1/2] arm: cpu: Soften no-EL2 virt IRQ error condition.
Date: Sat, 18 Jul 2015 10:03:42 +0100

On 18 July 2015 at 07:00, Peter Crosthwaite <address@hidden> wrote:
> Replace the hw_error for no-EL2 VIRQ with a LOG_UNIMP. This is more
> accurate and handles the corner case where the user defeatures EL2
> using overrides in a system that would otherwise have EL2
> connectivity.
>
> Signed-off-by: Peter Crosthwaite <address@hidden>
> ---
> I'm primarily interested in getting rid of the hw_error() more than
> anything. If my use-case seems invalid and a stronger error is
> preffered, it can be redone as an assert and the code will still work
> for me.
> ---
>  target-arm/cpu.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index 29b7eca..c4b8448 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -310,8 +310,10 @@ static void arm_cpu_set_irq(void *opaque, int irq, int 
> level)
>      case ARM_CPU_VIRQ:
>      case ARM_CPU_VFIQ:
>          if (!arm_feature(env, ARM_FEATURE_EL2)) {
> -            hw_error("%s: Virtual interrupt line %d with no EL2 support\n",
> -                     __func__, irq);
> +            qemu_log_mask(LOG_UNIMP,
> +                          "%s: Virtual interrupt line %d with no EL2 
> support\n",
> +                          __func__, irq);
> +            return;

My inclination is to say we should assert. If the board
model has put together a system where it creates a CPU
with no EL2 support and then wires up the VIRQ/VFIQ
lines to something, then that sounds like a board model
bug to me. LOG_UNIMP is for "this is legitimate guest
behaviour but we haven't written the code to support it".

thanks
-- PMM



reply via email to

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