RE: [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, July 29, 2014 3:25 AM
> To: Bhushan Bharat-R65777
> Cc: agraf@xxxxxxx; kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; Yoder Stuart-
> B08248
> Subject: Re: [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under
> debug
> 
> On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote:
> > 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.Bhushan@xxxxxxxxxxxxx>
> > ---
> >  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,
> 
> It looks like this is already handled by kvmppc_vcpu_sync_debug(), which is
> called by kvmppc_set_msr().

Yes, you are right. This patch is not needed.

Thanks
-Bharat

> 
> Plus, it should only be done for HV mode.
> 
> -Scott
> 

��.n��������+%������w��{.n�����o�^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux