1. 12 Sep, 2024 5 commits
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/nv-at-pan into kvmarm-master/next · 2e0f2394
      Marc Zyngier authored
      * kvm-arm64/nv-at-pan:
        : .
        : Add NV support for the AT family of instructions, which mostly results
        : in adding a page table walker that deals with most of the complexity
        : of the architecture.
        :
        : From the cover letter:
        :
        : "Another task that a hypervisor supporting NV on arm64 has to deal with
        : is to emulate the AT instruction, because we multiplex all the S1
        : translations on a single set of registers, and the guest S2 is never
        : truly resident on the CPU.
        :
        : So given that we lie about page tables, we also have to lie about
        : translation instructions, hence the emulation. Things are made
        : complicated by the fact that guest S1 page tables can be swapped out,
        : and that our shadow S2 is likely to be incomplete. So while using AT
        : to emulate AT is tempting (and useful), it is not going to always
        : work, and we thus need a fallback in the shape of a SW S1 walker."
        : .
        KVM: arm64: nv: Add support for FEAT_ATS1A
        KVM: arm64: nv: Plumb handling of AT S1* traps from EL2
        KVM: arm64: nv: Make AT+PAN instructions aware of FEAT_PAN3
        KVM: arm64: nv: Sanitise SCTLR_EL1.EPAN according to VM configuration
        KVM: arm64: nv: Add SW walker for AT S1 emulation
        KVM: arm64: nv: Make ps_to_output_size() generally available
        KVM: arm64: nv: Add emulation of AT S12E{0,1}{R,W}
        KVM: arm64: nv: Add basic emulation of AT S1E2{R,W}
        KVM: arm64: nv: Add basic emulation of AT S1E1{R,W}P
        KVM: arm64: nv: Add basic emulation of AT S1E{0,1}{R,W}
        KVM: arm64: nv: Honor absence of FEAT_PAN2
        KVM: arm64: nv: Turn upper_attr for S2 walk into the full descriptor
        KVM: arm64: nv: Enforce S2 alignment when contiguous bit is set
        arm64: Add ESR_ELx_FSC_ADDRSZ_L() helper
        arm64: Add system register encoding for PSTATE.PAN
        arm64: Add PAR_EL1 field description
        arm64: Add missing APTable and TCR_ELx.HPD masks
        KVM: arm64: Make kvm_at() take an OP_AT_*
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      
      # Conflicts:
      #	arch/arm64/kvm/nested.c
      2e0f2394
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/selftests-6.12 into kvmarm-master/next · f77e63e2
      Marc Zyngier authored
      * kvm-arm64/selftests-6.12:
        : .
        : KVM/arm64 selftest updates for 6.12
        :
        : - Check for a bunch of timer emulation corner cases (COlton Lewis)
        : .
        KVM: arm64: selftests: Add arch_timer_edge_cases selftest
        KVM: arm64: selftests: Ensure pending interrupts are handled in arch_timer test
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      f77e63e2
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/vgic-sre-traps into kvmarm-master/next · acf2ab28
      Marc Zyngier authored
      * kvm-arm64/vgic-sre-traps:
        : .
        : Fix the multiple of cases where KVM/arm64 doesn't correctly
        : handle the guest trying to use a GICv3 that isn't advertised.
        :
        : From the cover letter:
        :
        : "It recently appeared that, when running on a GICv3-equipped platform
        : (which is what non-ancient arm64 HW has), *not* configuring a GICv3
        : for the guest could result in less than desirable outcomes.
        :
        : We have multiple issues to fix:
        :
        : - for registers that *always* trap (the SGI registers) or that *may*
        :   trap (the SRE register), we need to check whether a GICv3 has been
        :   instantiated before acting upon the trap.
        :
        : - for registers that only conditionally trap, we must actively trap
        :   them even in the absence of a GICv3 being instantiated, and handle
        :   those traps accordingly.
        :
        : - finally, ID registers must reflect the absence of a GICv3, so that
        :   we are consistent.
        :
        : This series goes through all these requirements. The main complexity
        : here is to apply a GICv3 configuration on the host in the absence of a
        : GICv3 in the guest. This is pretty hackish, but I don't have a much
        : better solution so far.
        :
        : As part of making wider use of of the trap bits, we fully define the
        : trap routing as per the architecture, something that we eventually
        : need for NV anyway."
        : .
        KVM: arm64: selftests: Cope with lack of GICv3 in set_id_regs
        KVM: arm64: Add selftest checking how the absence of GICv3 is handled
        KVM: arm64: Unify UNDEF injection helpers
        KVM: arm64: Make most GICv3 accesses UNDEF if they trap
        KVM: arm64: Honor guest requested traps in GICv3 emulation
        KVM: arm64: Add trap routing information for ICH_HCR_EL2
        KVM: arm64: Add ICH_HCR_EL2 to the vcpu state
        KVM: arm64: Zero ID_AA64PFR0_EL1.GIC when no GICv3 is presented to the guest
        KVM: arm64: Add helper for last ditch idreg adjustments
        KVM: arm64: Force GICv3 trap activation when no irqchip is configured on VHE
        KVM: arm64: Force SRE traps when SRE access is not enabled
        KVM: arm64: Move GICv3 trap configuration to kvm_calculate_traps()
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      acf2ab28
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/fpmr into kvmarm-master/next · 091258a0
      Marc Zyngier authored
      * kvm-arm64/fpmr:
        : .
        : Add FP8 support to the KVM/arm64 floating point handling.
        :
        : This includes new ID registers (ID_AA64PFR2_EL1 ID_AA64FPFR0_EL1)
        : being made visible to guests, as well as a new confrol register
        : (FPMR) which gets context-switched.
        : .
        KVM: arm64: Expose ID_AA64PFR2_EL1 to userspace and guests
        KVM: arm64: Enable FP8 support when available and configured
        KVM: arm64: Expose ID_AA64FPFR0_EL1 as a writable ID reg
        KVM: arm64: Honor trap routing for FPMR
        KVM: arm64: Add save/restore support for FPMR
        KVM: arm64: Move FPMR into the sysreg array
        KVM: arm64: Add predicate for FPMR support in a VM
        KVM: arm64: Move SVCR into the sysreg array
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      091258a0
    • Marc Zyngier's avatar
      Merge branch kvm-arm64/mmu-misc-6.12 into kvmarm-master/next · 8884fd12
      Marc Zyngier authored
      * kvm-arm64/mmu-misc-6.12:
        : .
        : Various minor MMU improvements and bug-fixes:
        :
        : - Prevent MTE tags being restored by userspace if we are actively
        :   logging writes, as that's a recipe for disaster
        :
        : - Correct the refcount on a page that is not considered for MTE
        :   tag copying (such as a device)
        :
        : - When walking a page table to split blocks, keep the DSB at the end
        :   the walk, as there is no need to perform it on every store.
        :
        : - Fix boundary check when transfering memory using FFA
        : .
        KVM: arm64: Add memory length checks and remove inline in do_ffa_mem_xfer
        KVM: arm64: Disallow copying MTE to guest memory while KVM is dirty logging
        KVM: arm64: Release pfn, i.e. put page, if copying MTE tags hits ZONE_DEVICE
        KVM: arm64: Move data barrier to end of split walk
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      8884fd12
  2. 10 Sep, 2024 1 commit
  3. 30 Aug, 2024 20 commits
  4. 29 Aug, 2024 1 commit
  5. 27 Aug, 2024 13 commits