]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: PPC: Book3S: PR: Rework irq disabling
authorAlexander Graf <agraf@suse.de>
Sun, 12 Aug 2012 23:04:19 +0000 (01:04 +0200)
committerAlexander Graf <agraf@suse.de>
Tue, 14 Aug 2012 22:29:15 +0000 (00:29 +0200)
commitee11ee5fec09d65211878ef0b8953b80d95af45c
treebf909b04ce41fd6d6b7ea02d8cf033dc8998293b
parent3f94df6a255f4d327630204ae183365bf6dbe08b
KVM: PPC: Book3S: PR: Rework irq disabling

Today, we disable preemption while inside guest context, because we need
to expose to the world that we are not in a preemptible context. However,
during that time we already have interrupts disabled, which would indicate
that we are in a non-preemptible context.

The reason the checks for irqs_disabled() fail for us though is that we
manually control hard IRQs and ignore all the lazy EE framework. Let's
stop doing that. Instead, let's always use lazy EE to indicate when we
want to disable IRQs, but do a special final switch that gets us into
EE disabled, but soft enabled state. That way when we get back out of
guest state, we are immediately ready to process interrupts.

This simplifies the code drastically and reduces the time that we appear
as preempt disabled.

Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/book3s_rmhandlers.S
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/powerpc.c