All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@linux.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: KVM: Book3S PR: unbreaking software breakpoints
Date: Mon, 13 May 2019 18:14:09 +0000	[thread overview]
Message-ID: <87zhnq1atq.fsf@linux.ibm.com> (raw)
In-Reply-To: <e84fd80c-d6a6-8f19-a4e1-ed309fa68aa9@ilande.co.uk>

Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> 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.

  parent reply	other threads:[~2019-05-13 18:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-11 14:08 KVM: Book3S PR: unbreaking software breakpoints Mark Cave-Ayland
2019-05-13  6:01 ` Alexey Kardashevskiy
2019-05-13  6:51 ` Mark Cave-Ayland
2019-05-13 18:14 ` Fabiano Rosas [this message]
2019-05-13 18:22 ` Fabiano Rosas
2019-05-13 19:15 ` Mark Cave-Ayland
2019-05-13 19:57 ` Mark Cave-Ayland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhnq1atq.fsf@linux.ibm.com \
    --to=farosas@linux.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.