Re: KVM: Book3S PR: unbreaking software breakpoints

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

 



Mark Cave-Ayland <mark.cave-ayland@xxxxxxxxxxxx> writes:

> For comparison both booke.c and e500_emulate.c set debug.arch.status = 0 for software
> breakpoints, whereas both book3s_hv.c and book3s_pr.c do not. Given that emulate.c
> contains shared code for handling software breakpoints, would the following simple
> patch suffice?
>
>
> diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
> index 9f5b8c01c4e1..e77becaad5dd 100644
> --- a/arch/powerpc/kvm/emulate.c
> +++ b/arch/powerpc/kvm/emulate.c
> @@ -282,6 +282,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct
> kvm_vcpu *vcpu)
>                  */
>                 if (inst == KVMPPC_INST_SW_BREAKPOINT) {
>                         run->exit_reason = KVM_EXIT_DEBUG;
> +                       run->debug.arch.status = 0;
>                         run->debug.arch.address = kvmppc_get_pc(vcpu);
>                         emulated = EMULATE_EXIT_USER;
>                         advance = 0;

This looks reasonable to me.

>
>
> ATB,
>
> Mark.




[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux