linux/arch
Paul Mackerras e3bbbbfa13 KVM: PPC: Book3S HV: Consolidate code that checks reason for wake from nap
Currently in book3s_hv_rmhandlers.S we have three places where we
have woken up from nap mode and we check the reason field in SRR1
to see what event woke us up.  This consolidates them into a new
function, kvmppc_check_wake_reason.  It looks at the wake reason
field in SRR1, and if it indicates that an external interrupt caused
the wakeup, calls kvmppc_read_intr to check what sort of interrupt
it was.

This also consolidates the two places where we synthesize an external
interrupt (0x500 vector) for the guest.  Now, if the guest exit code
finds that there was an external interrupt which has been handled
(i.e. it was an IPI indicating that there is now an interrupt pending
for the guest), it jumps to deliver_guest_interrupt, which is in the
last part of the guest entry code, where we synthesize guest external
and decrementer interrupts.  That code has been streamlined a little
and now clears LPCR[MER] when appropriate as well as setting it.

The extra clearing of any pending IPI on a secondary, offline CPU
thread before going back to nap mode has been removed.  It is no longer
necessary now that we have code to read and acknowledge IPIs in the
guest exit path.

This fixes a minor bug in the H_CEDE real-mode handling - previously,
if we found that other threads were already exiting the guest when we
were about to go to nap mode, we would branch to the cede wakeup path
and end up looking in SRR1 for a wakeup reason.  Now we branch to a
point after we have checked the wakeup reason.

This also fixes a minor bug in kvmppc_read_intr - previously it could
return 0xff rather than 1, in the case where we find that a host IPI
is pending after we have cleared the IPI.  Now it returns 1.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-01-27 16:01:08 +01:00
..
alpha kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
arc kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
arm Fix percpu vmalloc allocations 2013-11-19 10:43:05 +02:00
arm64 Here are the 3.13 KVM changes. There was a lot of work on the PPC 2013-11-15 13:51:36 +09:00
avr32 avr32: handle pgtable_page_ctor() fail 2013-11-15 09:32:17 +09:00
blackfin kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
c6x DeviceTree updates for 3.13. This is a bit larger pull request than 2013-11-12 16:52:17 +09:00
cris cris: handle pgtable_page_ctor() fail 2013-11-15 09:32:17 +09:00
frv frv: handle pgtable_page_ctor() fail 2013-11-15 09:32:17 +09:00
hexagon kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
ia64 Here are the 3.13 KVM changes. There was a lot of work on the PPC 2013-11-15 13:51:36 +09:00
m32r kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
m68k m68k: handle pgtable_page_ctor() fail 2013-11-15 09:32:17 +09:00
metag kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
microblaze microblaze: add missing pgtable_page_ctor/dtor calls 2013-11-15 09:32:16 +09:00
mips Here are the 3.13 KVM changes. There was a lot of work on the PPC 2013-11-15 13:51:36 +09:00
mn10300 kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
openrisc openrisc: add missing pgtable_page_ctor/dtor calls 2013-11-15 09:32:16 +09:00
parisc kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
powerpc KVM: PPC: Book3S HV: Consolidate code that checks reason for wake from nap 2014-01-27 16:01:08 +01:00
s390 Here are the 3.13 KVM changes. There was a lot of work on the PPC 2013-11-15 13:51:36 +09:00
score score: handle pgtable_page_ctor() fail 2013-11-15 09:32:18 +09:00
sh kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
sparc kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
tile kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00
um um: handle pgtable_page_ctor() fail 2013-11-15 09:32:19 +09:00
unicore32 unicore32: handle pgtable_page_ctor() fail 2013-11-15 09:32:19 +09:00
x86 kvm: mmu: delay mmu audit activation 2013-11-20 11:12:56 +02:00
xtensa xtensa: use buddy allocator for PTE table 2013-11-15 09:32:19 +09:00
.gitignore
Kconfig kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS 2013-11-15 09:32:22 +09:00