Skip to content
Commit 76c546a9 authored by James Clark's avatar James Clark
Browse files

arm64: KVM: Write TRFCR value on guest switch with nVHE



The guest value for TRFCR requested by the Coresight driver is saved in
kvm_host_global_state. On guest switch this value needs to be written to
the register. Currently TRFCR is only modified when we want to disable
trace completely in guests due to an issue with TRBE. Expand the
__debug_save_trace() function to always write to the register if a
different value for guests is required, but also keep the existing TRBE
disable behavior if that's required.

The TRFCR restore function remains functionally the same, except a value
of 0 doesn't mean "don't restore" anymore. Now that we save both guest
and host values the register is restored any time the guest and host
values differ.

Signed-off-by: James Clark's avatarJames Clark <james.clark@arm.com>
parent 396895f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment