Skip to contentSkip to conversation

Switch shadow/host debug registers on guest enter/exit path

PATCH In review Liu Yu 1 participant 1 message Aug 3, 2009

Subsystems (2)
lore
Share & tools
lore

Liu Yu

author
#0 lore raw

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.

---
 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
index 561b646..643ee15 100644
@@ -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_44x
 	DEFINE(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