[PATCH v4 06/15] KVM: arm64: Restore mdcr_el2 from vcpu
Will Deacon
will at kernel.org
Wed Aug 18 06:13:51 PDT 2021
On Tue, Aug 17, 2021 at 09:11:25AM +0100, Fuad Tabba wrote:
> On deactivating traps, restore the value of mdcr_el2 from the
> newly created and preserved host value vcpu context, rather than
> directly reading the hardware register.
>
> Up until and including this patch the two values are the same,
> i.e., the hardware register and the vcpu one. A future patch will
> be changing the value of mdcr_el2 on activating traps, and this
> ensures that its value will be restored.
>
> No functional change intended.
>
> Signed-off-by: Fuad Tabba <tabba at google.com>
> ---
> arch/arm64/include/asm/kvm_host.h | 5 ++++-
> arch/arm64/include/asm/kvm_hyp.h | 2 +-
> arch/arm64/kvm/hyp/include/hyp/switch.h | 6 +++++-
> arch/arm64/kvm/hyp/nvhe/switch.c | 13 +++++--------
> arch/arm64/kvm/hyp/vhe/switch.c | 14 +++++---------
> arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 2 +-
> 6 files changed, 21 insertions(+), 21 deletions(-)
Acked-by: Will Deacon <will at kernel.org>
Will
More information about the linux-arm-kernel
mailing list