1. 01 4月, 2015 2 次提交
  2. 17 3月, 2015 3 次提交
  3. 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
  4. 23 1月, 2015 2 次提交
  5. 21 1月, 2015 1 次提交
  6. 13 12月, 2014 3 次提交
  7. 20 11月, 2014 1 次提交
  8. 03 11月, 2014 1 次提交
    • M
      kvm: drop unsupported capabilities, fix documentation · 7f05db6a
      Michael S. Tsirkin 提交于
      No kernel ever reported KVM_CAP_DEVICE_MSIX, KVM_CAP_DEVICE_MSI,
      KVM_CAP_DEVICE_ASSIGNMENT, KVM_CAP_DEVICE_DEASSIGNMENT.
      
      This makes the documentation wrong, and no application ever
      written to use these capabilities has a chance to work correctly.
      The only way to detect support is to try, and test errno for ENOTTY.
      That's unfortunate, but we can't fix the past.
      
      Document the actual semantics, and drop the definitions from
      the exported header to make it easier for application
      developers to note and fix the bug.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7f05db6a
  9. 22 9月, 2014 1 次提交
  10. 10 9月, 2014 2 次提交
  11. 25 8月, 2014 1 次提交
  12. 29 7月, 2014 1 次提交
  13. 28 7月, 2014 4 次提交
    • A
      KVM: Allow KVM_CHECK_EXTENSION on the vm fd · 92b591a4
      Alexander Graf 提交于
      The KVM_CHECK_EXTENSION is only available on the kvm fd today. Unfortunately
      on PPC some of the capabilities change depending on the way a VM was created.
      
      So instead we need a way to expose capabilities as VM ioctl, so that we can
      see which VM type we're using (HV or PR). To enable this, add the
      KVM_CHECK_EXTENSION ioctl to our vm ioctl portfolio.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      92b591a4
    • A
      KVM: PPC: Book3S: Fix LPCR one_reg interface · a0840240
      Alexey Kardashevskiy 提交于
      Unfortunately, the LPCR got defined as a 32-bit register in the
      one_reg interface.  This is unfortunate because KVM allows userspace
      to control the DPFD (default prefetch depth) field, which is in the
      upper 32 bits.  The result is that DPFD always get set to 0, which
      reduces performance in the guest.
      
      We can't just change KVM_REG_PPC_LPCR to be a 64-bit register ID,
      since that would break existing userspace binaries.  Instead we define
      a new KVM_REG_PPC_LPCR_64 id which is 64-bit.  Userspace can still use
      the old KVM_REG_PPC_LPCR id, but it now only modifies those fields in
      the bottom 32 bits that userspace can modify (ILE, TC and AIL).
      If userspace uses the new KVM_REG_PPC_LPCR_64 id, it can modify DPFD
      as well.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      a0840240
    • P
      KVM: PPC: Book3S: Allow only implemented hcalls to be enabled or disabled · ae2113a4
      Paul Mackerras 提交于
      This adds code to check that when the KVM_CAP_PPC_ENABLE_HCALL
      capability is used to enable or disable in-kernel handling of an
      hcall, that the hcall is actually implemented by the kernel.
      If not an EINVAL error is returned.
      
      This also checks the default-enabled list of hcalls and prints a
      warning if any hcall there is not actually implemented.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ae2113a4
    • P
      KVM: PPC: Book3S: Controls for in-kernel sPAPR hypercall handling · 699a0ea0
      Paul Mackerras 提交于
      This provides a way for userspace controls which sPAPR hcalls get
      handled in the kernel.  Each hcall can be individually enabled or
      disabled for in-kernel handling, except for H_RTAS.  The exception
      for H_RTAS is because userspace can already control whether
      individual RTAS functions are handled in-kernel or not via the
      KVM_PPC_RTAS_DEFINE_TOKEN ioctl, and because the numeric value for
      H_RTAS is out of the normal sequence of hcall numbers.
      
      Hcalls are enabled or disabled using the KVM_ENABLE_CAP ioctl for the
      KVM_CAP_PPC_ENABLE_HCALL capability on the file descriptor for the VM.
      The args field of the struct kvm_enable_cap specifies the hcall number
      in args[0] and the enable/disable flag in args[1]; 0 means disable
      in-kernel handling (so that the hcall will always cause an exit to
      userspace) and 1 means enable.  Enabling or disabling in-kernel
      handling of an hcall is effective across the whole VM.
      
      The ability for KVM_ENABLE_CAP to be used on a VM file descriptor
      on PowerPC is new, added by this commit.  The KVM_CAP_ENABLE_CAP_VM
      capability advertises that this ability exists.
      
      When a VM is created, an initial set of hcalls are enabled for
      in-kernel handling.  The set that is enabled is the set that have
      an in-kernel implementation at this point.  Any new hcall
      implementations from this point onwards should not be added to the
      default set without a good reason.
      
      No distinction is made between real-mode and virtual-mode hcall
      implementations; the one setting controls them both.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      699a0ea0
  14. 21 7月, 2014 2 次提交
  15. 10 7月, 2014 5 次提交
  16. 30 5月, 2014 2 次提交
  17. 15 5月, 2014 1 次提交
  18. 06 5月, 2014 1 次提交
  19. 05 5月, 2014 1 次提交
  20. 30 4月, 2014 2 次提交
  21. 22 4月, 2014 1 次提交
  22. 28 3月, 2014 1 次提交
    • C
      KVM: Specify byte order for KVM_EXIT_MMIO · 6acdb160
      Christoffer Dall 提交于
      The KVM API documentation is not clear about the semantics of the data
      field on the mmio struct on the kvm_run struct.
      
      This has become problematic when supporting ARM guests on big-endian
      host systems with guests of both endianness types, because it is unclear
      how the data should be exported to user space.
      
      This should not break with existing implementations as all supported
      existing implementations of known user space applications (QEMU and
      kvmtools for virtio) only support default endianness of the
      architectures on the host side.
      
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Alexander Graf <agraf@suse.de>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      6acdb160
  23. 21 3月, 2014 1 次提交