qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [sparc64] qemu crashes after the "OpenBIOS for Sparc64"


From: Paul Brook
Subject: Re: [Qemu-devel] [sparc64] qemu crashes after the "OpenBIOS for Sparc64" banner is printed
Date: Fri, 29 Aug 2008 20:22:46 +0100
User-agent: KMail/1.9.9

> Surprisingly it was moving of do_interrupt to helper.c that caused the
> bug. Moving it back to op_helper.c allows Sparc64 to boot. I'm still
> trying to understand the real cause of the bug and to find if there is
> some other way of fixing this. This kind of voodoo makes me nervous.

do_interrupt calls change_pstate, which relies on global register state.  
Global register state is only valid when called directly from translated code 
or other code that includes exec.h.

You should never call code in op_helper.c from outside that file (or 
cpu-exec.h). The easy way to enforce this is to put teh declarations for 
functions defined in op_helper.h in exec.h, not helper.h or cpu.h. Failure to 
follow this rule results in bugs like the one you've encountered.

helper.h is included multiple times, so should really just contain DEF_HELPER 
statements.

Paul




reply via email to

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