|
|
Log in / Subscribe / Register

KQEMU 1.3.0pre10 released - under the GPL

KQEMU 1.3.0pre10 released - under the GPL

Posted Feb 7, 2007 22:08 UTC (Wed) by danshearer (guest, #18686)
In reply to: KQEMU 1.3.0pre10 released - under the GPL by mikov
Parent article: KQEMU 1.3.0pre10 released - under the GPL

> AFAIK, QEMU uses GCC to generate binary code for the emulated instructions > and then simply chains together these binary blobs. This allows it to be
> (almost) trivially ported to any architecture supported by GCC.

That was the idea, but it is quite fragile and tied to specific GCC versions.

> I think there is an opportunity for somebody to improve QEMU by replacing
> the code generation engine with a hand-tuned one (sacrificing the easy
> portability to any host). Perhaps LLVM could be used. I think this can
> bring the emulation speed from its current 10x slowdown to about 3-5x
> (without any kernel code!). This is a very exciting area.

See https://nowt.dyndns.org/ where Paul Brook has done exactly this, and I think Fabrice intends to merge Paul's code.


to post comments

KQEMU 1.3.0pre10 released - under the GPL

Posted Feb 8, 2007 0:16 UTC (Thu) by mikov (guest, #33179) [Link] (2 responses)

See https://nowt.dyndns.org/ where Paul Brook has done exactly this, and I think Fabrice intends to merge Paul's code.

Very interesting. Are there any details available on the implementation of the generator ? Intermediate representation, what optimizations it performs, etc ? Or any performance benchmarks ?

I couldn't find anything relevant with Google. All I was able to find was one sentence claiming 30% improvement, which is somewhat disappointing.

KQEMU 1.3.0pre10 released - under the GPL

Posted Feb 8, 2007 11:09 UTC (Thu) by danshearer (guest, #18686) [Link] (1 responses)

> Very interesting. Are there any details available on the implementation of
> the generator ?

Not that I know of, apart from the code.

If you have the skills, why not document what you see as you read the code? That would be helpful to people like me. I am playing with Paul's work because it addresses a problem I care about (portability, preventing me from creating internal test suites for QEMU) but so long as it works my interests lie elsewhere inside QEMU. But if there was a guided tour I'd have a look for sure.

Dan

KQEMU 1.3.0pre10 released - under the GPL

Posted Feb 8, 2007 20:12 UTC (Thu) by mikov (guest, #33179) [Link]

I think the original author is in the best position to write something like that. It shouldn't take long to describe the basic idea of what he has done - just an outline. Anyway, I think writing a guide is not so much an issue of skill, but of time ... :-(

HP's Dynamo, Intel's IA32-EL, Transmeta and others have shown that there is definite potential in re-optimizing binary code. It is possible that an advanced optimizing code generator for QEMU could even outperform native code! Of course it would have to go significantly beyond the current QEMU infrastructure and rely on dynamic recompilation, trace optimization, etc. Some more info on this subject is available here: http://www.cag.csail.mit.edu/rio/#pubs/

In any case I will definitely take a closer look at Paul Brook's work. BTW, how does it address portability ?

KQEMU 1.3.0pre10 released - under the GPL

Posted Feb 8, 2007 11:12 UTC (Thu) by jfj (guest, #37917) [Link] (1 responses)

> That was the idea, but it is quite fragile and tied to specific GCC versions.

Some people bring this up as if it's a bad thing.

Why exactly it is do difficult to download gcc-core-4.0 and install it to /opt/gcc4.0 and use it for qemu?

The installation of gcc is very clean and easy, with modern computers it won't take more than 10 minutes, there are lots of mirrors of GNU software and you will always be able to find gcc-4.0.

And we are talking about developers. Distributions can arrange binaries that won't need gcc 4.

KQEMU 1.3.0pre10 released - under the GPL

Posted Feb 8, 2007 11:29 UTC (Thu) by danshearer (guest, #18686) [Link]

> > That was the idea, but it is quite fragile and tied to specific GCC
> > versions.
> Some people bring this up as if it's a bad thing.
:
> And we are talking about developers. Distributions can arrange binaries
> that won't need gcc 4.

1. gcc 4 doesn't neccesarily work at all on a given architecture, and this will always be the case in some circumstances as versions shift under our feet. I was in this situation with QEMU on a pure AMD64 setup last year.

2. Most QEMU use is not production. For experimenting and testing people often want to compile QEMU, even if just to incorporate a patch someone posted. Such QEMU users usually have some other primary goal -- testing networking maybe, or some funny OS -- and building GCC isn't necessarily something they will think of or even be able to easily do.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds