linux_dsm_epyc7002/arch/arm64/kvm/hyp
Julien Thierry 85738e05dc 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 <julien.thierry@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Cc: Christoffer Dall <christoffer.dall@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: kvmarm@lists.cs.columbia.edu
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-02-06 10:05:19 +00:00
..
debug-sr.c KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags 2018-05-25 12:28:13 +01:00
entry.S arm64: entry: Place an SB sequence following an ERET instruction 2018-12-06 16:47:05 +00:00
fpsimd.S arm64: KVM: Implement fpsimd save/restore 2015-12-14 11:30:41 +00:00
hyp-entry.S arm64: entry: Place an SB sequence following an ERET instruction 2018-12-06 16:47:05 +00:00
Makefile kvm: arm64: Configure VTCR_EL2 per VM 2018-10-01 13:50:29 +01:00
switch.c arm64: kvm: Unmask PMR before entering guest 2019-02-06 10:05:19 +00:00
sysreg-sr.c KVM updates for v4.20 2018-10-25 17:57:35 -07:00
tlb.c arm64: KVM: Handle ARM erratum 1165522 in TLB invalidation 2018-12-10 12:20:42 +00:00
vgic-v2-cpuif-proxy.c arm64: KVM: Consistently advance singlestep when emulating instructions 2018-12-18 14:11:37 +00:00