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)
commit7c3ded5735141ff4d049747c9f76672a8b737c49
tree45e10310b1fd320fdbe641447ce19de70c6255e6
parent8b210a880b35ba75eb42b79dfd65e369c1feb119
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