When userspace (QEMU) is using the debug resource to debug guest then we want MSR_DE to be always set. This patch adds missing MSR_DE setting in "rfci" instruction.
Signed-off-by: Bharat Bhushan <bharat.bhus...@freescale.com> --- arch/powerpc/kvm/booke_emulate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/booke_emulate.c b/arch/powerpc/kvm/booke_emulate.c index 27a4b28..80c51a2 100644 --- a/arch/powerpc/kvm/booke_emulate.c +++ b/arch/powerpc/kvm/booke_emulate.c @@ -40,7 +40,11 @@ static void kvmppc_emul_rfi(struct kvm_vcpu *vcpu) static void kvmppc_emul_rfci(struct kvm_vcpu *vcpu) { vcpu->arch.pc = vcpu->arch.csrr0; - kvmppc_set_msr(vcpu, vcpu->arch.csrr1); + /* Force MSR_DE when guest does not own debug facilities */ + if (vcpu->guest_debug) + kvmppc_set_msr(vcpu, vcpu->arch.csrr1 | MSR_DE); + else + kvmppc_set_msr(vcpu, vcpu->arch.csrr1); } int kvmppc_booke_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html