]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV P9: Demand fault EBB facility registers
authorNicholas Piggin <npiggin@gmail.com>
Tue, 23 Nov 2021 09:52:14 +0000 (19:52 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Nov 2021 10:09:01 +0000 (21:09 +1100)
commit9a6631224ed53f1df0a1683a0ff6c4e555322532
treea87f1b4fb98324206da8621d996148452ce4a697
parent32b6bd8c2c0162029a09679564a4e60a0bd4e8f8
KVM: PPC: Book3S HV P9: Demand fault EBB facility registers

Use HFSCR facility disabling to implement demand faulting for EBB, with
a hysteresis counter similar to the load_fp etc counters in context
switching that implement the equivalent demand faulting for userspace
facilities.

This speeds up guest entry/exit by avoiding the register save/restore
when a guest is not frequently using them. When a guest does use them
often, there will be some additional demand fault overhead, but these
are not commonly used facilities.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211123095231.1036501-37-npiggin@gmail.com
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_p9_entry.c