summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2026-10-26 08:26:33 +0000
committerMarc Zyngier <maz@kernel.org>2026-11-03 13:42:25 +0000
commit51f7c4a7d311930868041634bc041633b94d68c1 (patch)
treea8de5b27126b53bf8a8189f135999daa3f70f3a4 /tools/perf/scripts/python
parent491fe17530d662a7e6c6b4d139d950dfa0e3a210 (diff)
KVM: arm64: Don't let a guest overwrite HCRX_EL2.MCE2
FEAT_MOPS is fun. CPUs are allowed to implement any of two ways to perform the memory copy, and the hypervisor is in charge of hiding the difference between implementation when the vcpu migrates from one to another. This is unhelpfully signalled with an exception, which KVM diligently handles. Today, we don't really make a good job of it in the sense that if L1 also has the trap bit set, we don't forward the trap as the architecture would require us to do. But there is no good reason to forward this to the L1 guest if L2 generates the "I'm on the wrong implementation". KVM can fix it up in place and return to L2 directly, as if the physical CPU was able to implement both options. Conversely, allowing L1 to clear HCRX_EL2.MCE2 is counter-productive, and violates the abstraction that KVM aims to give. Implement this behaviour by never allowing the guest's view of HCRX_EL2.MCE2 to make it into the HW, and document that KVM is in charge of the A/B handling. Reviewed-by: Oliver Upton <oupton@kernel.org> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20261026082633.2515820-1-maz@kernel.org Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions