Skip to content
  1. Oct 19, 2021
  2. Oct 18, 2021
  3. Oct 15, 2021
  4. Oct 05, 2021
    • Quentin Perret's avatar
      KVM: arm64: Release mmap_lock when using VM_SHARED with MTE · 6e6a8ef0
      Quentin Perret authored
      VM_SHARED mappings are currently forbidden in a memslot with MTE to
      prevent two VMs racing to sanitise the same page. However, this check
      is performed while holding current->mm's mmap_lock, but fails to release
      it. Fix this by releasing the lock when needed.
      
      Fixes: ea7fc1bb
      
       ("KVM: arm64: Introduce MTE VM feature")
      Signed-off-by: default avatarQuentin Perret <qperret@google.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20211005122031.809857-1-qperret@google.com
      6e6a8ef0
    • Quentin Perret's avatar
      KVM: arm64: Report corrupted refcount at EL2 · 7615c2a5
      Quentin Perret authored
      
      
      Some of the refcount manipulation helpers used at EL2 are instrumented
      to catch a corrupted state, but not all of them are treated equally. Let's
      make things more consistent by instrumenting hyp_page_ref_dec_and_test()
      as well.
      
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Suggested-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarQuentin Perret <qperret@google.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20211005090155.734578-6-qperret@google.com
      7615c2a5
    • Quentin Perret's avatar
      KVM: arm64: Fix host stage-2 PGD refcount · 1d58a17e
      Quentin Perret authored
      The KVM page-table library refcounts the pages of concatenated stage-2
      PGDs individually. However, when running KVM in protected mode, the
      host's stage-2 PGD is currently managed by EL2 as a single high-order
      compound page, which can cause the refcount of the tail pages to reach 0
      when they shouldn't, hence corrupting the page-table.
      
      Fix this by introducing a new hyp_split_page() helper in the EL2 page
      allocator (matching the kernel's split_page() function), and make use of
      it from host_s2_zalloc_pages_exact().
      
      Fixes: 1025c8c0
      
       ("KVM: arm64: Wrap the host with a stage 2")
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Suggested-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarQuentin Perret <qperret@google.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20211005090155.734578-5-qperret@google.com
      1d58a17e
    • Paolo Bonzini's avatar
      Merge tag 'kvm-riscv-5.16-1' of git://github.com/kvm-riscv/linux into HEAD · 542a2640
      Paolo Bonzini authored
      Initial KVM RISC-V support
      
      Following features are supported by the initial KVM RISC-V support:
      1. No RISC-V specific KVM IOCTL
      2. Loadable KVM RISC-V module
      3. Minimal possible KVM world-switch which touches only GPRs and few CSRs
      4. Works on both RV64 and RV32 host
      5. Full Guest/VM switch via vcpu_get/vcpu_put infrastructure
      6. KVM ONE_REG interface for VCPU register access from KVM user-space
      7. Interrupt controller emulation in KVM user-space
      8. Timer and IPI emuation in kernel
      9. Both Sv39x4 and Sv48x4 supported for RV64 host
      10. MMU notifiers supported
      11. Generic dirty log supported
      12. FP lazy save/restore supported
      13. SBI v0.1 emulation for Guest/VM
      14. Forward unhandled SBI calls to KVM user-space
      15. Hugepage support for Guest/VM
      16. IOEVENTFD support for Vhost
      542a2640
  5. Oct 04, 2021
  6. Oct 01, 2021