Re: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE
On 29.07.14 00:01, Scott Wood wrote: On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: When userspace is debugging guest then MSR_DE is always set and MSRP_DEP is set so that guest cannot change MSR_DE. Guest debug resources are not yet emulated, So there seems no reason we should stop guest controlling MSR_DE. Also a followup patch will enable debug emulation and that requires guest to control MSR_DE. Why does it matter whether we emulate debug resources? We still don't want the guest to be able to clear MSR[DE] and thus break host debug. The patch description is misleading. This patch changes the default of DEP to guest controlled when it boots up. Once QEMU wants control over the debug registers, it gets switched to QEMU controlled (that code is already there). Alex -- 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
RE: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, July 29, 2014 7:35 PM To: Wood Scott-B07421; Bhushan Bharat-R65777 Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Yoder Stuart-B08248 Subject: Re: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE On 29.07.14 00:01, Scott Wood wrote: On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: When userspace is debugging guest then MSR_DE is always set and MSRP_DEP is set so that guest cannot change MSR_DE. Guest debug resources are not yet emulated, So there seems no reason we should stop guest controlling MSR_DE. Also a followup patch will enable debug emulation and that requires guest to control MSR_DE. Why does it matter whether we emulate debug resources? We still don't want the guest to be able to clear MSR[DE] and thus break host debug. The patch description is misleading. This patch changes the default of DEP to guest controlled when it boots up. Once QEMU wants control over the debug registers, it gets switched to QEMU controlled (that code is already there). Yes, now default MSR_DE is controlled by guest and when QEMU wants to use debug resources then MSR_DEP is set, so guest cannot change MSR_DE. Thanks -Bharat Alex
Re: [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE
On Fri, 2014-07-11 at 14:09 +0530, Bharat Bhushan wrote: When userspace is debugging guest then MSR_DE is always set and MSRP_DEP is set so that guest cannot change MSR_DE. Guest debug resources are not yet emulated, So there seems no reason we should stop guest controlling MSR_DE. Also a followup patch will enable debug emulation and that requires guest to control MSR_DE. Why does it matter whether we emulate debug resources? We still don't want the guest to be able to clear MSR[DE] and thus break host debug. -Scott -- 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
[PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE
When userspace is debugging guest then MSR_DE is always set and MSRP_DEP is set so that guest cannot change MSR_DE. Guest debug resources are not yet emulated, So there seems no reason we should stop guest controlling MSR_DE. Also a followup patch will enable debug emulation and that requires guest to control MSR_DE. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/e500mc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c index 690499d..bd0a2bd 100644 --- a/arch/powerpc/kvm/e500mc.c +++ b/arch/powerpc/kvm/e500mc.c @@ -194,7 +194,7 @@ int kvmppc_core_vcpu_setup(struct kvm_vcpu *vcpu) #ifdef CONFIG_64BIT vcpu-arch.shadow_epcr |= SPRN_EPCR_ICM; #endif - vcpu-arch.shadow_msrp = MSRP_UCLEP | MSRP_DEP | MSRP_PMMP; + vcpu-arch.shadow_msrp = MSRP_UCLEP | MSRP_PMMP; vcpu-arch.eplc = EPC_EGS | (vcpu-kvm-arch.lpid EPC_ELPID_SHIFT); vcpu-arch.epsc = vcpu-arch.eplc; -- 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