qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/9] target-mips: Add Enhanced Virtual Addressing (EVA) support
@ 2016-09-06 11:03 James Hogan
  2016-09-06 11:03 ` [Qemu-devel] [PATCH 1/9] target-mips: Add CP0_Ebase.WG (write gate) support James Hogan
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: James Hogan @ 2016-09-06 11:03 UTC (permalink / raw)
  To: Leon Alrae; +Cc: qemu-devel, James Hogan, Aurelien Jarno

This patchset implements MIPS Enhanced Virtual Addressing (EVA) support
in QEMU.

This consists of the following architectural features:

 - Patch 1: CP0_EBase.WG (write gate).
   This allows more bits of CP0_EBase to be written, which allows the
   exception vector to be moved into a different segment than
   kseg0/kseg1. The related CP0_Config5.CV allows cache error exceptions
   not to be forced to get handled by KSeg1.

 - Patches 2-4: EVA user memory access instructions (CP0_Config5.EVA).
   These allow kernel code to access the user mode view of memory, which
   can no longer be done reliably with normal memory access instructions
   for MUSUK segment access mode (see below).

 - Patches 5-8: Segmentation control (CP0_Config3.SC).
   New cop0 registers are added to reconfigure the virtual memory
   segments. This allows the traditionally fixed virtual memory segments
   to be rearranged, and also allows segments to appear differently
   based on execution mode, for example the access mode MUSUK (Mapped
   User Supervisor, Unmapped Kernel) makes a segment TLB mapped to user
   mode and cached unmapped (direct window to physical) to kernel mode,
   and if EU=1 it is also uncached unmapped to error level (which
   requires the addition of a new MMU mode).

Patch 9 adds the required capabilities to the P5600 CPU type to allow a
Malta EVA kernel to be executed.

Notable limitations:

 - Neither CACHEE (the new EVA instruction) or CACHE (the pre-existing
   non-EVA instruction) generate TLB exceptions for bad addresses, as
   QEMU implements them only with a Cop0 privilege check.

 - No attempt has been made to implement BEV overlays yet, which would
   allow non-standard boot exception vector addresses to be accessed in
   kernel mode, even if the underlying segment is changed. This should
   be done at some point, but wasn't necessary for my purposes.

Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>

James Hogan (9):
  target-mips: Add CP0_Ebase.WG (write gate) support
  target-mips: Prepare loads/stores for EVA
  target-mips: Decode EVA load & store instructions
  target-mips: Check memory permissions with mem_idx
  target-mips: Abstract mmu_idx from hflags
  target-mips: Add an MMU mode for ERL
  target-mips: Add segmentation control registers
  target-mips: Implement segmentation control
  target-mips: Add EVA support to P5600

 target-mips/cpu.h            |  58 +++++++-
 target-mips/helper.c         | 184 ++++++++++++++++++------
 target-mips/helper.h         |   3 +-
 target-mips/machine.c        |   9 +-
 target-mips/op_helper.c      |  39 ++++-
 target-mips/translate.c      | 277 ++++++++++++++++++++++++++++++------
 target-mips/translate_init.c |  15 +-
 7 files changed, 485 insertions(+), 100 deletions(-)

-- 
git-series 0.8.10

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

end of thread, other threads:[~2017-07-06 23:15 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06 11:03 [Qemu-devel] [PATCH 0/9] target-mips: Add Enhanced Virtual Addressing (EVA) support James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 1/9] target-mips: Add CP0_Ebase.WG (write gate) support James Hogan
2016-10-07 13:42   ` Yongbok Kim
2016-10-07 15:37     ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 2/9] target-mips: Prepare loads/stores for EVA James Hogan
2016-10-07 15:32   ` Yongbok Kim
2016-09-06 11:03 ` [Qemu-devel] [PATCH 3/9] target-mips: Decode EVA load & store instructions James Hogan
2016-10-07 15:34   ` Yongbok Kim
2016-10-07 15:48     ` James Hogan
2016-10-07 16:05       ` Yongbok Kim
2016-10-07 16:16         ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 4/9] target-mips: Check memory permissions with mem_idx James Hogan
2016-10-07 15:48   ` Yongbok Kim
2017-07-06 20:50     ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 5/9] target-mips: Abstract mmu_idx from hflags James Hogan
2016-10-07 16:08   ` Yongbok Kim
2017-07-06 20:55     ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 6/9] target-mips: Add an MMU mode for ERL James Hogan
2016-10-13 13:18   ` Yongbok Kim
2017-07-06 20:58     ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 7/9] target-mips: Add segmentation control registers James Hogan
2016-10-10 14:57   ` Yongbok Kim
2017-07-06 22:05     ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 8/9] target-mips: Implement segmentation control James Hogan
2016-10-13 13:06   ` Yongbok Kim
2017-07-06 23:15     ` James Hogan
2016-09-06 11:03 ` [Qemu-devel] [PATCH 9/9] target-mips: Add EVA support to P5600 James Hogan
2016-10-13 13:15   ` Yongbok Kim
2016-09-06 11:18 ` [Qemu-devel] [PATCH 0/9] target-mips: Add Enhanced Virtual Addressing (EVA) support no-reply
2016-09-06 12:09   ` James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).