qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [5601] Halt the CPU using a qemu_irq


From: Blue Swirl
Subject: Re: [Qemu-devel] [5601] Halt the CPU using a qemu_irq
Date: Sun, 2 Nov 2008 14:23:01 +0200

On 11/2/08, Paul Brook <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]