Skip to content
  1. Feb 24, 2020
  2. Feb 12, 2020
  3. Jan 31, 2020
  4. Jan 23, 2020
  5. Nov 29, 2019
  6. Nov 28, 2019
  7. Oct 22, 2019
    • Greg Kurz's avatar
      KVM: PPC: Book3S HV: XIVE: Allow userspace to set the # of VPs · efe5ddca
      Greg Kurz authored
      
      
      Add a new attribute to both XIVE and XICS-on-XIVE KVM devices so that
      userspace can tell how many interrupt servers it needs. If a VM needs
      less than the current default of KVM_MAX_VCPUS (2048), we can allocate
      less VPs in OPAL. Combined with a core stride (VSMT) that matches the
      number of guest threads per core, this may substantially increases the
      number of VMs that can run concurrently with an in-kernel XIVE device.
      
      Since the legacy XIVE KVM device is exposed to userspace through the
      XICS KVM API, a new attribute group is added to it for this purpose.
      While here, fix the syntax of the existing KVM_DEV_XICS_GRP_SOURCES
      in the XICS documentation.
      
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      efe5ddca
  8. Oct 21, 2019
    • Steven Price's avatar
      KVM: arm64: Document PV-time interface · 6a745848
      Steven Price authored
      
      
      Introduce a paravirtualization interface for KVM/arm64 based on the
      "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A.
      
      This only adds the details about "Stolen Time" as the details of "Live
      Physical Time" have not been fully agreed.
      
      User space can specify a reserved area of memory for the guest and
      inform KVM to populate the memory with information on time that the host
      kernel has stolen from the guest.
      
      A hypercall interface is provided for the guest to interrogate the
      hypervisor's support for this interface and the location of the shared
      memory structures.
      
      Signed-off-by: default avatarSteven Price <steven.price@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      6a745848
    • Christoffer Dall's avatar
      KVM: arm/arm64: Allow user injection of external data aborts · da345174
      Christoffer Dall authored
      
      
      In some scenarios, such as buggy guest or incorrect configuration of the
      VMM and firmware description data, userspace will detect a memory access
      to a portion of the IPA, which is not mapped to any MMIO region.
      
      For this purpose, the appropriate action is to inject an external abort
      to the guest.  The kernel already has functionality to inject an
      external abort, but we need to wire up a signal from user space that
      lets user space tell the kernel to do this.
      
      It turns out, we already have the set event functionality which we can
      perfectly reuse for this.
      
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      da345174
    • Christoffer Dall's avatar
      KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace · c726200d
      Christoffer Dall authored
      
      
      For a long time, if a guest accessed memory outside of a memslot using
      any of the load/store instructions in the architecture which doesn't
      supply decoding information in the ESR_EL2 (the ISV bit is not set), the
      kernel would print the following message and terminate the VM as a
      result of returning -ENOSYS to userspace:
      
        load/store instruction decoding not implemented
      
      The reason behind this message is that KVM assumes that all accesses
      outside a memslot is an MMIO access which should be handled by
      userspace, and we originally expected to eventually implement some sort
      of decoding of load/store instructions where the ISV bit was not set.
      
      However, it turns out that many of the instructions which don't provide
      decoding information on abort are not safe to use for MMIO accesses, and
      the remaining few that would potentially make sense to use on MMIO
      accesses, such as those with register writeback, are not used in
      practice.  It also turns out that fetching an instruction from guest
      memory can be a pretty horrible affair, involving stopping all CPUs on
      SMP systems, handling multiple corner cases of address translation in
      software, and more.  It doesn't appear likely that we'll ever implement
      this in the kernel.
      
      What is much more common is that a user has misconfigured his/her guest
      and is actually not accessing an MMIO region, but just hitting some
      random hole in the IPA space.  In this scenario, the error message above
      is almost misleading and has led to a great deal of confusion over the
      years.
      
      It is, nevertheless, ABI to userspace, and we therefore need to
      introduce a new capability that userspace explicitly enables to change
      behavior.
      
      This patch introduces KVM_CAP_ARM_NISV_TO_USER (NISV meaning Non-ISV)
      which does exactly that, and introduces a new exit reason to report the
      event to userspace.  User space can then emulate an exception to the
      guest, restart the guest, suspend the guest, or take any other
      appropriate action as per the policy of the running system.
      
      Reported-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      Signed-off-by: default avatarChristoffer Dall <christoffer.dall@arm.com>
      Reviewed-by: default avatarAlexander Graf <graf@amazon.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      c726200d
    • Fabiano Rosas's avatar
      KVM: PPC: Report single stepping capability · 1a9167a2
      Fabiano Rosas authored
      
      
      When calling the KVM_SET_GUEST_DEBUG ioctl, userspace might request
      the next instruction to be single stepped via the
      KVM_GUESTDBG_SINGLESTEP control bit of the kvm_guest_debug structure.
      
      This patch adds the KVM_CAP_PPC_GUEST_DEBUG_SSTEP capability in order
      to inform userspace about the state of single stepping support.
      
      We currently don't have support for guest single stepping implemented
      in Book3S HV so the capability is only present for Book3S PR and
      BookE.
      
      Signed-off-by: default avatarFabiano Rosas <farosas@linux.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      1a9167a2
  9. Sep 24, 2019
  10. Sep 10, 2019
Loading