1. 20 Aug, 2021 11 commits
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/generic-entry into kvmarm-master/next · ca3385a5
      Marc Zyngier authored
      Switch KVM/arm64 to the generic entry code, courtesy of Oliver Upton
      
      * kvm-arm64/generic-entry:
        KVM: arm64: Use generic KVM xfer to guest work function
        entry: KVM: Allow use of generic KVM entry w/o full generic support
        KVM: arm64: Record number of signal exits as a vCPU stat
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      ca3385a5
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/psci/cpu_on into kvmarm-master/next · 78bc1170
      Marc Zyngier authored
      PSCI fixes from Oliver Upton:
      - Plug race on reset
      - Ensure that a pending reset is applied before userspace accesses
      - Reject PSCI requests with illegal affinity bits
      
      * kvm-arm64/psci/cpu_on:
        selftests: KVM: Introduce psci_cpu_on_test
        KVM: arm64: Enforce reserved bits for PSCI target affinities
        KVM: arm64: Handle PSCI resets before userspace touches vCPU state
        KVM: arm64: Fix read-side race on updates to vcpu reset state
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      78bc1170
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/mmu/el2-tracking into kvmarm-master/next · cf0c7125
      Marc Zyngier authored
      * kvm-arm64/mmu/el2-tracking: (25 commits)
        : Enable tracking of page sharing between host EL1 and EL2
        KVM: arm64: Minor optimization of range_is_memory
        KVM: arm64: Make hyp_panic() more robust when protected mode is enabled
        KVM: arm64: Return -EPERM from __pkvm_host_share_hyp()
        KVM: arm64: Make __pkvm_create_mappings static
        KVM: arm64: Restrict EL2 stage-1 changes in protected mode
        KVM: arm64: Refactor protected nVHE stage-1 locking
        KVM: arm64: Remove __pkvm_mark_hyp
        KVM: arm64: Mark host bss and rodata section as shared
        KVM: arm64: Enable retrieving protections attributes of PTEs
        KVM: arm64: Introduce addr_is_memory()
        KVM: arm64: Expose pkvm_hyp_id
        KVM: arm64: Expose host stage-2 manipulation helpers
        KVM: arm64: Add helpers to tag shared pages in SW bits
        KVM: arm64: Allow populating software bits
        KVM: arm64: Enable forcing page-level stage-2 mappings
        KVM: arm64: Tolerate re-creating hyp mappings to set software bits
        KVM: arm64: Don't overwrite software bits with owner id
        KVM: arm64: Rename KVM_PTE_LEAF_ATTR_S2_IGNORED
        KVM: arm64: Optimize host memory aborts
        KVM: arm64: Expose page-table helpers
        ...
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      cf0c7125
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/mmu/kmemleak-pkvm into kvmarm-master/next · 82f8d543
      Marc Zyngier authored
      Prevent kmemleak from peeking into the HYP data, which is fatal
      in protected mode.
      
      * kvm-arm64/mmu/kmemleak-pkvm:
        KVM: arm64: Unregister HYP sections from kmemleak in protected mode
        arm64: Move .hyp.rodata outside of the _sdata.._edata range
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      82f8d543
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/misc-5.15 into kvmarm-master/next · 3ce5db8a
      Marc Zyngier authored
      * kvm-arm64/misc-5.15:
        : Misc improvements for 5.15:
        :
        : - Account the number of VMID-wide TLB invalidations as
        :   remote TLB flushes
        : - Fix comments in the VGIC code
        : - Cleanup the PMU IMPDEF identification
        : - Streamline the TGRAN2 usage
        : - Avoid advertising a 52bit IPA range for non-64KB configs
        : - Avoid spurious signalling when a HW-mapped interrupt is in the
        :   A+P state on entry, and in the P state on exit, but that the
        :   physical line is not pending anymore.
        : - Bunch of minor cleanups
        KVM: arm64: vgic: Resample HW pending state on deactivation
        KVM: arm64: vgic: Drop WARN from vgic_get_irq
        KVM: arm64: Drop unused REQUIRES_VIRT
        KVM: arm64: Drop check_kvm_target_cpu() based percpu probe
        KVM: arm64: Drop init_common_resources()
        KVM: arm64: Use ARM64_MIN_PARANGE_BITS as the minimum supported IPA
        arm64/mm: Add remaining ID_AA64MMFR0_PARANGE_ macros
        KVM: arm64: Restrict IPA size to maximum 48 bits on 4K and 16K page size
        arm64/mm: Define ID_AA64MMFR0_TGRAN_2_SHIFT
        KVM: arm64: perf: Replace '0xf' instances with ID_AA64DFR0_PMUVER_IMP_DEF
        KVM: arm64: Fix comments related to GICv2 PMR reporting
        KVM: arm64: Count VMID-wide TLB invalidations
        arm64/kexec: Test page size support with new TGRAN range values
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      3ce5db8a
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/mmu/mapping-levels into kvmarm-master/next · 2d84f3ce
      Marc Zyngier authored
      Revamp the KVM/arm64 THP code by parsing the userspace
      page tables instead of relying on an infrastructure that
      is about to disappear (we are the last user).
      
      * kvm-arm64/mmu/mapping-levels:
        KVM: Get rid of kvm_get_pfn()
        KVM: arm64: Use get_page() instead of kvm_get_pfn()
        KVM: Remove kvm_is_transparent_hugepage() and PageTransCompoundMap()
        KVM: arm64: Avoid mapping size adjustment on permission fault
        KVM: arm64: Walk userspace page tables to compute the THP mapping size
        KVM: arm64: Introduce helper to retrieve a PTE and its level
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      2d84f3ce
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/pmu/reset-values into kvmarm-master/next · a4516f32
      Marc Zyngier authored
      Fix the reset values for our PMU emulation. As a side effect,
      it allows a nice optimisation by only tracking the in-use
      counters when flipping them on and off, now that we are
      guaranteed not to have any spurious bit set.
      
      * kvm-arm64/pmu/reset-values:
        KVM: arm64: Remove PMSWINC_EL0 shadow register
        KVM: arm64: Disabling disabled PMU counters wastes a lot of time
        KVM: arm64: Drop unnecessary masking of PMU registers
        KVM: arm64: Narrow PMU sysreg reset values to architectural requirements
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      a4516f32
    • David Brazdil's avatar
      KVM: arm64: Minor optimization of range_is_memory · 14ecf075
      David Brazdil authored
      Currently range_is_memory finds the corresponding struct memblock_region
      for both the lower and upper bounds of the given address range with two
      rounds of binary search, and then checks that the two memblocks are the
      same. Simplify this by only doing binary search on the lower bound and
      then checking that the upper bound is in the same memblock.
      Signed-off-by: default avatarDavid Brazdil <dbrazdil@google.com>
      Reviewed-by: default avatarQuentin Perret <qperret@google.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20210728153232.1018911-3-dbrazdil@google.com
      14ecf075
    • Marc Zyngier's avatar
      Merge tag 'kvmarm-fixes-5.14-2' into kvm-arm64/mmu/el2-tracking · fb1c16c0
      Marc Zyngier authored
      KVM/arm64 fixes for 5.14, take #2
      
      - Plug race between enabling MTE and creating vcpus
      - Fix off-by-one bug when checking whether an address range is RAM
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      fb1c16c0
    • Marc Zyngier's avatar
      Merge branch arm64/for-next/sysreg into kvm-arm64/misc-5.15 · 6e73bc90
      Marc Zyngier authored
      Merge the arm64/for-next/sysreg branch to avoid merge conflicts
      in -next and upstream.
      
      * arm64/for-next/sysreg:
        arm64/kexec: Test page size support with new TGRAN range values
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      6e73bc90
    • Marc Zyngier's avatar
      KVM: arm64: vgic: Resample HW pending state on deactivation · 3134cc8b
      Marc Zyngier authored
      When a mapped level interrupt (a timer, for example) is deactivated
      by the guest, the corresponding host interrupt is equally deactivated.
      However, the fate of the pending state still needs to be dealt
      with in SW.
      
      This is specially true when the interrupt was in the active+pending
      state in the virtual distributor at the point where the guest
      was entered. On exit, the pending state is potentially stale
      (the guest may have put the interrupt in a non-pending state).
      
      If we don't do anything, the interrupt will be spuriously injected
      in the guest. Although this shouldn't have any ill effect (spurious
      interrupts are always possible), we can improve the emulation by
      detecting the deactivation-while-pending case and resample the
      interrupt.
      
      While we're at it, move the logic into a common helper that can
      be shared between the two GIC implementations.
      
      Fixes: e40cc57b ("KVM: arm/arm64: vgic: Support level-triggered mapped interrupts")
      Reported-by: default avatarRaghavendra Rao Ananta <rananta@google.com>
      Tested-by: default avatarRaghavendra Rao Ananta <rananta@google.com>
      Reviewed-by: default avatarOliver Upton <oupton@google.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20210819180305.1670525-1-maz@kernel.org
      3134cc8b
  2. 19 Aug, 2021 8 commits
  3. 18 Aug, 2021 6 commits
  4. 11 Aug, 2021 15 commits