]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S Nested: Use explicit 4096 LPID maximum
authorNicholas Piggin <npiggin@gmail.com>
Sun, 23 Jan 2022 12:00:42 +0000 (22:00 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 13 May 2022 11:33:34 +0000 (21:33 +1000)
commit02317a87825dd9013ac6f30e3da047126d799304
tree4e848485de0827fb0ce6293835d98990ea99eb43
parent603ed0424921297ad6bc90855379a510fcdb2760
KVM: PPC: Book3S Nested: Use explicit 4096 LPID maximum

Rather than tie this to KVMPPC_NR_LPIDS which is becoming more dynamic,
fix it to 4096 (12-bits) explicitly for now.

kvmhv_get_nested() does not have to check against KVM_MAX_NESTED_GUESTS
because the L1 partition table registration hcall already did that, and
it checks against the partition table size.

This patch also puts all the partition table size calculations into the
same form, using 12 for the architected size field shift and 4 for the
shift corresponding to the partition table entry size.

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