Switch shadow/host debug registers on guest enter/exit path
Subsystems (2)
PATCH 3/5 Switch shadow/host debug registers on guest enter/exit path
So that we don't give any chance for host to trigger the debug event. Also the debug ability in guest can be implemented based on this.
Signed-off-by Liu Yu <[email protected]>
--- arch/powerpc/kernel/asm-offsets.c | 3 ++ arch/powerpc/kvm/booke_interrupts.S | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 0 deletions(-)
arch/powerpc/kernel/asm-offsets.c +3 -0
@@ -379,6 +379,9 @@ int main(void) DEFINE(VCPU_LAST_INST, offsetof(struct kvm_vcpu, arch.last_inst)); DEFINE(VCPU_FAULT_DEAR, offsetof(struct kvm_vcpu, arch.fault_dear)); DEFINE(VCPU_FAULT_ESR, offsetof(struct kvm_vcpu, arch.fault_esr)); + DEFINE(VCPU_SHADOW_DBG, offsetof(struct kvm_vcpu, arch.shadow_dbg_reg)); + DEFINE(VCPU_HOST_DBG, offsetof(struct kvm_vcpu, arch.host_dbg_reg)); +DEFINE (VCPU_GUEST_DEBUG , offsetof(struct kvm_vcpu , guest_debug));#endif #ifdef CONFIG_44xDEFINE (PGD_T_LOG2 ,PGD_T_LOG2 );
arch/powerpc/kvm/booke_interrupts.S +58 -0
70 lines not on this page · raw message
Signature · 1 line
1.5.4