[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] hw/intc/arm_gicv3_cpuif: Tolerate spurious EOIR writes
From: |
Alex Bennée |
Subject: |
Re: [PATCH v2] hw/intc/arm_gicv3_cpuif: Tolerate spurious EOIR writes |
Date: |
Mon, 07 Jun 2021 11:23:31 +0100 |
User-agent: |
mu4e 1.5.13; emacs 28.0.50 |
Jean-Philippe Brucker <jean-philippe@linaro.org> writes:
> Commit 382c7160d1cd ("hw/intc/arm_gicv3_cpuif: Fix EOIR write access
> check logic") added an assert_not_reached() if the guest writes the EOIR
> register while no interrupt is active.
>
> It turns out some software does this: EDK2, in
> GicV3ExitBootServicesEvent(), unconditionally write EOIR for all
> interrupts that it manages. This now causes QEMU to abort when running
> UEFI on a VM with GICv3. Although it is UNPREDICTABLE behavior and EDK2
> does need fixing, the punishment seems a little harsh, especially since
> icc_eoir_write() already tolerates writes of nonexistent interrupt
> numbers. Display a guest error and tolerate spurious EOIR writes.
>
> Fixes: 382c7160d1cd ("hw/intc/arm_gicv3_cpuif: Fix EOIR write access check
> logic")
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Xen seems good at triggering this as well...
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée