1. 28 3月, 2017 4 次提交
    • J
      KVM: MIPS/VZ: Handle Octeon III guest.PRid register · 1f48f9be
      James Hogan 提交于
      Octeon III implements a read-only guest CP0_PRid register, so add cases
      to the KVM register access API for Octeon to ensure the correct value is
      read and writes are ignored.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      1f48f9be
    • J
      MIPS: Add Octeon III register accessors & definitions · 7d8a528d
      James Hogan 提交于
      Add accessors for some VZ related Cavium Octeon III specific COP0
      registers, along with field definitions. These will mostly be used by
      KVM to set up interrupt routing and partition the TLB between root and
      guest.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      7d8a528d
    • J
      MIPS: Add some missing guest CP0 accessors & defs · eb0bab38
      James Hogan 提交于
      Add some missing guest accessors and register field definitions for KVM
      for MIPS VZ to make use of.
      
      Guest CP0_LLAddr register accessors and definitions for the LLB field
      allow KVM to clear the guest LLB to cancel in-progress LL/SC atomics on
      restore, and to emulate accesses by the guest to the CP0_LLAddr
      register.
      
      Bitwise modifiers and definitions for the guest CP0_Wired and
      CP0_Config1 registers allow KVM to modify fields within the CP0_Wired
      and CP0_Config1 registers.
      
      Finally a definition for the CP0_Config5.SBRI bit allows KVM to
      initialise and allow modification of the guest version of the SBRI bit.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      eb0bab38
    • J
      MIPS: Separate MAAR V bit into VL and VH for XPA · f359a111
      James Hogan 提交于
      The MAAR V bit has been renamed VL since another bit called VH is added
      at the top of the register when it is extended to 64-bits on a 32-bit
      processor with XPA. Rename the V definition, fix the various users, and
      add definitions for the VH bit. Also add a definition for the MAARI
      Index field.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: "Radim Krčmář" <rkrcmar@redhat.com>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      f359a111
  2. 14 2月, 2017 1 次提交
    • J
      MIPS: Unify perf counter register definitions · 2654294b
      James Hogan 提交于
      Unify definitions for MIPS performance counter register fields in
      mipsregs.h rather than duplicating them in perf_events and oprofile.
      This will allow future patches to use them to expose performance
      counters to KVM guests.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Robert Richter <rric@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: oprofile-list@lists.sf.net
      Patchwork: https://patchwork.linux-mips.org/patch/15212/Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      2654294b
  3. 24 11月, 2016 1 次提交
    • P
      MIPS: Mask out limit field when calculating wired entry count · 10313980
      Paul Burton 提交于
      Since MIPSr6 the Wired register is split into 2 fields, with the upper
      16 bits of the register indicating a limit on the value that the wired
      entry count in the bottom 16 bits of the register can take. This means
      that simply reading the wired register doesn't get us a valid TLB entry
      index any longer, and we instead need to retrieve only the lower 16 bits
      of the register. Introduce a new num_wired_entries() function which does
      this on MIPSr6 or higher and simply returns the value of the wired
      register on older architecture revisions, and make use of it when
      reading the number of wired entries.
      
      Since commit e710d666 ("MIPS: tlb-r4k: If there are wired entries,
      don't use TLBINVF") we have been using a non-zero number of wired
      entries to determine whether we should avoid use of the tlbinvf
      instruction (which would invalidate wired entries) and instead loop over
      TLB entries in local_flush_tlb_all(). This loop begins with the number
      of wired entries, or before this patch some large bogus TLB index on
      MIPSr6 systems. Thus since the aforementioned commit some MIPSr6 systems
      with FTLBs have been prone to leaving stale address translations in the
      FTLB & crashing in various weird & wonderful ways when we later observe
      the wrong memory.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14557/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      10313980
  4. 30 9月, 2016 1 次提交
    • P
      MIPS: Stop setting I6400 FTLBP · 72c70f01
      Paul Burton 提交于
      The FTLBP field in Config7 for the I6400 is intended as chicken bits for
      debugging rather than as a field that software actually makes use of.
      For best performance, FTLBP should be left at its default value of 0
      with all TLB writes hitting the FTLB by default.
      
      Additionally, since set_ftlb_enable is called from decode_configs before
      decode_config4 which determines the size of the TLBs, this was
      previously always setting FTLBP=3 for a 3:1 FTLB:VTLB write ratio which
      makes abysmal use of the available FTLB resources.
      
      This effectively reverts b0c4e1b79d8a ("MIPS: Set up FTLB probability
      for I6400").
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Fixes: b0c4e1b79d8a ("MIPS: Set up FTLB probability for I6400")
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14021/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      72c70f01
  5. 16 6月, 2016 2 次提交
  6. 28 5月, 2016 7 次提交
  7. 17 5月, 2016 1 次提交
    • J
      MIPS: Fix VZ probe gas errors with binutils <2.24 · bad50d79
      James Hogan 提交于
      The VZ guest register & TLB access macros introduced in commit "MIPS:
      Add guest CP0 accessors" use VZ ASE specific instructions that aren't
      understood by versions of binutils prior to 2.24.
      
      Add a check for whether the toolchain supports the -mvirt option,
      similar to the MSA toolchain check, and implement the accessors using
      .word if not.
      
      Due to difficulty in converting compiler specified registers (e.g. "$3")
      to usable numbers (e.g. "3") in inline asm, we need to copy to/from a
      temporary register, namely the assembler temporary (at/$1), and specify
      guest CP0 registers numerically in the gc0 macros.
      
      Fixes: 7eb91118 ("MIPS: Add guest CP0 accessors")
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-next@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/13255/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      bad50d79
  8. 13 5月, 2016 14 次提交
  9. 24 1月, 2016 3 次提交
  10. 11 11月, 2015 3 次提交
    • P
      MIPS: Tidy EntryLo bit definitions, add PFN · c6956728
      Paul Burton 提交于
      Tidy up the definition of the EntryLo RI & XI bits using BITS_PER_LONG
      rather than #ifdef'ing on CONFIG_64BIT, and add a definition for the
      offset to the PFN field for use by a later patch.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11217/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      c6956728
    • P
      MIPS: CPS: Early debug using an ns16550-compatible UART · 609cf6f2
      Paul Burton 提交于
      Provide support for outputting early debug information, in the form of
      various register values should an exception occur, during the early
      bringup of secondary cores. This code requires an ns16550-compatible
      UART accessible from the secondary core, and is written in assembly due
      to the environment in which such early exceptions occur where way may
      not have a stack, be coherent or even have initialised caches.
      
      [ralf@linux-mips.org: Fix merge conflict.]
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Steven J. Hill <Steven.Hill@imgtec.com>
      Cc: Andrew Bresticker <abrestic@chromium.org>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: linux-kernel@vger.kernel.org
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11202/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      609cf6f2
    • J
      MIPS: Fix duplicate CP0_* definitions. · 195cee92
      James Hogan 提交于
      Remove the definition in locore.S and move a few of the other similar
      definitions in asm/mipsregs.h too. CP0_INTCTL, CP0_SRSCTL, & CP0_SRSMAP
      are unused so they're just dropped instead. CP0_DDATA_LO is left where
      it is as I have patches to eliminate its use in locore.S and it
      otherwise is unlikely to need to be used from assembly code.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: linux-mips@linux-mips.org
      Cc: kvm@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/11461/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      195cee92
  11. 23 9月, 2015 1 次提交
  12. 03 9月, 2015 2 次提交