All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Mads Ynddal <mads@ynddal.dk>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"open list:Overall KVM CPUs" <kvm@vger.kernel.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>
Subject: Re: [PATCH] gdbstub: move update guest debug to accel ops
Date: Mon, 06 Feb 2023 13:52:26 +0000	[thread overview]
Message-ID: <871qn2rjd2.fsf@linaro.org> (raw)
In-Reply-To: <4B19094C-63DC-4A81-A008-886504256D5D@ynddal.dk>


Mads Ynddal <mads@ynddal.dk> writes:

>> It will do. You could just call it update_guest_debug as it is an
>> internal static function although I guess that makes grepping a bit of a
>> pain.
>
> I agree. It should preferably be something unique, to ease grep'ing.
>
>> Is something being accidentally linked with linux-user and softmmu?
>
> Good question. I'm not familiar enough with the code base to know.
>
> I experimented with enabling/disabling linux-user when configuring, and it does
> affect whether it compiles or not.
>
> The following seems to fix it, and I can see the same approach is taken other
> places in cpu.c. Would this be an acceptable solution?
>
> diff --git a/cpu.c b/cpu.c
> index 6effa5acc9..c9e8700691 100644
> --- a/cpu.c
> +++ b/cpu.c
> @@ -386,6 +386,7 @@ void cpu_breakpoint_remove_all(CPUState *cpu, int mask)
>  void cpu_single_step(CPUState *cpu, int enabled)
>  {
>      if (cpu->singlestep_enabled != enabled) {
> +#if !defined(CONFIG_USER_ONLY)
>          const AccelOpsClass *ops = cpus_get_accel();
>
>          cpu->singlestep_enabled = enabled;
> @@ -393,6 +394,7 @@ void cpu_single_step(CPUState *cpu, int enabled)
>          if (ops->update_guest_debug) {
>              ops->update_guest_debug(cpu, 0);
>          }
> +#endif
>
>          trace_breakpoint_singlestep(cpu->cpu_index, enabled);
>      }

Sorry this dropped of my radar. Yes I think the ifdef will do. Are you
going to post a v2 with all the various updates?

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

  reply	other threads:[~2023-02-06 13:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 12:17 [PATCH] gdbstub: move update guest debug to accel ops Mads Ynddal
2022-11-23 12:25 ` Mads Ynddal
2022-11-23 14:05 ` Alex Bennée
2022-11-23 14:41   ` Mads Ynddal
2022-11-23 18:20 ` Philippe Mathieu-Daudé
2022-11-24 13:59   ` Mads Ynddal
2022-12-14 14:16     ` Alex Bennée
2022-12-20 10:45       ` Mads Ynddal
2023-02-06 13:52         ` Alex Bennée [this message]
2023-02-07 11:58           ` Mads Ynddal

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=871qn2rjd2.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=kvm@vger.kernel.org \
    --cc=mads@ynddal.dk \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=wangyanan55@huawei.com \
    /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.