[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/intc/arm_gicv3_cpuif: Fix virtual irq number check in icv
From: |
Peter Maydell |
Subject: |
Re: [PATCH] hw/intc/arm_gicv3_cpuif: Fix virtual irq number check in icv_[dir|eoir]_write |
Date: |
Mon, 5 Jul 2021 14:32:04 +0100 |
On Sat, 3 Jul 2021 at 00:37, Ricardo Koller <ricarkol@google.com> wrote:
>
> icv_eoir_write() and icv_dir_write() ignore invalid virtual IRQ numbers
> (like LPIs). The issue is that these functions check against the number
> of implemented IRQs (QEMU's default is num_irq=288) which can be lower
> than the maximum virtual IRQ number (1020 - 1). The consequence is that
> if a hypervisor creates an LR for an IRQ between 288 and 1020, then the
> guest is unable to deactivate the resulting IRQ. Note that other
> functions that deal with large IRQ numbers, like icv_iar_read, check
> against 1020 and not against num_irq.
>
> Fix the checks by using GICV3_MAXIRQ (1020) instead of the number of
> implemented IRQs.
>
> Signed-off-by: Ricardo Koller <ricarkol@google.com>
> ---
> hw/intc/arm_gicv3_cpuif.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to target-arm.next, thanks.
-- PMM