All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/18] KVM for MIPS32 Processors
@ 2012-11-22  2:33 Sanjay Lal
  2012-11-22  2:33 ` [PATCH v2 01/18] KVM/MIPS32: Infrastructure/build files Sanjay Lal
                   ` (19 more replies)
  0 siblings, 20 replies; 40+ messages in thread
From: Sanjay Lal @ 2012-11-22  2:33 UTC (permalink / raw)
  To: kvm, linux-mips; +Cc: Sanjay Lal

The following patchset implements KVM support for MIPS32R2 processors,
using Trap & Emulate, with basic runtime binary translation to improve
performance.  The goal has been to keep the Guest kernel changes to a
minimum.

The patch is against Linux 3.7-rc6.  This is Version 2 of the patch set.

There is a companion patchset for QEMU that adds KVM support for the 
MIPS target.

KVM/MIPS should support MIPS32-R2 processors and beyond.
It has been tested on the following platforms:
 - Malta Board with FPGA based 34K (Little Endian).
 - Sigma Designs TangoX board with a 24K based 8654 SoC (Little Endian).
 - Malta Board with 74K @ 1GHz (Little Endian).
 - OVPSim MIPS simulator from Imperas emulating a Malta board with 
   24Kc and 1074Kc cores (Little Endian).

Both Guest kernel and Guest Userspace execute in UM. The Guest address space is
as folows:
Guest User address space:   0x00000000 -> 0x40000000
Guest Kernel Unmapped:      0x40000000 -> 0x60000000
Guest Kernel Mapped:        0x60000000 -> 0x80000000

As a result, Guest Usermode virtual memory is limited to 1GB.

Relase Notes
============
(1) 16K Page Size:
   Both Host Kernel and Guest Kernel should have the same page size, 
   currently at least 16K.  Note that due to cache aliasing issues, 
   4K page sizes are NOT supported.

(2) No HugeTLB/Large Page Support:
   Both the host kernel and Guest kernel should have the page size 
   set to at least 16K.
   This will be implemented in a future release.

(3) SMP Guests to not work
   Linux-3.7-rc2 based SMP guest hangs due to the following code sequence 
   in the generated TLB handlers:
        LL/TLBP/SC
   Since the TLBP instruction causes a trap the reservation gets cleared
   when we ERET back to the guest. This causes the guest to hang in an 
   infinite loop.
   As a workaround, make sure that CONFIG_SMP is disabled for Guest kernels.
   This will be fixed in a future release.

(4) FPU support:
   Currently KVM/MIPS emulates a 24K CPU without a FPU.
   This will be fixed in a future release

--
Sanjay Lal (18):
  KVM/MIPS32: Infrastructure/build files.
  KVM/MIPS32: Arch specific KVM data structures.
  KVM/MIPS32: Entry point for trampolining to the guest and trap
    handlers.
  KVM/MIPS32: MIPS arch specific APIs for KVM
  KVM/MIPS32: KVM Guest kernel support.
  KVM/MIPS32: Privileged instruction/target branch emulation.
  KVM/MIPS32: MMU/TLB operations for the Guest.
  KVM/MIPS32: Release notes and KVM module Makefile
  KVM/MIPS32: COP0 accesses profiling.
  KVM/MIPS32: Guest interrupt delivery.
  KVM/MIPS32: Routines to handle specific traps/exceptions while
    executing the guest.
  MIPS: Export routines needed by the KVM module.
  MIPS: If KVM is enabled then use the KVM specific routine to flush
    the TLBs on a ASID wrap.
  MIPS: ASM offsets for VCPU arch specific fields.
  MIPS: Pull in MIPS fix: fix endless loop when processing signals for
    kernel tasks.
  MIPS: Export symbols used by KVM/MIPS module
  KVM/MIPS32: Do not call vcpu_load when injecting interrupts.
  KVM/MIPS32: Binary patching of select privileged instructions.

 arch/mips/Kbuild                            |    4 +
 arch/mips/Kconfig                           |   18 +
 arch/mips/configs/malta_kvm_defconfig       | 2268 +++++++++++++++++++++++++++
 arch/mips/configs/malta_kvm_guest_defconfig | 2237 ++++++++++++++++++++++++++
 arch/mips/include/asm/kvm.h                 |   55 +
 arch/mips/include/asm/kvm_host.h            |  669 ++++++++
 arch/mips/include/asm/mach-generic/spaces.h |    9 +-
 arch/mips/include/asm/mmu_context.h         |    6 +
 arch/mips/include/asm/processor.h           |    5 +
 arch/mips/include/asm/uaccess.h             |   11 +-
 arch/mips/kernel/asm-offsets.c              |   66 +
 arch/mips/kernel/binfmt_elfo32.c            |    4 +
 arch/mips/kernel/cevt-r4k.c                 |    4 +
 arch/mips/kernel/entry.S                    |    7 +-
 arch/mips/kernel/smp.c                      |    1 +
 arch/mips/kernel/traps.c                    |    7 +-
 arch/mips/kvm/00README.txt                  |   31 +
 arch/mips/kvm/Kconfig                       |   60 +
 arch/mips/kvm/Makefile                      |   17 +
 arch/mips/kvm/kvm_cb.c                      |   14 +
 arch/mips/kvm/kvm_locore.S                  |  651 ++++++++
 arch/mips/kvm/kvm_mips.c                    |  965 ++++++++++++
 arch/mips/kvm/kvm_mips_comm.h               |   23 +
 arch/mips/kvm/kvm_mips_commpage.c           |   37 +
 arch/mips/kvm/kvm_mips_dyntrans.c           |  149 ++
 arch/mips/kvm/kvm_mips_emul.c               | 1840 ++++++++++++++++++++++
 arch/mips/kvm/kvm_mips_int.c                |  243 +++
 arch/mips/kvm/kvm_mips_int.h                |   49 +
 arch/mips/kvm/kvm_mips_opcode.h             |   24 +
 arch/mips/kvm/kvm_mips_stats.c              |   81 +
 arch/mips/kvm/kvm_tlb.c                     |  932 +++++++++++
 arch/mips/kvm/kvm_trap_emul.c               |  482 ++++++
 arch/mips/kvm/trace.h                       |   46 +
 arch/mips/mm/c-r4k.c                        |    6 +-
 arch/mips/mm/cache.c                        |    1 +
 arch/mips/mm/tlb-r4k.c                      |    2 +
 arch/mips/mti-malta/Platform                |    6 +-
 arch/mips/mti-malta/malta-time.c            |   13 +
 mm/bootmem.c                                |    1 +
 virt/kvm/kvm_main.c                         |    2 +-
 40 files changed, 11038 insertions(+), 8 deletions(-)
 create mode 100644 arch/mips/configs/malta_kvm_defconfig
 create mode 100644 arch/mips/configs/malta_kvm_guest_defconfig
 create mode 100644 arch/mips/include/asm/kvm.h
 create mode 100644 arch/mips/include/asm/kvm_host.h
 create mode 100644 arch/mips/kvm/00README.txt
 create mode 100644 arch/mips/kvm/Kconfig
 create mode 100644 arch/mips/kvm/Makefile
 create mode 100644 arch/mips/kvm/kvm_cb.c
 create mode 100644 arch/mips/kvm/kvm_locore.S
 create mode 100644 arch/mips/kvm/kvm_mips.c
 create mode 100644 arch/mips/kvm/kvm_mips_comm.h
 create mode 100644 arch/mips/kvm/kvm_mips_commpage.c
 create mode 100644 arch/mips/kvm/kvm_mips_dyntrans.c
 create mode 100644 arch/mips/kvm/kvm_mips_emul.c
 create mode 100644 arch/mips/kvm/kvm_mips_int.c
 create mode 100644 arch/mips/kvm/kvm_mips_int.h
 create mode 100644 arch/mips/kvm/kvm_mips_opcode.h
 create mode 100644 arch/mips/kvm/kvm_mips_stats.c
 create mode 100644 arch/mips/kvm/kvm_tlb.c
 create mode 100644 arch/mips/kvm/kvm_trap_emul.c
 create mode 100644 arch/mips/kvm/trace.h

