Skip to content

KVM: PPC: Book3S PR: Fixes for AIL and SCV

Nicholas Piggin kvm linuxppc-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 5 repliesIn review
  2. v33 patches 2 repliesSuperseded
  3. v22 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches3 repliesSuperseded

Changes in v4 from the cover letter

- Rebased, cc kvm@

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: PPC: Book3S PR: Disable SCV when AIL could be disabledarch/powerpc/kernel/exceptions-64s.S arch/powerpc/kernel/setup_64.c arch/powerpc/kvm/Kconfig +1 more+58 -90 replies
2/3KVM: PPC: Book3S PR: Disallow AIL != 0arch/powerpc/kvm/book3s_pr_papr.c+20 -00 replies
3/3KVM: PPC: Add KVM_CAP_PPC_AIL_MODE_3Documentation/virt/kvm/api.rst arch/powerpc/include/asm/setup.h arch/powerpc/kvm/powerpc.c +3 more+46 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchFabiano Rosas
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/3] KVM: PPC: Book3S PR: Fixes for AIL and SCV

Paolo,

Patch 3 requires a KVM_CAP_PPC number allocated. QEMU maintainers are happy with it (link in changelog) just waiting on KVM upstreaming. Do you have objections to the series going to ppc/kvm tree first, or another option is you could take patch 3 alone first (it's relatively independent of the other 2) and ppc/kvm gets it from you?

The first patch in this series fixes a KVM PR host crash due to a guest executing the scv instruction or with a pseries SMP host, the host CPUs executing the scv instruction while a PR guest is running.

The second patch fixes unimplemented H_SET_MODE AIL modes by returning failure from the hcall rather than succeeding but not implementing the required behaviour. This works around missing host scv support for scv-capable Linux guests by causing them to disable the facility.

The third patch adds a new KVM CAP to go with some QEMU work to get the AIL differences properly represented in QEMU. The third patch will need to allocate a KVM CAP number and merged with upstream KVM tree before the QEMU side goes ahead.

Changes since v2:
- Fix fscr compile error in patch 1.
- Add patch 3.

Changes since v3:
- Rebased, cc kvm@

Thanks,
Nick

Nicholas Piggin (3):
KVM: PPC: Book3S PR: Disable SCV when AIL could be disabled
KVM: PPC: Book3S PR: Disallow AIL != 0
KVM: PPC: Add KVM_CAP_PPC_AIL_MODE_3

 Documentation/virt/kvm/api.rst         | 14 +++++++++++++
 arch/powerpc/include/asm/setup.h       |  2 ++
 arch/powerpc/kernel/exceptions-64s.S   |  4 ++++
 arch/powerpc/kernel/setup_64.c         | 28 ++++++++++++++++++++++++++
 arch/powerpc/kvm/Kconfig               |  9 +++++++++
 arch/powerpc/kvm/book3s_pr.c           | 26 +++++++++++++++---------
 arch/powerpc/kvm/book3s_pr_papr.c      | 20 ++++++++++++++++++
 arch/powerpc/kvm/powerpc.c             | 17 ++++++++++++++++
 arch/powerpc/platforms/pseries/setup.c | 12 ++++++++++-
 include/uapi/linux/kvm.h               |  1 +
 tools/include/uapi/linux/kvm.h         |  1 +
 11 files changed, 124 insertions(+), 10 deletions(-)
Signature · 1 line
2.23.0