QEMU Accelerator Achieves Near-Native Performance 366
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."
cool stuff (Score:3, Interesting)
Re:cool stuff (Score:2, Informative)
Instead of emulating, WINE runs the programs using Windows libraries, either the original DLLs or rewritten versions of them.
Re:cool stuff (Score:2)
Re:cool stuff (Score:2)
That's how all supervisor-mode virtualizers work, by only trapping certain instructions. The only emulator out of the whole bunch is bochs.
CoLinux is my favorite solution for Linux on Windows. It's basically a port of User Mode Linux to Windows. Fast as native, just no native devices (network is done through tunnelling or a pcap hack). KDE stil
Re:cool stuff (Score:4, Informative)
Re:cool stuff (Score:3, Informative)
RTFA. "Near native" in this case means about half as fast as native execution on the bare hardware. This should be enough to run the vertical market apps that a lot of business IT departments female-dog about when clinging to their Windows environment.
Re:cool stuff (Score:5, Informative)
Wine is a re-implementation of some of the Win32 API for Linux. Unless combined with an actual hardware emulator, it only works on x86. It just runs x86 binaries on an x86 processor like Windows does, but providing some commonly used Windows API calls.
In short, running programs using Wine is "native", and, programs that work at all are often actually faster with Wine than with Windows for the same reasons that anything runs faster on Linux.
Re:cool stuff (Score:3, Interesting)
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.
Re:cool stuff (Score:2)
Your turn.
Re:cool stuff (Score:2)
So, in conclusion...
It is true, and it always has been that QEMU
Re:cool stuff (Score:3, Insightful)
Faster than on Windows? That has not been my experience at all.
Maybe 80-90% as fast (just a seat-of-the-pants guesstimate)...
Processor emulator (Score:4, Funny)
So I can emulate my P4 on my P4? Swift!
Not exactly (Score:2)
The ignorant laugh (Score:5, Insightful)
I sometimes want to play old DOS games on my P3 machine. A lot of these games work in Real Mode [wikipedia.org], period. And they often can't do sound except on specific sound cards. I can:
Re:Processor emulator (Score:5, Funny)
Comment removed (Score:5, Informative)
Re: (Score:2, Informative)
Re: (Score:2)
Re:Doesn't work on PPC or SPARC (Score:3, Interesting)
Bruce
Re:Doesn't work on PPC or SPARC (Score:2)
Re:Doesn't work on PPC or SPARC (Score:2, Insightful)
Re:Doesn't work on PPC or SPARC (Score:4, Interesting)
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.
Re:Doesn't work on PPC or SPARC (Score:2)
Re:Doesn't work on PPC or SPARC (Score:3, Insightful)
Re:Doesn't work on PPC or SPARC (Score:2, Informative)
This is great! (Score:5, Funny)
Re:This is great! (Score:2)
Keep looking. =)
Money? (Score:4, Insightful)
As a supporter of open source, the author accepts to open source the QEMU Accelerator Technology provided a company invests enough money to support the project and to recompense the author from the potential loss of revenue. Interested companies can look at the roadmap and make suggestions to the author.
If it actually achieves near-native performance right now, how much better can it get? And since it's already gratis, would anyone want to pay for one that achives actual native performance?
I don't think there's much money up for grabs here, to be honest. But that depends on how good it really is right now.
Opening the source (Score:2)
It is at 1:4 to 1:5 speeds without the accelerator. With the accelerator the ratio is claimed to be between 1:1 and 1:2.
I don't think there's much money up for grabs here, to be honest. But that depends on how good it really is right now.
Depends. If he sells the accelerator to a company and releases the source a few month later under the GPL it might be interesting. A bit like the wine/winex stuff started. If the comp
Re:Opening the source (Score:2)
Re:Money? (Score:2)
The same reason anyone pays for open-source stuff. Support and ongoing development for specialized needs.
Re:Money? (Score:3, Informative)
Re:Money? (Score:2)
Re:Money? (Score:2)
Re:Money? (Score:2)
VMWare is a very good product, but here are my complaints:
1) being closed source, it lags behind the kernel releases sometimes.
2) it seems to run in kernel mode all the time, so isn't a very polite multitasker.
3) the cost prevents me from using it at home.
That said, I'm sometimes surprised at things VMWare can do, like drive windows-only USB devices from a linux host. And the set of virtual devices it provides, s
Only Reasonable (Score:2, Insightful)
Oh yeah! (Score:5, Interesting)
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 [bellard.free.fr] 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?
Install/Run Speeds (Score:2)
But yes, *installation* is a pain.. I gave up on my first attempt to install W2K, thought it had died...
Re:Oh yeah! (Score:4, Informative)
I installed Win2k on a Debian installation without the accelerator - and wrote about it here Running Microsoft Windows inside Debian : Qemu [debian-adm...ration.org].
I found the process of installation took a couple of hours, which didn't feel really excessive. Once installed it's pretty good to use, for small things.
Right now I'm using qemu to practise the upgrade of a busy server from Woody to Sarge (whenever its ready!). All I can say is that the program rocks, and many thanks to its authors.
Re:Oh yeah! (Score:3, Interesting)
qemu DOES work (Score:5, Informative)
Re:qemu DOES work (Score:2)
Mind you, the thing I've now got to attempt is to get w2k pro and OSX running simultaneously on a Linux box...
DRM implications (Score:2)
Dual licence ? (Score:5, Insightful)
Re:Dual licence ? (Score:3, Insightful)
Re:Dual licence ? (Score:2)
Qemu - information (Score:5, Informative)
Qemu can essentially run any guest OS (Linux,Windows,MacOS,BSD,menuetOS...) under any other. This normally incurs approximately a 4x slowdown, which is pretty good. I've personally installed XP on Linux this way. It's also a great way to test out the latest knoppix.
The KQEmu (accelerator) is a kernel module which allows near-native speeds, if both the guest and host architecture are x86.
Qemu is Free (speech and beer); the accelerator is free (beer), but not, at least for now, open source.
In the specific case of needing to run windows apps on Linux, we have now several options:
API emulation: Wine
PC emulation: Qemu (free)/VMWare (expensive)
VNC: (and just move the display)
Re:Qemu - information (Score:2)
Re:Qemu - information (Score:2)
Re:Qemu - information (Score:2)
Re:Qemu - information (Score:2)
Development was going really awesome on that thing then all of a sudden it stopped. Possibly due to the death of Stefan Weyergraf.
Theoretically (Score:3, Insightful)
This means you could theoretically run Windows on a Linux machine at near native speeds
Theoretically, does it work or not?
iPC? (Score:5, Interesting)
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.
Re:iPC? (Score:3, Interesting)
Boy, it's a screamer! (Score:5, Funny)
I read those "ratios" as, well, ratios: "Wow, QEMU has a 5:10 slowdown, while the accelerator only has a 1:2 slowdown! I should write one with a .1:.2 slowdown! Oops, done."
Re:Boy, it's a screamer! (Score:2)
Actually, 5 to 10 is a ratio. Between 5 and 10 is not a ratio.
I think what you mean is that you need to read it incorrectly.
Re:Boy, it's a screamer! (Score:2)
Now, I'll argue that "reading what's actually written" is reading correctly. You'll argue that "reading what you think the author was trying to say" is reading correctly.
To-mae-toe/Toh-mah-ta, etc.
Call me silly (Score:2)
What is "Near Native"? (Score:2)
For example - having used VMWare in the past I have found that the performance of the virtual machine to be roughly half the speed of the host machine (performance might be better these days). Say my machine had a 2ghz cpu - I could say that I was getting "Near Native"
Re:What is "Near Native"? (Score:3, Informative)
You can play Frozen-Bubble in QEmu and still have idle CPU on the host... It's fast enough! :-)
Now this also means that all of a sudden, the cost of migrating large organisations to GNU/Linux, while running that last application in a Windows install in an emulator got a _lot_ cheaper. No more VMWare needed. München, are you listening?
fabrice's other projects (Score:5, Interesting)
also check out darwine... integrated qemu + wine under OS X so you can http://darwine.opendarwin.org/ [opendarwin.org] click on windows apps and run them seamlessly in OS X
fabrice bellard is a processor emulating god imho
Re:fabrice's other projects (Score:2)
Re:fabrice's other projects (Score:5, Informative)
In addition, he has implemented a complete C99 compiler, and a software modem (unfortunately incomplete), which is the hard part of making open-source WinModem drivers. Also, an emacs clone which also happens to have full Unicode support (including bidirectional editing), *and* a built-in HTML/CSS2 renderer with WYSIWYG editing.
And if that wasn't enough, he has won awards in the IOCCC [ioccc.org] twice. If that doesn't prove he's a true coding god, I don't know what would. He has done all of this in his free time, for no pay. I think it is safe to say that he *really* deserves a sponsorship.
Re:fabrice's other projects (Score:3, Informative)
is it legal (Score:2, Interesting)
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.
Think of what you just said (Score:2)
ffmpeg (Score:2)
Derived work? (Score:3, Interesting)
See also http://kerneltrap.org/node/1735 [kerneltrap.org].
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..
Other goodies in QEMU (Score:5, Informative)
qemu -hda
Simple as that, and you're running XP with audio, network, and local filesystem access.
Of course, having to insmod a closed-source kernel module is unnerving, admitedly. But all of the above still applies and is usable without it, it's just not nearly as fast.
Status update on Linux/PPC test (Score:5, Informative)
-It compiled in about 2 minutes flat
-The sample Freedos and Linux-Test images booted fine
- In the linux-test,
- I used qemu-img to create a 3gb disk image for testing Windows XP
- I booted off a Windows XP CD, and am in progress of installing on said disk image
( qemu -cdrom
Escaping the Palladium Jail? (Score:5, Interesting)
Re:Escaping the Palladium Jail? (Score:2)
You betcha! I'm sure that the hammer will come down as soon as "the powers that be" realize that no matter what DRM or other nasty stuff they come up with - it'll run in emulated machines.
For example, you could run QEmu and some sort of nasty DRM audio app like Napster. While it's running in the VM, drop back to windows and cat /dev/dsp into a file.
Re:Escaping the Palladium Jail? (Score:2)
Argh. "Drop back to Linux". Too many layers of abstraction. ;^)
Re:Escaping the Palladium Jail? (Score:2)
To avoid confusion: sure you could get that open source driver signed (for a hefty fee of course), but that driver wouldn't allow you to do any of the things you're thinking about. Changing the source to the driver after the signing won't help either, of course, as it then doesn't pass the signature test and thus isn't accepted into the so called trusted part the system.
Re:Escaping the Palladium Jail? (Score:5, Interesting)
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.
little disappointed... but it's still good news (Score:2)
Hopefully there is en
Damned impressive...(how to test with Knoppix) (Score:3, Informative)
All you haters need to quit your bitchin'....Mr. Fabrice Bellard, THANK YOU FOR THIS PROJECT!
If you'd like to give it a try with Knoppix and you have an ISO lying around, type:
Boots up perfectly. WOW!
he's probably best off just releasing it (Score:4, Insightful)
As a supporter of open source, the author accepts to open source the QEMU Accelerator Technology provided a company invests enough money to support the project and to recompense the author from the potential loss of revenue. Interested companies can look at the roadmap and make suggestions to the author.
What matters isn't really the potential loss of revenue, but the expected loss of revenue, i.e., large amount of money multiplied by the low probability of actually succeeding.
I'm sure the accelerator is skillfully written, but I think chances of turning QEMU+Accelerator into something commercially successful are next to nil. Why? Foremost because the market already has VirtualPC and VMware in it, created and maintained by big companies with deep pockets, lots of lawyers, and large patent portfolios. Oh, and then there are coLinux, Xen, and UML that he would be competing with as well.
To compete, he'd have to get startup funding, a management team, developers, support, and, worst of all, sales people: a lot of work, a lot of money, and next to impossible if you don't either get a lot of buzz or know the right people. Then he'd have to develop a product; a product isn't just a working piece of code, it's documentation, training, tutorials, travel, presentations. People don't expect that from FOSS, but they do expect it as soon as they pay a couple of bucks for something. Even if he does all that, the most likely outcome is still that the startup fails. But even if it succeeded, he would probably only end up with a small slice of a moderately successful company (competition and all that), and only after spending several years of his life doing things he probably doesn't enjoy.
I think people underestimate how hard it is to commercialize something, even something that is really good and novel (his software may be really good, but it isn't novel).
I think his best bet would be release it under a dual license (GPL/commercial) right away, while people are paying attention, and build a consulting business and commercial licensing around it. He won't become an instant billionaire that way, but if he has a worthwhile product, it can be a steady source of good money doing mostly what he enjoys. If he sits on the software too long waiting for a sugar daddy, it will be less and less likely that he will be able to get anything out of it.
Oh, and in case you are wondering whether my argument is disingenuous and I just want to get a free virtual machine, it isn't: I already have VirtualPC and VMware, and I actually prefer the various user mode Linux solutions at this point.
Free (Score:2)
"Free as in beer" is good enough for all but the most demanding zealot.
Linuxes for Windows (Score:2)
Re:CherryOS (Score:2)
Re:CherryOS (Score:2, Informative)
Re:CherryOS (Score:2)
Re:CherryOS (Score:2)
Re:if it really works... (Score:2, Insightful)
Re:if it really works... (Score:2)
Re:if it really works... (Score:3, Insightful)
Re:if only they could get this to run faster (Score:5, Funny)
Re:If you need an iPod to hear God, maybe you shou (Score:2)
All you need to do is hack the thing to play the tunes backwards!
Re:if only they could get this to run faster (Score:2)
Re:I'm getting pretty skeptical of these things (Score:5, Informative)
Look. Just go download it and try it. Don't post stupid pointless comments about how skeptical you. Don't know how that rated insightful.
Qemu Speed (Score:2)
Its also limited to emulating a i386 on a i386, so again its quite plasuable. Ever run VMware? I bet they are using the same sort of tricks.
Too bad I cant test them, as its only for Linux, and im running BSD... Perhaps down the road...
Re:I'm getting pretty skeptical of these things (Score:5, Informative)
Secondly, QEMU Accelerator is not an emulator, it is a virtualisation layer. It executes most instructions on the host CPU, using the emulator as a sand-box and system emulator, rather than a CPU emulator. Emulating x86 on x86 at a reasonable speed is really not that hard (non-trivial, but certainly not unbelievable).
Re:How do we know it;'s legal? (Score:2)
Pardon? This is Fabrice Bellard [bellard.org]! Show a little respect!
Re:How do we know it;'s legal? (Score:3, Insightful)
For that matter, an open-source module could also contain stolen proprietary code.
I hope this will be treated with caution until it can be ascertained to be fully legitimate...
I hope you never use any code which you didn't write yourself.
Re:EMULATOR?? (Score:5, Informative)
What the new KQemu accelerator does, is replace some of the emulation [specifically, of user-space code not in ring 0] with direct VMware-style virtualization, where the code is being run natively and trapped by the monitor. Important to note with KQemu is that kernel code is still being wholly emulated. Virtualizing only user-space is so much easier... I believe that Plex86 gave up on trying to virtualize ring0 code on x86 a while back, because the x86 isn't well designed for this. Running winXP with the accelerator causes it to run pretty close to native, though. Where before under just emulation, trying to play a video with windows media player took over a minute for a frame to show up and otherwise froze, with KQemu I can actually play video relatively smoothly. This is a wonderous thing! Basically, you can get almost all of the functionality of VMware, but FOR FREE.
Re:to wine or not to wine (Score:4, Informative)
But what, exactly, is best?
Well, in a lot of ways that's like asking what's the best tool in your toolbox? It depends on what you're trying to do. Hammer a nail, use a hammer. Tighten a bolt, use a wrench. A wrench makes a lousy hammer and a hammer makes a lousy wrench.
Wine is great for running x86 Windows apps natively on Linux. It has no Microsoft code in it whatsoever - that's it's advantage. No MS tax to run MS apps. Downside is that it isn't 100% accurate - some apps don't work. By its very nature it'll always be a work in progress.
Qemu (and VMware and their like) emulate a complete computer. They're slower because they have to emulate hardware. And to run Windows apps, you'll need a copy of a Microsoft OS, so you've got a licensing issue there. As a plus, you can do development on a virtual machine and cause any kind of damage, and (if you've backed up before you tried it), fixing things is as simple as tar -xvzf yourbackup.tgz.
Explore both options a bit and you'll find that each one solves a particular class of problems. More tools in the toolbox is always good.
Re:People have to ask... (Score:3, Insightful)
Re:People have to ask... (Score:2)
Re:People have to ask... (Score:2)