[PATCH 00/14] MIPS: KVM: Dynamically generate exception code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx>
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxx
Cc: kvm@xxxxxxxxxxxxxxx
-- 
2.4.10

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux