diff options
author | Julien Thierry <[email protected]> | 2019-01-31 14:58:48 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2019-02-06 10:05:19 +0000 |
commit | 85738e05dc38a80921e1e1944e5b835f6668fc30 (patch) | |
tree | bffc41ab17b1cfefba54a3a8bd2a5b57832c9c66 /drivers/usb/cdns3/cdns3-debug.h | |
parent | a9806aa259feb2f6fd582b6342c835a3482fccc6 (diff) |
arm64: kvm: Unmask PMR before entering guest
Interrupts masked by ICC_PMR_EL1 will not be signaled to the CPU. This
means that hypervisor will not receive masked interrupts while running a
guest.
We need to make sure that all maskable interrupts are masked from the
time we call local_irq_disable() in the main run loop, and remain so
until we call local_irq_enable() after returning from the guest, and we
need to ensure that we see no interrupts at all (including pseudo-NMIs)
in the middle of the VM world-switch, while at the same time we need to
ensure we exit the guest when there are interrupts for the host.
We can accomplish this with pseudo-NMIs enabled by:
(1) local_irq_disable: set the priority mask
(2) enter guest: set PSTATE.I
(3) clear the priority mask
(4) eret to guest
(5) exit guest: set the priotiy mask
clear PSTATE.I (and restore other host PSTATE bits)
(6) local_irq_enable: clear the priority mask.
Signed-off-by: Julien Thierry <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Reviewed-by: Marc Zyngier <[email protected]>
Reviewed-by: Christoffer Dall <[email protected]>
Cc: Christoffer Dall <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions