mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
d400c5b202
debug-sr.c contains KVM's code for context-switching debug registers, with some code shared between VHE/nVHE. These common routines are moved to a header file, VHE-specific code is moved to vhe/debug-sr.c and nVHE-specific code to nvhe/debug-sr.c. Functions are slightly refactored to move code hidden behind `has_vhe()` checks to the corresponding .c files. Signed-off-by: David Brazdil <dbrazdil@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20200625131420.71444-11-dbrazdil@google.com
27 lines
464 B
C
27 lines
464 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (C) 2015 - ARM Ltd
|
|
* Author: Marc Zyngier <marc.zyngier@arm.com>
|
|
*/
|
|
|
|
#include <hyp/debug-sr.h>
|
|
|
|
#include <linux/kvm_host.h>
|
|
|
|
#include <asm/kvm_hyp.h>
|
|
|
|
void __debug_switch_to_guest(struct kvm_vcpu *vcpu)
|
|
{
|
|
__debug_switch_to_guest_common(vcpu);
|
|
}
|
|
|
|
void __debug_switch_to_host(struct kvm_vcpu *vcpu)
|
|
{
|
|
__debug_switch_to_host_common(vcpu);
|
|
}
|
|
|
|
u32 __kvm_get_mdcr_el2(void)
|
|
{
|
|
return read_sysreg(mdcr_el2);
|
|
}
|