mbox series

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

Message ID 20220123120043.3586018-1-npiggin@gmail.com (mailing list archive)
Headers show
Series KVM: PPC: Book3S: Make LPID/nested LPID allocations dynamic | expand

Message

Nicholas Piggin Jan. 23, 2022, noon UTC
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(-)

Comments

Michael Ellerman May 24, 2022, 10:51 a.m. UTC | #1
On Sun, 23 Jan 2022 22:00:37 +1000, Nicholas Piggin wrote:
> 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.
> 
> [...]

Applied to powerpc/topic/ppc-kvm.

[1/6] KVM: PPC: Remove kvmppc_claim_lpid
      https://git.kernel.org/powerpc/c/18827eeef022df43c1fdeca0fde00ca09405dff1
[2/6] KVM: PPC: Book3S HV: Update LPID allocator init for POWER9, Nested
      https://git.kernel.org/powerpc/c/5d506f159b2b9d0c9bee9bb43ccafb4f291143c2
[3/6] KVM: PPC: Book3S HV: Use IDA allocator for LPID allocator
      https://git.kernel.org/powerpc/c/6ba2a2924dcf6026de5078ba7025248a580d8bde
[4/6] KVM: PPC: Book3S HV Nested: Change nested guest lookup to use idr
      https://git.kernel.org/powerpc/c/c0f00a18e2a8c350a9d263aaf9a2c8bc86caa1b0
[5/6] KVM: PPC: Book3S Nested: Use explicit 4096 LPID maximum
      https://git.kernel.org/powerpc/c/03a2e65f54b3acae37f0992133d2f4d1d35f4200
[6/6] KVM: PPC: Book3S HV: Remove KVMPPC_NR_LPIDS
      https://git.kernel.org/powerpc/c/f104df7d519ff1aa92c7ec87e124c88d4e7574cd

cheers