]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV Nested: Stop forwarding all HFUs to L1
authorFabiano Rosas <farosas@linux.ibm.com>
Wed, 11 Aug 2021 16:00:41 +0000 (02:00 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Aug 2021 06:37:18 +0000 (16:37 +1000)
commit359af2f9b5569d18db71df149b69d8f7b42fcc13
tree45e10310b1fd320fdbe641447ce19de70c6255e6
parenta24818ba9d7d242f8cf069515691175bdc720951
KVM: PPC: Book3S HV Nested: Stop forwarding all HFUs to L1

If the nested hypervisor has no access to a facility because it has
been disabled by the host, it should also not be able to see the
Hypervisor Facility Unavailable that arises from one of its guests
trying to access the facility.

This patch turns a HFU that happened in L2 into a Hypervisor Emulation
Assistance interrupt and forwards it to L1 for handling. The ones that
happened because L1 explicitly disabled the facility for L2 are still
let through, along with the corresponding Cause bits in the HFSCR.

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
[np: move handling into kvmppc_handle_nested_exit]
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210811160134.904987-8-npiggin@gmail.com
arch/powerpc/kvm/book3s_hv.c