Skip to content
  1. Apr 20, 2017
    • Paul Mackerras's avatar
      KVM: PPC: Emulation for more integer loads and stores · ceba57df
      Paul Mackerras authored
      
      
      This adds emulation for the following integer loads and stores,
      thus enabling them to be used in a guest for accessing emulated
      MMIO locations.
      
      - lhaux
      - lwaux
      - lwzux
      - ldu
      - lwa
      - stdux
      - stwux
      - stdu
      - ldbrx
      - stdbrx
      
      Previously, most of these would cause an emulation failure exit to
      userspace, though ldu and lwa got treated incorrectly as ld, and
      stdu got treated incorrectly as std.
      
      This also tidies up some of the formatting and updates the comment
      listing instructions that still need to be implemented.
      
      With this, all integer loads and stores that are defined in the Power
      ISA v2.07 are emulated, except for those that are permitted to trap
      when used on cache-inhibited or write-through mappings (and which do
      in fact trap on POWER8), that is, lmw/stmw, lswi/stswi, lswx/stswx,
      lq/stq, and l[bhwdq]arx/st[bhwdq]cx.
      
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      ceba57df
    • Alexey Kardashevskiy's avatar
      KVM: PPC: Add MMIO emulation for stdx (store doubleword indexed) · 91242fd1
      Alexey Kardashevskiy authored
      
      
      This adds missing stdx emulation for emulated MMIO accesses by KVM
      guests.  This allows the Mellanox mlx5_core driver from recent kernels
      to work when MMIO emulation is enforced by userspace.
      
      Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      91242fd1
    • Bin Lu's avatar
      KVM: PPC: Book3S: Add MMIO emulation for FP and VSX instructions · 6f63e81b
      Bin Lu authored
      
      
      This patch provides the MMIO load/store emulation for instructions
      of 'double & vector unsigned char & vector signed char & vector
      unsigned short & vector signed short & vector unsigned int & vector
      signed int & vector double '.
      
      The instructions that this adds emulation for are:
      
      - ldx, ldux, lwax,
      - lfs, lfsx, lfsu, lfsux, lfd, lfdx, lfdu, lfdux,
      - stfs, stfsx, stfsu, stfsux, stfd, stfdx, stfdu, stfdux, stfiwx,
      - lxsdx, lxsspx, lxsiwax, lxsiwzx, lxvd2x, lxvw4x, lxvdsx,
      - stxsdx, stxsspx, stxsiwx, stxvd2x, stxvw4x
      
      [paulus@ozlabs.org - some cleanups, fixes and rework, make it
       compile for Book E, fix build when PR KVM is built in]
      
      Signed-off-by: default avatarBin Lu <lblulb@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      6f63e81b
    • Paul Mackerras's avatar
      KVM: PPC: Provide functions for queueing up FP/VEC/VSX unavailable interrupts · 307d9279
      Paul Mackerras authored
      
      
      This provides functions that can be used for generating interrupts
      indicating that a given functional unit (floating point, vector, or
      VSX) is unavailable.  These functions will be used in instruction
      emulation code.
      
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      307d9279
  2. Apr 12, 2017
    • Radim Krčmář's avatar
      Merge tag 'kvm-s390-next-4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux · f7b1a77d
      Radim Krčmář authored
      From: Christian Borntraeger <borntraeger@de.ibm.com>
      
      KVM: s390: features for 4.12
      
      1. guarded storage support for guests
         This contains an s390 base Linux feature branch that is necessary
         to implement the KVM part
      2. Provide an interface to implement adapter interruption suppression
         which is necessary for proper zPCI support
      3. Use more defines instead of numbers
      4. Provide logging for lazy enablement of runtime instrumentation
      f7b1a77d
  3. Apr 07, 2017
  4. Apr 06, 2017
    • Radim Krčmář's avatar
      Merge tag 'kvm_mips_4.12_1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/kvm-mips · 715958f9
      Radim Krčmář authored
      From: James Hogan <james.hogan@imgtec.com>
      
      KVM: MIPS: VZ support, Octeon III, and TLBR
      
      Add basic support for the MIPS Virtualization Module (generally known as
      MIPS VZ) in KVM. We primarily support the ImgTec P5600, P6600, I6400,
      and Cavium Octeon III cores so far. Support is included for the
      following VZ / guest hardware features:
      - MIPS32 and MIPS64, r5 (VZ requires r5 or later) and r6
      - TLBs with GuestID (IMG cores) or Root ASID Dealias (Octeon III)
      - Shared physical root/guest TLB (IMG cores)
      - FPU / MSA
      - Cop0 timer (up to 1GHz for now due to soft timer limit)
      - Segmentation control (EVA)
      - Hardware page table walker (HTW) both for root and guest TLB
      
      Also included is a proper implementation of the TLBR instruction for the
      trap & emulate MIPS KVM implementation.
      
      Preliminary MIPS architecture changes are applied directly with Ralf's
      ack.
      715958f9
    • Yi Min Zhao's avatar
      KVM: s390: introduce adapter interrupt inject function · a8920950
      Yi Min Zhao authored
      
      
      Inject adapter interrupts on a specified adapter which allows to
      retrieve the adapter flags, e.g. if the adapter is subject to AIS
      facility or not. And add documentation for this interface.
      
      For adapters subject to AIS, handle the airq injection suppression
      for a given ISC according to the interruption mode:
      - before injection, if NO-Interruptions Mode, just return 0 and
        suppress, otherwise, allow the injection.
      - after injection, if SINGLE-Interruption Mode, change it to
        NO-Interruptions Mode to suppress the following interrupts.
      
      Besides, add tracepoint for suppressed airq and AIS mode transitions.
      
      Signed-off-by: default avatarYi Min Zhao <zyimin@linux.vnet.ibm.com>
      Signed-off-by: default avatarFei Li <sherrylf@linux.vnet.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      a8920950
    • Fei Li's avatar
      KVM: s390: introduce ais mode modify function · 51978393
      Fei Li authored
      
      
      Provide an interface for userspace to modify AIS
      (adapter-interruption-suppression) mode state, and add documentation
      for the interface. Allowed target modes are ALL-Interruptions mode
      and SINGLE-Interruption mode.
      
      We introduce the 'simm' and 'nimm' fields in kvm_s390_float_interrupt
      to store interruption modes for each ISC. Each bit in 'simm' and
      'nimm' targets to one ISC, and collaboratively indicate three modes:
      ALL-Interruptions, SINGLE-Interruption and NO-Interruptions. This
      interface can initiate most transitions between the states; transition
      from SINGLE-Interruption to NO-Interruptions via adapter interrupt
      injection will be introduced in a following patch. The meaningful
      combinations are as follows:
      
          interruption mode | simm bit | nimm bit
          ------------------|----------|----------
                   ALL      |    0     |     0
                 SINGLE     |    1     |     0
                   NO       |    1     |     1
      
      Besides, add tracepoint to track AIS mode transitions.
      
      Co-Authored-By: default avatarYi Min Zhao <zyimin@linux.vnet.ibm.com>
      Signed-off-by: default avatarYi Min Zhao <zyimin@linux.vnet.ibm.com>
      Signed-off-by: default avatarFei Li <sherrylf@linux.vnet.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      51978393
    • Fei Li's avatar
      KVM: s390: interface for suppressible I/O adapters · 08fab50d
      Fei Li authored
      
      
      In order to properly implement adapter-interruption suppression, we
      need a way for userspace to specify which adapters are subject to
      suppression. Let's convert the existing (and unused) 'pad' field into
      a 'flags' field and define a flag value for suppressible adapters.
      
      Besides, add documentation for the interface.
      
      Signed-off-by: default avatarFei Li <sherrylf@linux.vnet.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      08fab50d
  5. Mar 29, 2017