qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] SPARC user mode multithread


From: David Munday
Subject: Re: [Qemu-devel] SPARC user mode multithread
Date: Thu, 5 Nov 2009 12:29:39 -0800 (PST)

Hi,
I found the Linux/Sparc clone operations in copy_thread() from process32.c 
(attached)

I tried modifying cpu_clone_regs with the following code per the Sparc/linux 
routines, but qemu still stalls on signal suspend.

It seems like it should only need to set the stack pointer and the return 
addresses for the child and parent processes, but it's clearly missing 
something.

Is there more to this fix than these two assignments?

static inline void cpu_clone_regs(CPUState *PARENT_env, CPUState *child_env, 
target_ulong newsp)
{
    if (newsp)
    {
     child_env->regwptr[14] = newsp; //changed to 14 per process32.c DM
         //env->regwptr[22] = newsp;
     printf("setting stack pointer\n");
    }
    child_env->regwptr[0] = 0;
    child_env->regwptr[1] = 1; //added per process32.c in kernel for sparc
    parent_env->regwptr[1] = 0;  //make parent return value = 0  per 
process32.c in kernel for sparc}
}

Thanks,
David


----- Original Message -----
From: "Blue Swirl" <address@hidden>
To: "David Munday" <address@hidden>
Cc: address@hidden
Sent: Tuesday, November 3, 2009 12:41:04 PM GMT -08:00 US/Canada Pacific
Subject: Re: [Qemu-devel] SPARC user mode multithread

On Tue, Nov 3, 2009 at 10:03 PM, David Munday <address@hidden> wrote:
> Hello,
> I am trying to run the blackscholes program from the PARSEC2.1 benchmark 
> suite in QEMU SPARC user mode.
> In this case I am trying to run with just 2 threads. Unfortunately, when I 
> try to run the program it hangs with the following prints:
>
> HELPME: 
> /mada/users/cromom/ESESC_PROJECT/esesc/emul/qemu1/target-sparc/cpu.h:516
> HELPME: 
> /mada/users/cromom/ESESC_PROJECT/esesc/emul/qemu1/target-sparc/cpu.h:516

It means that someone should figure out what Linux/Sparc does to
registers, register windows and processor flags when doing "clone".
The fix should be trivial.




reply via email to

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