]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Add KVM guest doorbell restrictions
authorNicholas Piggin <npiggin@gmail.com>
Sun, 26 Jul 2020 03:51:55 +0000 (13:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jul 2020 11:02:10 +0000 (21:02 +1000)
commitdfec82094d94842910e2832a6530609b8dd581f9
tree568f339e22efacf3f857e8ed04e926e9a97f2bf5
parent6b62439c00a77ee6a09d588880f8ff59f9736990
powerpc/pseries: Add KVM guest doorbell restrictions

KVM guests have certain restrictions and performance quirks when using
doorbells. This patch moves the EPAPR KVM guest test so it can be shared
with PSERIES, and uses that in doorbell setup code to apply the KVM
guest quirks and  improves IPI performance for two cases:

 - PowerVM guests may now use doorbells even if they are secure.

 - KVM guests no longer use doorbells if XIVE is available.

There is a valid complaint that "KVM guest" is not a very reasonable
thing to test for, it's preferable for the hypervisor to advertise
particular behaviours to the guest so they could change if the
hypervisor implementation or configuration changes. However in this case
we were already assuming a KVM guest worst case, so this patch is about
containing those quirks. If KVM later advertises fast doorbells, we
should test for that and override the quirks.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200726035155.1424103-4-npiggin@gmail.com
arch/powerpc/include/asm/firmware.h
arch/powerpc/include/asm/kvm_para.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/firmware.c
arch/powerpc/platforms/pseries/smp.c