[PATCH 0/6] KVM: PPC: Book3S: Make LPID/nested LPID allocations dynamic

Nicholas Piggin npiggin at gmail.com
Sun Jan 23 23:00:37 AEDT 2022


With LPID width plumbed through from firmware, LPID allocations can now
be dynamic, which requires changing the fixed sized bitmap. Rather than
just dynamically sizing it, switch to IDA allocator.

Nested KVM stays with a fixed 12-bit LPID width for now, but it is also
moved to a more dynamic allocator. In future if nested LPID width is
advertised to a guest it will be simple to take advantage of it.

Thanks,
Nick

Nicholas Piggin (6):
  KVM: PPC: Remove kvmppc_claim_lpid
  KVM: PPC: Book3S HV: Update LPID allocator init for POWER9, Nested
  KVM: PPC: Book3S HV: Use IDA allocator for LPID allocator
  KVM: PPC: Book3S HV Nested: Change nested guest lookup to use idr
  KVM: PPC: Book3S Nested: Use explicit 4096 LPID maximum
  KVM: PPC: Book3S HV: Remove KVMPPC_NR_LPIDS

 arch/powerpc/include/asm/kvm_book3s_asm.h |   3 -
 arch/powerpc/include/asm/kvm_host.h       |  10 +-
 arch/powerpc/include/asm/kvm_ppc.h        |   1 -
 arch/powerpc/include/asm/reg.h            |   2 -
 arch/powerpc/kvm/book3s_64_mmu_hv.c       |  34 +++---
 arch/powerpc/kvm/book3s_hv_nested.c       | 134 +++++++++++-----------
 arch/powerpc/kvm/book3s_hv_rmhandlers.S   |   8 ++
 arch/powerpc/kvm/e500mc.c                 |   1 -
 arch/powerpc/kvm/powerpc.c                |  30 +++--
 arch/powerpc/mm/init_64.c                 |   3 +
 10 files changed, 121 insertions(+), 105 deletions(-)

-- 
2.23.0



More information about the Linuxppc-dev mailing list