Slashdot Mirror


QEMU Accelerator Achieves Near-Native Performance

An anonymous reader writes "QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic translation. Its sporting a new module called the 'Accelerator' which can achieve near native speeds, and currently runs on Linux 2.4.x and 2.6.x kernels. This means you could theoretically run Windows (or another OS) on a Linux machine at near native speeds without buying a commercial emulator. The catch is that although QEMU is released under various open source licenses, the Accelerator uses a free (as in beer) license because the module is a 'closed source proprietary product.' Fabrice Bellard does mention that he would consider open sourcing the Accelerator under certain conditions."

16 of 366 comments (clear)

  1. cool stuff by Prophetic_Truth · · Score: 3, Interesting

    but how fast is "near native"? Some would consider WINE near native in certain aspects, in short, WHERES THE BEEF?

    --
    time is a perception of a being's consciousness
    time is your 6th sense, the wierd ones are 7+
    1. Re:cool stuff by Guspaz · · Score: 2, Interesting

      The QEMU accelerator can also only run x86 binaries on x86 processors. It only works on x86.

      This is because it's not emulating, it's virtualizing, and tries to get as much code as possible to run native on the host CPU.

  2. Oh yeah! by Saint+Aardvark · · Score: 5, Interesting
    I've been trying out VMware's latest beta at work (journal entry on that in an hour or so) to run W2K on Linux, in order to try some patch automation software. It's great, but I'd love it if there was a Free program that'd do this.

    I dearly hope the accelerator gets GPL'd. Between sysadmin work (reverting to a snapshot ROX) and, just maybe, being able to move W2K people to Linux (there's only a handful of applications we need [damn you, Texas Instruments! Where's your Linux version of Code Composer?], and remote admin is just soooooooo much better with a Unix), I'd be very happy if a) this thing works as well as it's supposed to, and b) if there was some sort of tip jar I could kick in a few bucks to (like with Blender, I believe), and get it released when there was enough money.

    Incidentally, I tried installing W2K on qemu w/o the accelerator. When I left work on Friday, it was finishing up the second stage of installation; it was slow as molasses, but seemed to be working. This seems to contradict the note re: disk full during install problem noted on the support page. It's always possible I just haven't hit it yet, but does anyone else have any experience with W2K and qemu?

    1. Re:Oh yeah! by Spy+Hunter · · Score: 2, Interesting

      It has always been Fabrice's intention to have the accelerator GPL'd; he uses the word "when" to describe the event rather than "if". He is just looking for a sponsorship first; hopefully some company will soon provide him with one (Lindows^H^H^H^Hspire perhaps?) If nobody does sponsor him within a year or so, I imagine that somebody else will write a different accelerator unless he releases his own; there is quite a bit of demand.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
  3. iPC? by Doc+Ruby · · Score: 4, Interesting

    Can you cut & paste between the Windows::apps and Linux::apps? Can each OS instance get its own IP# for IPC?

    This app could offer a nice technique for "embedded" Windows: Run Linux, and QEMU::Windows with the Windows "screen" hidden or suppressed. Run vncserver on the Windows instance, and a vncviewer on the Linux desktop. Run a watchdog app that pings Windows and its apps, restarting them when they freeze. Put the host in the closet, and never hear surf music again.

    --

    --
    make install -not war

    1. Re:iPC? by Lehk228 · · Score: 2, Interesting

      another way to have a cross system clipboard would be using the network adaptor, both the real and the guest OS would need a service running and they would communicate clipboard data back and forth, but on ly to specific IP's for security reasons.

      --
      Snowden and Manning are heroes.
  4. fabrice's other projects by harlemjoe · · Score: 5, Interesting

    afaik the only way to run wine on linux-ppc (WINE is not an emulator, and so is x86 dependent) is by using qemu...

    also check out darwine... integrated qemu + wine under OS X so you can http://darwine.opendarwin.org/ click on windows apps and run them seamlessly in OS X

    fabrice bellard is a processor emulating god imho

    --
    shooting is not too good for my enemies
  5. is it legal by yupa · · Score: 2, Interesting

    If you read http://people.redhat.com/arjanv/COPYING.modules, you will see that if you write a binary module from scratch it is considered as a derived work from linux kernel, so it should respect the GPL license and be open source.

    I am a bit disapointed to see a guy like fabrice bellard which have contributed to lot's of famous open source projects (ffmpeg for exemple) to choose a such decission.

  6. Re:Doesn't work on PPC or SPARC by Bruce+Perens · · Score: 2, Interesting
    That tells us how it works, doesn't it? It must set up traps so that things that need to be emulated are caught, and then directly execute the code that would otherwise be emulated. This requires some systems programming smarts and a lot of knowledge of processor internals, but even if the module is never Open Sourced, it's possible for some third party to produce an Open Source equivalent.

    Bruce

  7. Derived work? by David+McBride · · Score: 2, Interesting

    From the description, I'd be concerned that releasing the Accelerator code under a non-free (as in speech) license would be incompatible with the linux kernel's GPL license as it could be argued that it is a derived work.

    See also http://kerneltrap.org/node/1735.

    In practice, it may be enough of a gray area that it won't be a problem -- although it may scare off any company wishing to invest in it.

    Personally, I'm just getting sick and tired with the maintainability and reliability issues that binary modules usually incur..

  8. Escaping the Palladium Jail? by Jah-Wren+Ryel · · Score: 5, Interesting

    Could this be used to sufficiently virtualize a 'palladiumized' system such that we could run a hypothetical DRM-up-the-ass version of Windows in it and then from the host OS side peek at all the secret data that the copyright cartel thinks is locked down?

    --
    When information is power, privacy is freedom.
    1. Re:Escaping the Palladium Jail? by Anonym0us+Cow+Herd · · Score: 4, Interesting

      NO. Not if the hardware has "trusted computing".

      The trust begins at the hardware.

      The motherboard must first examine the bootloader to see that it trusts it. If so, then trust is passed to the (un-compromised) boot loader.

      The boot loader can look at the OS it is loading to see if it is trusted. If so, then trust can be given to the OS. An untrusted OS could be loaded, but it would have no trust. The untrusted OS can't ask the TPM chip "Hey, sign this for me using your secret private key."

      If the OS is trusted, it can then determine if certian applications are trusted. QEMU would not be trusted. It could run, but would not be trusted.

      When you run RIAA-Approved software, it is able to prove, via. a chain of trust (certificates) that it is trusted and running on a non-compromised system.

      So why can't QEMU emulate the TPM chip? Because it does not know any secret keys. Each TPM has a secret key. And that key is a secret. Forever sealed in the chip. Even the manufacturer does not know the key. The key is a true secret. Nothing outside of the TPM chip itself has ever seen that private key. The TPM's public key was signed at the factory. You and everyone can know the public key of any TPM. And those public keys can be proven authentic because of their certificates (i.e. they are signed). You could generate an emulated TPM public/private key, but the public key is not signed by Dell. You know the public key of your box, but not the secret private key, which you can probably never know.

      --
      The price of freedom is eternal litigation.
  9. Re:Doesn't work on PPC or SPARC by timeOday · · Score: 3, Interesting
    That tells us how it works, doesn't it? It must set up traps so that things that need to be emulated are caught, and then directly execute the code that would otherwise be emulated.
    If so, it isn't an emulator and "near native on some code" performance isn't a big deal - about the same as VMWare.

    Hopefully it really is an emulator, and the accelerator simply hasn't been written for other platforms yet.

    If the claim were true, and could run even graphical apps decently fast, Intel should throw a couple million bucks at this guy for the fastest possible X86 on IA64 emulation - they need it.

  10. Re:This is great! by jonadab · · Score: 2, Interesting

    > I am really looking forward to emulating an Opteron at near native speed
    > on my good old 386sx processor...

    Actually, this is very similar to one of the features that the original
    RAIF-POOL implementation boasted. It worked by using your internet connection
    to co-opt available cycles that would otherwise go unused on other computers
    on the internet. However, the software stuck in beta and was never officially
    released, due to some minor process control glitches that were never fully
    worked out, and then the Pentium III was released, and the prices on Celeron
    processors dropped, and nobody seemed to need any extra processing power any
    more, so the project was just dropped. There are still a couple of copies of
    the beta floating around on the net, I think, but they're hard to find.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  11. I hope not. by user9918277462 · · Score: 2, Interesting
    The author is essentially blackmailing the F/OSS community by refusing to release the source unless a benefactor comes forward to fund him. If he is successful it will only encourage others to try the same tactic.

    He claims it's to cover "lost revenue" if he opens the source but the reality is that he is getting no revenue currently and is unlikely ever to. VMware is the undisputed king of the vitualization market (with MS Virtual PC catching up).

    VMware Workstation works extremely well. QEmu would have an extraordinarily difficult time competing in the proprietary software space, and the author knows this. If he had asked for donations to help support development I would happily contribute and encourage others to, but this just stinks.

  12. IBM and Cell processor by fbonnet · · Score: 2, Interesting

    I understand that, QEMU being an unfunded project, the author hasn't enough resources to port this technology to other host platforms.

    However if the Accelerator Technology is portable to platforms such as PowerPC or Cell, then it perfectly makes sense to keep it closed source if the goal is to open source it in exchange for financial or material support. Imagine what IBM could do with a near-native performance x86 emulator running on Cell... No more counter-arguments about compatibility, and Cell becomes instantly the fastest x86-compatible processor on the market. Given Cell's potential for parallel computation, this should beat the crap out of Opteron or whatever Intel could release in the near future.