KVM: aarch64: Rebase up to v6.6 (second round)
requested to merge shahuang/centos-stream-9:RHEL9.4/kvm-arm-second-rebase/based-on-arm-with-kvm-merge/v2 into main
JIRA: https://issues.redhat.com/browse/RHEL-14347
Upstream Status: v6.6 + up to v6.6-rc8 fixes
Tested: kvm-unit-tests, kselftest.
This is the second round rebase kvm-arm to upstream v6.6 with some fixes up to v6.7-rc8, which contains almost everything, the merge request contains commits listed below:
- Support memcpy instructions in userspace.
- Permission Indirection Extension. (Now fully backported.)
- Add hVHE support.
- NV trap forwarding.
- Fix PMUver related handling of vPMU support.
- Support for FEAT_TLBIRANGE. (Although I put it here, there include two commits[The tlb things,
86a3a477a71b arm64: tlb: Refactor the core flush algorithm of __flush_tlb_range
and62759166b875 arm64: tlb: Implement __flush_s2_tlb_range_op()
] which should belong to arm64 mm, Mark suggest let the feature stay more time on upstream, and not hurry to backport it in this round. This should be pay attention.) - Misc commits.
- NV trap forwarding fixes.
- FF-A proxy for pKVM.
v3->v4:
- Add missed commits:
- 4f686790321 KVM: arm64: Allow pKVM on v1.0 compatible FF-A implementations
- be097997a273 KVM: arm64: Always invalidate TLB for stage-2 permission faults
- 849c1816436f KVM: selftests: fix supported_flags for aarch64
- Add some series:
- [PATCH v3 00/11] KVM: arm64: Accelerate lookup of vcpus by MPIDR values (and other fixes)
- [PATCH 0/8] KVM: arm64: Cleanup + fix to vCPU reset, feature flags
- [PATCH 0/5] KVM: arm64: vgic fixes for 6.7
v2->v3:
- Add three more commits which fix downstream commits:
- 851354cbd12b clocksource/drivers/arm_arch_timer: limit XGene-1 workaround
- d11974dc5f20 KVM: arm64: Add tracepoint for MMIO accesses where ISV==0
- 8e4ece6889a5 KVM: arm64: GICv4: Do not perform a map to a mapped vLPI
- Add the FF-A for pkvm:
- 229d58e31678 firmware: arm_ffa: Move constants to header file
- Although this belongs to firmware, but we need it to backport the FF-A pkvm series.
- 048be5fea43d KVM: arm64: Block unsafe FF-A calls from the host
- 12bdce4f4119 KVM: arm64: Probe FF-A version and host/hyp partition ID during init
- bc3888a0f4e9 KVM: arm64: Allocate pages for hypervisor FF-A mailboxes
- 9d0c6a9af9e3 KVM: arm64: Handle FFA_RXTX_MAP and FFA_RXTX_UNMAP calls from the host
- f9112eade788 KVM: arm64: Add FF-A helpers to share/unshare memory with secure world
- 436090001776 KVM: arm64: Handle FFA_MEM_SHARE calls from the host
- 0e3bcb49c135 KVM: arm64: Handle FFA_MEM_RECLAIM calls from the host
- 634d90cf0ac6 KVM: arm64: Handle FFA_MEM_LEND calls from the host
- 20936cd11479 KVM: arm64: Handle FFA_FEATURES call from the host
- 0a9f15fd5674 KVM: arm64: pkvm: Add support for fragmented FF-A descriptors
- Although we don't care the pKVM, but to keep the code consistency to decrease conflicts.
- 373beef00f7d KVM: arm64: nvhe: Ignore SVE hint in SMCCC function ID
- This is needed to fix the downstream. (If we don't backport the FF-A series, we would need to resolve conflicts, after evaluate it, backport the FF-A series is the easy way)
- 229d58e31678 firmware: arm_ffa: Move constants to header file
- One commits fix the kselftest set_memory_region_test fail, this hasn't been merged into upstream, but put it into the MR temporary to keep the kselftest work.
v1->v2:
- Add three more commits into the 2.Permission Indirection Extension. Now combine with the arm core rebase, this series is fully backported.
- 7df7170965a2 arm64: disable EL2 traps for PIE
- 6b776d385562 arm64: transfer permission indirection settings to EL2
- 5f0419a0083b KVM: selftests: get-reg-list: add Permission Indirection registers
- Dropped
c4b9fd2ac035 KVM: arm64: Drop is_kernel_in_hyp_mode() from__invalidate_icache_guest_page()
. This commit has been backported by Gavin's MR3322. - Add three more fixes commits related to the [PATCH v3 0/7] Fix setting SVE and SME traps in (h)VHE. Now this seris is fully backported and can be included in the 3. Add hVHE support.
- ce92232614a5 KVM: arm64: Factor out code for checking (h)VHE mode into a macro
- 45a3681a10ff KVM: arm64: Use the appropriate feature trap register for SVE at EL2 setup
- 380624d4358b KVM: arm64: Disable SME traps for (h)VHE at setup
- Add more NV fixes, although they are landed in v6.7-rc1, backport them in this round
- d5cb781b7741 arm64: Add missing _EL12 encodings
- 41f6c9344713 arm64: Add missing _EL2 encodings
- 04cf54650554 KVM: arm64: Refine _EL2 system register list that require trap reinjection
- c7d11a61c7f7 KVM: arm64: Do not let a L1 hypervisor access the *32_EL2 sysregs
- 3f7915ccc902 KVM: arm64: Handle AArch32 SPSR_{irq,abt,und,fiq} as RAZ/WI
Signed-off-by: Shaoqin Huang shahuang@redhat.com
Edited by Shaoqin Huang