qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Blue Swirl" <blauwirbel@gmail.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [5601] Halt the CPU using a qemu_irq
Date: Sun, 2 Nov 2008 14:23:01 +0200	[thread overview]
Message-ID: <f43fc5580811020423y37d31957oc83681f4f38355ac@mail.gmail.com> (raw)
In-Reply-To: <200811021213.05223.paul@codesourcery.com>

On 11/2/08, Paul Brook <paul@codesourcery.com> wrote:
> > +static void cpu_halt_signal(void *opaque, int irq, int level)
>  > +{
>  > +    if (level && cpu_single_env)
>  > +        cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HALT);
>  > +}
>
> >...
>
> > +    cpu_halt = qemu_allocate_irqs(cpu_halt_signal, NULL, 1);
>
>
> Will this DTRT for SMP, or should we be including cpu_env as an argument to
>  cpu_halt_signal? Relying on cpu_single_env being set in an IRQ handler seems
>  kinda sketchy.

I actually had a version like that too, so that the first CPU was
halted like before. We could also halt all CPUs. But then I decided to
use cpu_single_env, because then the currently executing CPU that
touches the register will be halted. Given that Linux does not halt
the CPU when in SMP mode (arch/sparc/kernel/process.c) it's difficult
to say which way is correct. I don't have docs for the APC and PMC
chips used.

      reply	other threads:[~2008-11-02 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 10:51 [Qemu-devel] [5601] Halt the CPU using a qemu_irq Blue Swirl
2008-11-02 12:12 ` Paul Brook
2008-11-02 12:23   ` Blue Swirl [this message]

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=f43fc5580811020423y37d31957oc83681f4f38355ac@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).