1. 14 Jul, 2024 5 commits
    • Oliver Upton's avatar
      Merge branch kvm-arm64/el2-kcfi into kvmarm/next · 1270dad3
      Oliver Upton authored
      * kvm-arm64/el2-kcfi:
        : kCFI support in the EL2 hypervisor, courtesy of Pierre-Clément Tosi
        :
        : Enable the usage fo CONFIG_CFI_CLANG (kCFI) for hardening indirect
        : branches in the EL2 hypervisor. Unlike kernel support for the feature,
        : CFI failures at EL2 are always fatal.
        KVM: arm64: nVHE: Support CONFIG_CFI_CLANG at EL2
        KVM: arm64: Introduce print_nvhe_hyp_panic helper
        arm64: Introduce esr_brk_comment, esr_is_cfi_brk
        KVM: arm64: VHE: Mark __hyp_call_panic __noreturn
        KVM: arm64: nVHE: gen-hyprel: Skip R_AARCH64_ABS32
        KVM: arm64: nVHE: Simplify invalid_host_el2_vect
        KVM: arm64: Fix __pkvm_init_switch_pgd call ABI
        KVM: arm64: Fix clobbered ELR in sync abort/SError
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      1270dad3
    • Oliver Upton's avatar
      Merge branch kvm-arm64/ctr-el0 into kvmarm/next · 377d0e5d
      Oliver Upton authored
      * kvm-arm64/ctr-el0:
        : Support for user changes to CTR_EL0, courtesy of Sebastian Ott
        :
        : Allow userspace to change the guest-visible value of CTR_EL0 for a VM,
        : so long as the requested value represents a subset of features supported
        : by hardware. In other words, prevent the VMM from over-promising the
        : capabilities of hardware.
        :
        : Make this happen by fitting CTR_EL0 into the existing infrastructure for
        : feature ID registers.
        KVM: selftests: Assert that MPIDR_EL1 is unchanged across vCPU reset
        KVM: arm64: nv: Unfudge ID_AA64PFR0_EL1 masking
        KVM: selftests: arm64: Test writes to CTR_EL0
        KVM: arm64: rename functions for invariant sys regs
        KVM: arm64: show writable masks for feature registers
        KVM: arm64: Treat CTR_EL0 as a VM feature ID register
        KVM: arm64: unify code to prepare traps
        KVM: arm64: nv: Use accessors for modifying ID registers
        KVM: arm64: Add helper for writing ID regs
        KVM: arm64: Use read-only helper for reading VM ID registers
        KVM: arm64: Make idregs debugfs iterator search sysreg table directly
        KVM: arm64: Get sys_reg encoding from descriptor in idregs_debug_show()
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      377d0e5d
    • Oliver Upton's avatar
      Merge branch kvm-arm64/shadow-mmu into kvmarm/next · 435a9f60
      Oliver Upton authored
      * kvm-arm64/shadow-mmu:
        : Shadow stage-2 MMU support for NV, courtesy of Marc Zyngier
        :
        : Initial implementation of shadow stage-2 page tables to support a guest
        : hypervisor. In the author's words:
        :
        :   So here's the 10000m (approximately 30000ft for those of you stuck
        :   with the wrong units) view of what this is doing:
        :
        :     - for each {VMID,VTTBR,VTCR} tuple the guest uses, we use a
        :       separate shadow s2_mmu context. This context has its own "real"
        :       VMID and a set of page tables that are the combination of the
        :       guest's S2 and the host S2, built dynamically one fault at a time.
        :
        :     - these shadow S2 contexts are ephemeral, and behave exactly as
        :       TLBs. For all intent and purposes, they *are* TLBs, and we discard
        :       them pretty often.
        :
        :     - TLB invalidation takes three possible paths:
        :
        :       * either this is an EL2 S1 invalidation, and we directly emulate
        :         it as early as possible
        :
        :       * or this is an EL1 S1 invalidation, and we need to apply it to
        :         the shadow S2s (plural!) that match the VMID set by the L1 guest
        :
        :       * or finally, this is affecting S2, and we need to teardown the
        :         corresponding part of the shadow S2s, which invalidates the TLBs
        KVM: arm64: nv: Truely enable nXS TLBI operations
        KVM: arm64: nv: Add handling of NXS-flavoured TLBI operations
        KVM: arm64: nv: Add handling of range-based TLBI operations
        KVM: arm64: nv: Add handling of outer-shareable TLBI operations
        KVM: arm64: nv: Invalidate TLBs based on shadow S2 TTL-like information
        KVM: arm64: nv: Tag shadow S2 entries with guest's leaf S2 level
        KVM: arm64: nv: Handle FEAT_TTL hinted TLB operations
        KVM: arm64: nv: Handle TLBI IPAS2E1{,IS} operations
        KVM: arm64: nv: Handle TLBI ALLE1{,IS} operations
        KVM: arm64: nv: Handle TLBI VMALLS12E1{,IS} operations
        KVM: arm64: nv: Handle TLB invalidation targeting L2 stage-1
        KVM: arm64: nv: Handle EL2 Stage-1 TLB invalidation
        KVM: arm64: nv: Add Stage-1 EL2 invalidation primitives
        KVM: arm64: nv: Unmap/flush shadow stage 2 page tables
        KVM: arm64: nv: Handle shadow stage 2 page faults
        KVM: arm64: nv: Implement nested Stage-2 page table walk logic
        KVM: arm64: nv: Support multiple nested Stage-2 mmu structures
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      435a9f60
    • Oliver Upton's avatar
      Merge branch kvm-arm64/ffa-1p1 into kvmarm/next · a35d5b20
      Oliver Upton authored
      * kvm-arm64/ffa-1p1:
        : Improvements to the pKVM FF-A Proxy, courtesy of Sebastian Ene
        :
        : Various minor improvements to how host FF-A calls are proxied with the
        : TEE, along with support for v1.1 of the protocol.
        KVM: arm64: Use FF-A 1.1 with pKVM
        KVM: arm64: Update the identification range for the FF-A smcs
        KVM: arm64: Add support for FFA_PARTITION_INFO_GET
        KVM: arm64: Trap FFA_VERSION host call in pKVM
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      a35d5b20
    • Oliver Upton's avatar
      Merge branch kvm-arm64/misc into kvmarm/next · bd2e9513
      Oliver Upton authored
      * kvm-arm64/misc:
        : Miscellaneous updates
        :
        :  - Provide a command-line parameter to statically control the WFx trap
        :    selection in KVM
        :
        :  - Make sysreg masks allocation accounted
        Revert "KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity"
        KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation
        KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity
        KVM: arm64: Add early_param to control WFx trapping
      Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
      bd2e9513
  2. 08 Jul, 2024 1 commit
  3. 03 Jul, 2024 1 commit
  4. 22 Jun, 2024 2 commits
  5. 20 Jun, 2024 18 commits
  6. 19 Jun, 2024 13 commits