Merge tag 'kvmarm-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmar...
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 May 2025 20:19:46 +0000 (16:19 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 May 2025 20:19:46 +0000 (16:19 -0400)
KVM/arm64 updates for 6.16

* New features:

  - Add large stage-2 mapping support for non-protected pKVM guests,
    clawing back some performance.

  - Add UBSAN support to the standalone EL2 object used in nVHE/hVHE and
    protected modes.

  - Enable nested virtualisation support on systems that support it
    (yes, it has been a long time coming), though it is disabled by
    default.

* Improvements, fixes and cleanups:

  - Large rework of the way KVM tracks architecture features and links
    them with the effects of control bits. This ensures correctness of
    emulation (the data is automatically extracted from the published
    JSON files), and helps dealing with the evolution of the
    architecture.

  - Significant changes to the way pKVM tracks ownership of pages,
    avoiding page table walks by storing the state in the hypervisor's
    vmemmap. This in turn enables the THP support described above.

  - New selftest checking the pKVM ownership transition rules

  - Fixes for FEAT_MTE_ASYNC being accidentally advertised to guests
    even if the host didn't have it.

  - Fixes for the address translation emulation, which happened to be
    rather buggy in some specific contexts.

  - Fixes for the PMU emulation in NV contexts, decoupling PMCR_EL0.N
    from the number of counters exposed to a guest and addressing a
    number of issues in the process.

  - Add a new selftest for the SVE host state being corrupted by a
    guest.

  - Keep HCR_EL2.xMO set at all times for systems running with the
    kernel at EL2, ensuring that the window for interrupts is slightly
    bigger, and avoiding a pretty bad erratum on the AmpereOne HW.

  - Add workaround for AmpereOne's erratum AC04_CPU_23, which suffers
    from a pretty bad case of TLB corruption unless accesses to HCR_EL2
    are heavily synchronised.

  - Add a per-VM, per-ITS debugfs entry to dump the state of the ITS
    tables in a human-friendly fashion.

  - and the usual random cleanups.

1  2 
Documentation/virt/kvm/api.rst
arch/arm64/include/asm/el2_setup.h
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/hyp/nvhe/mem_protect.c
arch/arm64/kvm/mmu.c
arch/arm64/kvm/sys_regs.c
include/uapi/linux/kvm.h
tools/testing/selftests/kvm/Makefile.kvm
tools/testing/selftests/kvm/arm64/set_id_regs.c

Simple merge
Simple merge
Simple merge
Simple merge
index 96f625dc725669a0bcb15748516cfda1318d8783,eef310cdbdbd53eedb0ab5a255d83f05f69834c4..bb9f2eecfb670a9e181a68b3967fd139324ed1be
@@@ -260,15 -308,11 +307,12 @@@ static inline void __activate_traps_com
        if (cpus_have_final_cap(ARM64_HAS_HCX)) {
                u64 hcrx = vcpu->arch.hcrx_el2;
                if (vcpu_has_nv(vcpu) && !is_hyp_ctxt(vcpu)) {
-                       u64 clr = 0, set = 0;
-                       compute_clr_set(vcpu, HCRX_EL2, clr, set);
-                       hcrx |= set;
-                       hcrx &= ~clr;
+                       u64 val = __vcpu_sys_reg(vcpu, HCRX_EL2);
+                       hcrx |= val & __HCRX_EL2_MASK;
+                       hcrx &= ~(~val & __HCRX_EL2_nMASK);
                }
  
 +              ctxt_sys_reg(hctxt, HCRX_EL2) = read_sysreg_s(SYS_HCRX_EL2);
                write_sysreg_s(hcrx, SYS_HCRX_EL2);
        }
  
Simple merge
Simple merge
Simple merge
Simple merge