summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSasha Levin <sashal@kernel.org>2026-10-17 12:52:04 -0400
committerMarc Zyngier <maz@kernel.org>2026-10-20 11:35:32 +0100
commit5b34f0b4adbf983174e53721f68b617113376f2f (patch)
treea5d72937d3de91844ed5f6f21747bf6eb0d4a93e /tools/perf/scripts/python
parent814607cd40df80d5727957adaa857e0feca43497 (diff)
KVM: arm64: Take a protected vCPU's TWI and TWE only at vCPU load
Commit 06499de8f998 ("KVM: arm64: Skip fixed-feature state flush for protected vCPUs") moved the copy of the host's TWI and TWE in flush_hyp_vcpu() into the non-protected branch: a protected vCPU takes them in __pkvm_vcpu_load() instead, and only VSE comes from the host on each entry. Commit 04447b95c62b ("KVM: arm64: Use the host's HCR_EL2 for non-protected VMs in pKVM") was written against the old code, where both VM types took TWI, TWE and VSE on each entry, and kept that for a protected VM as PKVM_HCR_EL2_HOST_PVM. The merge of the two applies PKVM_HCR_EL2_HOST_PVM in the common path, so a protected vCPU takes TWI and TWE from the host's vCPU on every entry again. That doesn't change what a protected guest runs with today: once the vCPU is initialised, the host only changes TWI and TWE in vcpu_set_wfx_traps(), which pkvm_vcpu_load() calls right before __pkvm_vcpu_load(). But it undoes part of 06499de8f998, and has EL2 read a protected vCPU's trap configuration from host memory on every entry, which nothing needs. Make PKVM_HCR_EL2_HOST_PVM VSE alone and add TWI and TWE to PKVM_HCR_EL2_HOST_NPVM, so that each mask again lists what EL2 takes from the host on each entry for its VM type. A non-protected VM takes the same bits as before. Say in the comments that a protected vCPU's TWI and TWE come at vCPU load. llminus, an LLM-assisted merge conflict resolution tool, found the difference while resolving the same conflict in an integration tree. Fixes: 439d8f9cb01c ("Merge tag 'kvmarm-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") Assisted-by: LLM Signed-off-by: Sasha Levin <sashal@kernel.org> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Tested-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20261017165204.3343275-1-sashal@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions