KVM: PPC: Book3S HV nestedv2: Register the VPA with the L0
authorJordan Niethe <jniethe5@gmail.com>
Fri, 1 Dec 2023 13:26:15 +0000 (18:56 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Dec 2023 12:33:08 +0000 (23:33 +1100)
commitdb1dcfae1dae3c042f348175ac0394e2fc14b1b3
tree3c06618993bb67d475199bbd59ba54f36c31edca
parent4bc8ff6f170c78f64446c5d5f9ef6771eefd3416
KVM: PPC: Book3S HV nestedv2: Register the VPA with the L0

In the nestedv2 case, the L1 may register the L2's VPA with the L0. This
allows the L0 to manage the L2's dispatch count, as well as enable
possible performance optimisations by seeing if certain resources are
not being used by the L2 (such as the PMCs).

Use the H_GUEST_SET_STATE call to inform the L0 of the L2's VPA
address. This can not be done in the H_GUEST_VCPU_RUN input buffer.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231201132618.555031-11-vaibhav@linux.ibm.com
arch/powerpc/include/asm/kvm_book3s_64.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_nestedv2.c