All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] MIPS: KVM: Dynamically generate exception code
@ 2016-06-23 16:34 ` James Hogan
  0 siblings, 0 replies; 36+ messages in thread
From: James Hogan @ 2016-06-23 16:34 UTC (permalink / raw)
  To: Paolo Bonzini, Radim Krčmář, Ralf Baechle
  Cc: James Hogan, linux-mips, kvm

These patches change the MIPS KVM exception entry code to be dynamically
assembled by the MIPS "uasm" in-kernel assembler, directly into unmapped
memory at run time by a new entry.c. Previously this code was statically
assembled from locore.S at build time and later copied into unmapped
memory at run time.

Patches 1-5 add support for the necessary instructions to uasm.

Patches 6-8 do the minimal-change conversion of locore.S to entry.c
using uasm (I've used -M10% so the diff is shown as a file move).

Patches 9-14 make some related improvements that are possible now that
it is dynamically generated, such as avoiding messy runtime conditionals
in assembly code, making use of KScratch registers when available, and
simplifying the initial GP register save sequence & jump to common code.

Ralf: Since the uasm patches (1-5) are needed for the later patches, I
suggest these all go together via the KVM tree (on which the whole
patchset is based), so Acks are welcome if they're okay with you.

James Hogan (14):
  MIPS: uasm: Add CFC1/CTC1 instructions
  MIPS: uasm: Add CFCMSA/CTCMSA instructions
  MIPS: uasm: Add DI instruction
  MIPS: uasm: Add MTHI/MTLO instructions
  MIPS: uasm: Add r6 MUL encoding

  MIPS; KVM: Convert exception entry to uasm
  MIPS: KVM: Add dumping of generated entry code
  MIPS: KVM: Drop now unused asm offsets

  MIPS: KVM: Omit FPU handling entry code if possible
  MIPS: KVM: Check MSA presence at uasm time
  MIPS: KVM: Drop redundant restore of DDATA_LO
  MIPS: KVM: Dynamically choose scratch registers
  MIPS: KVM: Relative branch to common exit handler
  MIPS: KVM: Save k0 straight into VCPU structure

 arch/mips/include/asm/kvm_host.h    |   9 +-
 arch/mips/include/asm/uasm.h        |   7 +
 arch/mips/include/uapi/asm/inst.h   |  71 ++-
 arch/mips/kernel/asm-offsets.c      |  66 ---
 arch/mips/kvm/Kconfig               |   1 +
 arch/mips/kvm/Makefile              |   2 +-
 arch/mips/kvm/{locore.S => entry.c} | 976 +++++++++++++++++++-----------------
 arch/mips/kvm/interrupt.h           |   4 -
 arch/mips/kvm/mips.c                |  66 ++-
 arch/mips/mm/uasm-micromips.c       |  13 +-
 arch/mips/mm/uasm-mips.c            |  11 +
 arch/mips/mm/uasm.c                 |  24 +-
 12 files changed, 695 insertions(+), 555 deletions(-)
 rename arch/mips/kvm/{locore.S => entry.c} (15%)

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
-- 
2.4.10

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2016-07-05 14:05 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 16:34 [PATCH 00/14] MIPS: KVM: Dynamically generate exception code James Hogan
2016-06-23 16:34 ` James Hogan
2016-06-23 16:34 ` [PATCH 01/14] MIPS: uasm: Add CFC1/CTC1 instructions James Hogan
2016-06-23 16:34   ` James Hogan
2016-07-05 13:56   ` Paolo Bonzini
2016-07-05 14:04     ` Ralf Baechle
2016-06-23 16:34 ` [PATCH 02/14] MIPS: uasm: Add CFCMSA/CTCMSA instructions James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 03/14] MIPS: uasm: Add DI instruction James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 04/14] MIPS: uasm: Add MTHI/MTLO instructions James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 05/14] MIPS: uasm: Add r6 MUL encoding James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 06/14] MIPS; KVM: Convert exception entry to uasm James Hogan
2016-06-23 16:34   ` James Hogan
2016-07-04 18:53   ` James Hogan
2016-07-04 18:53     ` James Hogan
2016-06-23 16:34 ` [PATCH 07/14] MIPS: KVM: Add dumping of generated entry code James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 08/14] MIPS: KVM: Drop now unused asm offsets James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 09/14] MIPS: KVM: Omit FPU handling entry code if possible James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 10/14] MIPS: KVM: Check MSA presence at uasm time James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 11/14] MIPS: KVM: Drop redundant restore of DDATA_LO James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 12/14] MIPS: KVM: Dynamically choose scratch registers James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 13/14] MIPS: KVM: Relative branch to common exit handler James Hogan
2016-06-23 16:34   ` James Hogan
2016-06-23 16:34 ` [PATCH 14/14] MIPS: KVM: Save k0 straight into VCPU structure James Hogan
2016-06-23 16:34   ` James Hogan
2016-07-05 13:48 ` [PATCH 00/14] MIPS: KVM: Dynamically generate exception code Ralf Baechle
2016-07-05 13:53   ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.