Skip to content

KVM TLB flushing improvements (for radix)

Nicholas Piggin kvm-ppc linuxppc-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v1 RFC5 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Fixed a bug where I mixed up PRS values, leading to guest page fault hangs.
- Fixed up the hash cases that still need to be done in real-mode.
- Dropped the hash changes including the interesting case of a hash tlbie issued by a radix host, for mixed mode support.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: PPC: Book3S HV: radix use correct tlbie sequence in kvmppc_radix_tlbie_pagearch/powerpc/kvm/book3s_64_mmu_radix.c+1 -10 replies
2/5powerpc/mm/radix: implement LPID based TLB flushes to be used by KVMarch/powerpc/include/asm/book3s/64/tlbflush-radix.h arch/powerpc/mm/tlb-radix.c+166 -00 replies
3/5KVM: PPC: Book3S HV: radix use the Linux TLB flush function in kvmppc_radix_tlbie_pagarch/powerpc/kvm/book3s_64_mmu_radix.c+7 -190 replies
4/5KVM: PPC: Book3S HV: radix handle process scoped LPID flush in C, with relocation onarch/powerpc/kvm/book3s_hv.c arch/powerpc/kvm/book3s_hv_rmhandlers.S+32 -70 replies
5/5KVM: PPC: Book3S HV: radix do not clear partition scoped page table when page fault rarch/powerpc/kvm/book3s_64_mmu_radix.c+33 -191 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/5] KVM TLB flushing improvements (for radix)

This series moves some of the radix mode TLB flushing into powerpc/mm, which allows them them to implement the powerpc:tlbie tracepoints for KVM invalidations.

This also fixes a partition scoped page fault performance issue that was found by looking at partition scoped tlbie traces.

Since v1:
- Fixed a bug where I mixed up PRS values, leading to guest page fault hangs.
- Fixed up the hash cases that still need to be done in real-mode.
- Dropped the hash changes including the interesting case of a hash tlbie issued by a radix host, for mixed mode support.

This has survived some stress testing over the weekend now, so it should be ready for wider review.

Thanks,
Nick

Nicholas Piggin (5):
KVM: PPC: Book3S HV: radix use correct tlbie sequence in
kvmppc_radix_tlbie_page
powerpc/mm/radix: implement LPID based TLB flushes to be used by KVM
KVM: PPC: Book3S HV: radix use the Linux TLB flush function in
kvmppc_radix_tlbie_page
KVM: PPC: Book3S HV: radix handle process scoped LPID flush in C, with
relocation on
KVM: PPC: Book3S HV: radix do not clear partition scoped page table
when page fault races with other vCPUs.

 .../include/asm/book3s/64/tlbflush-radix.h    |   6 +
 arch/powerpc/kvm/book3s_64_mmu_radix.c        |  78 ++++-----
 arch/powerpc/kvm/book3s_hv.c                  |  26 +++
 arch/powerpc/kvm/book3s_hv_rmhandlers.S       |  13 +-
 arch/powerpc/mm/tlb-radix.c                   | 160 ++++++++++++++++++
 5 files changed, 238 insertions(+), 45 deletions(-)
Signature · 1 line
2.17.0