1. 10 6月, 2016 3 次提交
    • D
      KVM: s390: interface to query and configure cpu subfunctions · 0a763c78
      David Hildenbrand 提交于
      We have certain instructions that indicate available subfunctions via
      a query subfunction (crypto functions and ptff), or via a test bit
      function (plo).
      
      By exposing these "subfunction blocks" to user space, we allow user space
      to
      1) query available subfunctions and make sure subfunctions won't get lost
         during migration - e.g. properly indicate them via a CPU model
      2) change the subfunctions to be reported to the guest (even adding
         unavailable ones)
      
      This mechanism works just like the way we indicate the stfl(e) list to
      user space.
      
      This way, user space could even emulate some subfunctions in QEMU in the
      future. If this is ever applicable, we have to make sure later on, that
      unsupported subfunctions result in an intercept to QEMU.
      
      Please note that support to indicate them to the guest is still missing
      and requires hardware support. Usually, the IBC takes already care of these
      subfunctions for migration safety. QEMU should make sure to always set
      these bits properly according to the machine generation to be emulated.
      
      Available subfunctions are only valid in combination with STFLE bits
      retrieved via KVM_S390_VM_CPU_MACHINE and enabled via
      KVM_S390_VM_CPU_PROCESSOR. If the applicable bits are available, the
      indicated subfunctions are guaranteed to be correct.
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      0a763c78
    • D
      KVM: s390: forward ESOP if available · 22be5a13
      David Hildenbrand 提交于
      ESOP guarantees that during a protection exception, bit 61 of real location
      168-175 will only be set to 1 if it was because of ALCP or DATP. If the
      exception is due to LAP or KCP, the bit will always be set to 0.
      
      The old SOP definition allowed bit 61 to be unpredictable in case of LAP
      or KCP in some conditions. So ESOP replaces this unpredictability by
      a guarantee.
      
      Therefore, we can directly forward ESOP if it is available on our machine.
      We don't have to do anything when ESOP is disabled - the guest will simply
      expect unpredictable values. Our guest access functions are already
      handling ESOP properly.
      
      Please note that future functionality in KVM will require knowledge about
      ESOP being enabled for a guest or not.
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      22be5a13
    • D
      KVM: s390: interface to query and configure cpu features · 15c9705f
      David Hildenbrand 提交于
      For now, we only have an interface to query and configure facilities
      indicated via STFL(E). However, we also have features indicated via
      SCLP, that have to be indicated to the guest by user space and usually
      require KVM support.
      
      This patch allows user space to query and configure available cpu features
      for the guest.
      
      Please note that disabling a feature doesn't necessarily mean that it is
      completely disabled (e.g. ESOP is mostly handled by the SIE). We will try
      our best to disable it.
      
      Most features (e.g. SCLP) can't directly be forwarded, as most of them need
      in addition to hardware support, support in KVM. As we later on want to
      turn these features in KVM explicitly on/off (to simulate different
      behavior), we have to filter all features provided by the hardware and
      make them configurable.
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      15c9705f
  2. 20 4月, 2016 1 次提交
  3. 10 2月, 2016 1 次提交
  4. 07 1月, 2016 1 次提交
  5. 16 12月, 2015 1 次提交
  6. 06 3月, 2015 1 次提交
    • E
      KVM: s390: Allocate and save/restore vector registers · 68c55750
      Eric Farman 提交于
      Define and allocate space for both the host and guest views of
      the vector registers for a given vcpu.  The 32 vector registers
      occupy 128 bits each (512 bytes total), but architecturally are
      paired with 512 additional bytes of reserved space for future
      expansion.
      
      The kvm_sync_regs structs containing the registers are union'ed
      with 1024 bytes of padding in the common kvm_run struct.  The
      addition of 1024 bytes of new register information clearly exceeds
      the existing union, so an expansion of that padding is required.
      
      When changing environments, we need to appropriately save and
      restore the vector registers viewed by both the host and guest,
      into and out of the sync_regs space.
      
      The floating point registers overlay the upper half of vector
      registers 0-15, so there's a bit of data duplication here that
      needs to be carefully avoided.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      68c55750
  7. 09 2月, 2015 1 次提交
  8. 23 1月, 2015 4 次提交
  9. 25 8月, 2014 1 次提交
  10. 22 4月, 2014 3 次提交
  11. 21 3月, 2014 1 次提交
  12. 04 3月, 2014 2 次提交
  13. 30 1月, 2014 4 次提交
  14. 09 10月, 2012 1 次提交
  15. 20 7月, 2012 1 次提交
    • H
      s390/comments: unify copyright messages and remove file names · a53c8fab
      Heiko Carstens 提交于
      Remove the file name from the comment at top of many files. In most
      cases the file name was wrong anyway, so it's rather pointless.
      
      Also unify the IBM copyright statement. We did have a lot of sightly
      different statements and wanted to change them one after another
      whenever a file gets touched. However that never happened. Instead
      people start to take the old/"wrong" statements to use as a template
      for new files.
      So unify all of them in one go.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      a53c8fab
  16. 18 5月, 2012 2 次提交
  17. 08 3月, 2012 1 次提交
  18. 05 3月, 2012 4 次提交
  19. 03 12月, 2009 1 次提交
  20. 10 9月, 2009 1 次提交
  21. 24 3月, 2009 1 次提交
    • J
      KVM: New guest debug interface · d0bfb940
      Jan Kiszka 提交于
      This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL
      instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic
      part, controlling the "main switch" and the single-step feature. The
      arch specific part adds an x86 interface for intercepting both types of
      debug exceptions separately and re-injecting them when the host was not
      interested. Moveover, the foundation for guest debugging via debug
      registers is layed.
      
      To signal breakpoint events properly back to userland, an arch-specific
      data block is now returned along KVM_EXIT_DEBUG. For x86, the arch block
      contains the PC, the debug exception, and relevant debug registers to
      tell debug events properly apart.
      
      The availability of this new interface is signaled by
      KVM_CAP_SET_GUEST_DEBUG. Empty stubs for not yet supported archs are
      provided.
      
      Note that both SVM and VTX are supported, but only the latter was tested
      yet. Based on the experience with all those VTX corner case, I would be
      fairly surprised if SVM will work out of the box.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d0bfb940
  22. 09 1月, 2009 1 次提交
    • H
      [S390] types: add/fix types.h include in header files · 0680ba01
      Heiko Carstens 提交于
      /include/asm/chpid.h:12: include of <linux/types.h> is preferred over <asm/types.h>
      /include/asm/chsc.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>
      /include/asm/cmb.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h>
      /include/asm/dasd.h:195: found __[us]{8,16,32,64} type without #include <linux/types.h>
      /include/asm/kvm.h:16: include of <linux/types.h> is preferred over <asm/types.h>
      /include/asm/kvm.h:30: found __[us]{8,16,32,64} type without #include <linux/types.h>
      /include/asm/qeth.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>
      /include/asm/schid.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h>
      /include/asm/swab.h:12: include of <linux/types.h> is preferred over <asm/types.h>
      /include/asm/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      0680ba01
  23. 02 8月, 2008 1 次提交
  24. 27 4月, 2008 1 次提交
    • H
      KVM: s390: arch backend for the kvm kernel module · b0c632db
      Heiko Carstens 提交于
      This patch contains the port of Qumranet's kvm kernel module to IBM zSeries
       (aka s390x, mainframe) architecture. It uses the mainframe's virtualization
      instruction SIE to run virtual machines with up to 64 virtual CPUs each.
      This port is only usable on 64bit host kernels, and can only run 64bit guest
      kernels. However, running 31bit applications in guest userspace is possible.
      
      The following source files are introduced by this patch
      arch/s390/kvm/kvm-s390.c    similar to arch/x86/kvm/x86.c, this implements all
                                  arch callbacks for kvm. __vcpu_run calls back into
                                  sie64a to enter the guest machine context
      arch/s390/kvm/sie64a.S      assembler function sie64a, which enters guest
                                  context via SIE, and switches world before and after                            that
      include/asm-s390/kvm_host.h contains all vital data structures needed to run
                                  virtual machines on the mainframe
      include/asm-s390/kvm.h      defines kvm_regs and friends for user access to
                                  guest register content
      arch/s390/kvm/gaccess.h     functions similar to uaccess to access guest memory
      arch/s390/kvm/kvm-s390.h    header file for kvm-s390 internals, extended by
                                  later patches
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NCarsten Otte <cotte@de.ibm.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      b0c632db
  25. 03 4月, 2008 1 次提交
    • C
      kvm: provide kvm.h for all architecture: fixes headers_install · dd135ebb
      Christian Borntraeger 提交于
      Currently include/linux/kvm.h is not considered by make headers_install,
      because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h.  This problem
      was introduced by
      
      commit fb56dbb3
      Author: Avi Kivity <avi@qumranet.com>
      Date:   Sun Dec 2 10:50:06 2007 +0200
      
          KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM
      
          Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h>
          includes, not existing.  Rather than add a zillion <asm/kvm.h>s, export kvm.
          only if the arch actually supports it.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      
      which makes this an 2.6.25 regression.
      
      One way of solving the issue is to enhance Kbuild, but Avi and David conviced
      me, that changing headers_install is not the way to go.  This patch changes
      the definition for linux/kvm.h to unifdef-y.
      
      If  unifdef-y is used for linux/kvm.h "make headers_check" will fail on all
      architectures without asm/kvm.h.  Therefore, this patch also provides
      asm/kvm.h on all architectures.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NAvi Kivity <avi@qumranet.com>
      Cc: Sam Ravnborg <sam@ravnborg.org
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dd135ebb