Skip to content

KVM: PPC: HIOR and sregs fixup

Alexander Graf kvm kvm-ppc 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Revert "KVM: PPC: Add support for explicit HIOR setting"arch/powerpc/include/asm/kvm.h arch/powerpc/include/asm/kvm_book3s.h arch/powerpc/kvm/book3s_pr.c +2 more+2 -240 replies
2/3KVM: PPC: Add generic single register ioctlsDocumentation/virtual/kvm/api.txt arch/powerpc/kvm/powerpc.c include/linux/kvm.h+130 -00 replies
3/3KVM: PPC: Add support for explicit HIOR settingDocumentation/virtual/kvm/api.txt arch/powerpc/include/asm/kvm.h arch/powerpc/include/asm/kvm_book3s.h +3 more+24 -20 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] KVM: PPC: HIOR and sregs fixup

While working on the HIOR setting which already made it into Avi's tree, I was too uncautious and ended up extending the sregs structure, breaking ABI compatibility with all QEMU versions.

So the approach I was taking there was obvious wrong. Instead, what I thought might be a better alternative is to get rid of the static "we have a struct full of registers and shove it left and right" and instead just poke registers directly between kernel and user space. That sounds slow for starters, but once we have the infrastructure in place, we can build a batched version of the same interface and be fast again but maintain flexibility.

This interface can also for example be used to easily fetch the next great extension of SSE registers or some MSRs that we haven't thought of or lots of PPC registers I haven't even heard of so far :). There always seem to be new ones to learn of out there.

Please take a look at the interface and comment on whether you like it this way or not. It's currently only implemented for the PPC target, but is held generically, so everyone can use it.

Oh and - it obviously implements HIOR again which we have to drop from sregs due to the ABI breakage.

Alex

Alexander Graf (3):
Revert "KVM: PPC: Add support for explicit HIOR setting"
KVM: PPC: Add generic single register ioctls
KVM: PPC: Add support for explicit HIOR setting

 Documentation/virtual/kvm/api.txt     |   48 ++++++++++++++++++++++++
 arch/powerpc/include/asm/kvm.h        |   10 +----
 arch/powerpc/include/asm/kvm_book3s.h |    2 +-
 arch/powerpc/kvm/book3s_pr.c          |   12 +-----
 arch/powerpc/kvm/powerpc.c            |   64 +++++++++++++++++++++++++++++++++
 include/linux/kvm.h                   |   32 ++++++++++++++++
 6 files changed, 149 insertions(+), 19 deletions(-)