-- 
1.7.11.3

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

end of thread, other threads:[~2013-02-19  2:31 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-22  2:33 [PATCH v2 00/18] KVM for MIPS32 Processors Sanjay Lal
2012-11-22  2:33 ` [PATCH v2 01/18] KVM/MIPS32: Infrastructure/build files Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 02/18] KVM/MIPS32: Arch specific KVM data structures Sanjay Lal
2012-12-26 13:14   ` Gleb Natapov
2013-01-24 13:22     ` Ralf Baechle
2013-01-31 20:12   ` David Daney
2013-02-06 13:11   ` Gleb Natapov
2012-11-22  2:34 ` [PATCH v2 03/18] KVM/MIPS32: Entry point for trampolining to the guest and trap handlers Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 04/18] KVM/MIPS32: MIPS arch specific APIs for KVM Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 05/18] KVM/MIPS32: KVM Guest kernel support Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 06/18] KVM/MIPS32: Privileged instruction/target branch emulation Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 07/18] KVM/MIPS32: MMU/TLB operations for the Guest Sanjay Lal
2013-02-06 12:08   ` Gleb Natapov
2013-02-15 18:19     ` Sanjay Lal
2013-02-15 18:41       ` Gleb Natapov
2013-02-16 15:57         ` Sanjay Lal
2013-02-16 16:21           ` Gleb Natapov
2012-11-22  2:34 ` [PATCH v2 08/18] KVM/MIPS32: Release notes and KVM module Makefile Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 09/18] KVM/MIPS32: COP0 accesses profiling Sanjay Lal
2012-11-22 11:45   ` Sergei Shtylyov
2013-02-06 13:17   ` Gleb Natapov
2013-02-15 18:22     ` Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 10/18] KVM/MIPS32: Guest interrupt delivery Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 11/18] KVM/MIPS32: Routines to handle specific traps/exceptions while executing the guest Sanjay Lal
2013-02-06 13:20   ` Gleb Natapov
2013-02-15 16:10     ` Sanjay Lal
2013-02-18  9:44       ` Gleb Natapov
2013-02-19  2:31         ` Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 12/18] MIPS: Export routines needed by the KVM module Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 13/18] MIPS: If KVM is enabled then use the KVM specific routine to flush the TLBs on a ASID wrap Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 14/18] MIPS: ASM offsets for VCPU arch specific fields Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 15/18] MIPS: Pull in MIPS fix: fix endless loop when processing signals for kernel tasks Sanjay Lal
2013-01-24 13:07   ` Ralf Baechle
2012-11-22  2:34 ` [PATCH v2 16/18] MIPS: Export symbols used by KVM/MIPS module Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 17/18] KVM/MIPS32: Do not call vcpu_load when injecting interrupts Sanjay Lal
2012-11-22  2:34 ` [PATCH v2 18/18] KVM/MIPS32: Binary patching of select privileged instructions Sanjay Lal
2012-11-26 18:53 ` [PATCH v2 00/18] KVM for MIPS32 Processors David Daney
2012-11-27 19:35   ` Sanjay Lal
2013-01-24 15:05 ` Ralf Baechle
2013-01-24 15:59   ` Sanjay Lal

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.