]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Improve real-mode handling of external interrupts
authorPaul Mackerras <paulus@samba.org>
Wed, 17 Apr 2013 20:31:41 +0000 (20:31 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 26 Apr 2013 18:27:32 +0000 (20:27 +0200)
commit6416b604002b165b279bdc195418a3bbef76f3b7
treeba512ee99fba576f86cdf99a9bce1e8d0420abcc
parent97bd6d6508fac418f0d5f1f424b5fd88a8b89f8d
KVM: PPC: Book3S HV: Improve real-mode handling of external interrupts

This streamlines our handling of external interrupts that come in
while we're in the guest.  First, when waking up a hardware thread
that was napping, we split off the "napping due to H_CEDE" case
earlier, and use the code that handles an external interrupt (0x500)
in the guest to handle that too.  Secondly, the code that handles
those external interrupts now checks if any other thread is exiting
to the host before bouncing an external interrupt to the guest, and
also checks that there is actually an external interrupt pending for
the guest before setting the LPCR MER bit (mediated external request).

This also makes sure that we clear the "ceded" flag when we handle a
wakeup from cede in real mode, and fixes a potential infinite loop
in kvmppc_run_vcpu() which can occur if we ever end up with the ceded
flag set but MSR[EE] off.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/reg.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S