mbox series

[v1,0/7] KVM / 64s interrupt handling changes

Message ID 20210412075103.1533302-1-npiggin@gmail.com
Headers show
Series KVM / 64s interrupt handling changes | expand

Message

Nicholas Piggin April 12, 2021, 7:50 a.m. UTC
This is the second batch of patches split from the big KVM in C
series.

This implements all the changes to exception-64s.S required for the
subsequent C conversion. I think they stand on their own as good
patches.

The main things done here are to make the code more amenable to
adding different KVM interrupt handlers (rather than just PR and
HV), and moving a lot of KVM specific code out of exceptions-64s.S
and moving it to arch/powerpc/kvm/book3s_64_entry.S. Calling
convention between those files is changed to mostly match the
exception-64s.S "GEN_INT_ENTRY" convention, so that's a change but
now you only have to remember that one for both cases (either
branching to KVM handler or continuing to GEN_COMMON handler).

This is tested with HV KVM, nested HV under radix L0+L1, and nested
PR KVM under HPT guest. All seems to be working okay.

Thanks,
Nick

Nicholas Piggin (7):
  KVM: PPC: Book3S 64: move KVM interrupt entry to a common entry point
  KVM: PPC: Book3S 64: Move GUEST_MODE_SKIP test into KVM
  KVM: PPC: Book3S 64: add hcall interrupt handler
  KVM: PPC: Book3S 64: Move hcall early register setup to KVM
  KVM: PPC: Book3S 64: Move interrupt early register setup to KVM
  KVM: PPC: Book3S 64: move bad_host_intr check to HV handler
  KVM: PPC: Book3S 64: Minimise hcall handler calling convention
    differences

 arch/powerpc/include/asm/exception-64s.h |  13 ++
 arch/powerpc/kernel/exceptions-64s.S     | 250 ++++-------------------
 arch/powerpc/kvm/Makefile                |   3 +
 arch/powerpc/kvm/book3s_64_entry.S       | 158 ++++++++++++++
 arch/powerpc/kvm/book3s_hv_rmhandlers.S  |  13 +-
 arch/powerpc/kvm/book3s_segment.S        |   3 +
 6 files changed, 220 insertions(+), 220 deletions(-)
 create mode 100644 arch/powerpc/kvm/book3s_64_entry.S