From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TinOl-0002LS-36 for qemu-devel@nongnu.org; Wed, 12 Dec 2012 09:35:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TinOg-00086C-Ds for qemu-devel@nongnu.org; Wed, 12 Dec 2012 09:34:58 -0500 Received: from caibbdcaaaaf.dreamhost.com ([208.113.200.5]:43398 helo=homiemail-a42.g.dreamhost.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TinOg-00085x-2L for qemu-devel@nongnu.org; Wed, 12 Dec 2012 09:34:54 -0500 Message-ID: <50C8960C.7070900@eagerm.com> Date: Wed, 12 Dec 2012 06:34:52 -0800 From: Michael Eager MIME-Version: 1.0 References: <50C77E2D.4030901@eagerm.com> <20121212133932.GB16270@stefanha-thinkpad.redhat.com> In-Reply-To: <20121212133932.GB16270@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Internal documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel On 12/12/2012 05:39 AM, Stefan Hajnoczi wrote: > On Tue, Dec 11, 2012 at 10:40:45AM -0800, Michael Eager wrote: >> Is there any internal documentation for QEMU? > > Nothing up-to-date and complete. > >> I'm adding support for a new processor. I'm currently >> adding semihosting support and a new command line option. >> I find that I'm reading a lot of uncommented code and >> trying to reverse engineer QEMU's design by reading how >> various targets are implemented. > > Try the #qemu IRC channel on irc.oftc.net for specific questions. Thanks. I'll try that. > One nice thing is that, despite the lack of documentation or comments, > the nature of QEMU is that there are often multiple examples (target > CPUs, emulated devices, etc) similar to what you're trying to implement. > Read them to see which core functions you'll need and how to call them. I've been doing that. A lot. That's the reverse engineering I mentioned. Any documentation about what the core functions do would be helpful. My target is mostly working, but a lot of the development has been stepping through execution of other targets to figure out execution flow and why each implements similar features differently, then doing the same with my target, trying to understand the differences. It's much slower than reading a paragraph or two which says "to do this, call this, register that, use these options". -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077