KVM: PPC: Reduce races, fix code
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 of 9 patches 12 repliesIn review
3 of 9 patches are in this archive. The cover letter announces 9.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 2/9 | KVM: PPC: Add helpers for CR, XERarch/ arch/ arch/ +1 more | +52 | 0 replies | |
| 6/9 | KVM: PPC: Call SLB patching code in interrupt safe mannerarch/ arch/ arch/ +6 more | +34 | 0 replies | |
| 7/9 | KVM: PPC: Emulate trap SRR1 flags properlyarch/ arch/ arch/ +3 more | +14 | 12 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] KVM: PPC: Reduce races, fix code
We've been a bit lax with how we use fields in the PACA so far. Most of the time we just overwrote random fields that another interrupt handler would have used as well.
That is racy.
We also jumped over to real mode from IR=1 using RFI. Unfortunately, we need 3 operations to do that transitions which need to be fully atomic, as any interrupt coming in between those instructions can possibly break us.
That is racy too.
So let's get rid of all the racy code and clean up some pieces along the way.
Alexander Graf (9):
KVM: PPC: Use accessor functions for GPR access
KVM: PPC: Add helpers for CR, XER
KVM: PPC: Use PACA backed shadow vcpu
KVM: PPC: Implement 'skip instruction' mode
KVM: PPC: Get rid of unnecessary RFI
KVM: PPC: Call SLB patching code in interrupt safe manner
KVM: PPC: Emulate trap SRR1 flags properly
KVM: PPC: Fix HID5 setting code
KVM: PPC: Pass program interrupt flags to the guest
arch/powerpc/include/asm/kvm_asm.h | 6 + arch/powerpc/include/asm/kvm_book3s.h | 4 + arch/powerpc/include/asm/kvm_book3s_64_asm.h | 18 ++ arch/powerpc/include/asm/kvm_host.h | 6 +- arch/powerpc/include/asm/kvm_ppc.h | 76 ++++++++- arch/powerpc/include/asm/paca.h | 5 + arch/powerpc/include/asm/reg.h | 4 + arch/powerpc/kernel/asm-offsets.c | 34 ++++- arch/powerpc/kvm/44x_emulate.c | 25 ++-- arch/powerpc/kvm/44x_tlb.c | 20 ++- arch/powerpc/kvm/book3s.c | 35 +++-- arch/powerpc/kvm/book3s_64_emulate.c | 77 +++++---- arch/powerpc/kvm/book3s_64_exports.c | 1 + arch/powerpc/kvm/book3s_64_interrupts.S | 242 +++++++++----------------- arch/powerpc/kvm/book3s_64_rmhandlers.S | 85 +++++++--- arch/powerpc/kvm/book3s_64_slb.S | 158 +++++++++++------- arch/powerpc/kvm/booke.c | 27 ++-- arch/powerpc/kvm/booke_emulate.c | 107 ++++++------ arch/powerpc/kvm/e500_emulate.c | 95 ++++++----- arch/powerpc/kvm/e500_tlb.c | 4 +- arch/powerpc/kvm/emulate.c | 112 +++++++------ arch/powerpc/kvm/powerpc.c | 21 ++- 22 files changed, 672 insertions(+), 490 deletions(-)