diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2017-09-04 11:56:37 +0200 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2018-01-02 10:05:46 +0100 |
commit | 70450a9fbe0658e864f882d4351e5bae018b2647 (patch) | |
tree | ad02faf1d2fc3da013eba04f92ab37766c044baf /virt/kvm/arm/vgic/vgic.h | |
parent | 6c1b7521f4a07cc63bbe2dfe290efed47cdb780a (diff) | |
download | linux-70450a9fbe0658e864f882d4351e5bae018b2647.tar.gz linux-70450a9fbe0658e864f882d4351e5bae018b2647.tar.bz2 linux-70450a9fbe0658e864f882d4351e5bae018b2647.zip |
KVM: arm/arm64: Don't cache the timer IRQ level
The timer logic was designed after a strict idea of modeling an
interrupt line level in software, meaning that only transitions in the
level need to be reported to the VGIC. This works well for the timer,
because the arch timer code is in complete control of the device and can
track the transitions of the line.
However, as we are about to support using the HW bit in the VGIC not
just for the timer, but also for VFIO which cannot track transitions of
the interrupt line, we have to decide on an interface between the GIC
and other subsystems for level triggered mapped interrupts, which both
the timer and VFIO can use.
VFIO only sees an asserting transition of the physical interrupt line,
and tells the VGIC when that happens. That means that part of the
interrupt flow is offloaded to the hardware.
To use the same interface for VFIO devices and the timer, we therefore
have to change the timer (we cannot change VFIO because it doesn't know
the details of the device it is assigning to a VM).
Luckily, changing the timer is simple, we just need to stop 'caching'
the line level, but instead let the VGIC know the state of the timer
every time there is a potential change in the line level, and when the
line level should be asserted from the timer ISR. The VGIC can ignore
extra notifications using its validate mechanism.
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic.h')
0 files changed, 0 insertions, 0 deletions