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."
It should be noted that the Accelerator only works with x86 computers. It will not work on SPARC or PPC.
Yup. Just a frontend for PearPC http://pearpc.sourceforge.net/ .
WINE *does* run at native speed becuase WINE Is Not an Emulator (see where the name comes from now?).
Instead of emulating, WINE runs the programs using Windows libraries, either the original DLLs or rewritten versions of them.
A lot of people seem skeptical so far. I've been using qemu to run windows98 under linux for close to a year now. This was before this "accelerator" It was definitely usable. I needed windows for an application from my job, and this let me use it without rebooting. I installed it using the following instructions: http://forums.gentoo.org/viewtopic-t-186001-highli ght-qemu+howto.html
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.
Here's a bit more about Qemu. I've now used it quite a bit, and am impressed by it!
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)
The qemu claims are accurate. I am currently using this module with qemu and find that I do get 60-70% native speed (just as he advertises) and it is only going to get better. mind you this is x86 on x86. I/O performance (just like on vmware) is still a pig.
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.
Wine Is Not an Emulator.
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.
# cat
Damn, my RAM is full of llamas.
Trusted Computing FAQ | Free Dawit Isaak!
Comment removed based on user account deletion
I installed Win2k on a Debian installation without the accelerator - and wrote about it here Running Microsoft Windows inside Debian : Qemu.
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.
The main bulk of QEMU (which is all open source BTW) is entirely an emulator. It uses just-in-time dynamic binary translation to convert from the guest architecture to the host architecture, using an internal intermediate representation. At this level it is altogether an emulator... you can run x86 on powerPC or sparc on x86, or x86 on x86, etc. But because this the overhead is not insignificant. There seems to be a 5 - 10 times slowdown when I run winXP under linux in an emulated environment.
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.
---
the pen is mightier than the sword, the sword is mightier than the court, the court is mightier than the pen.
Not otherwise mentioned here: full sound support via SB16 emulation, built in NAT network support [the guest OS can use DHCP to get an address], and easy access to your linux filesystem on hosted windows environments via automatically configured SMB shares! It runs smbd as a slave process and comunicates with it over pipes, so it dosen't even require any root permisions.
/ahuge/unt/qemuXP.img -boot c -m 384 -user-net -enable-audio -smb /home/michael -pci &
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.
---
the pen is mightier than the sword, the sword is mightier than the court, the court is mightier than the pen.
I decided to test this on my 1.25GHz G4 Powerbook running Yellow Dog Linux 4.0.
/proc/cpuinfo reported an 18MHz Pentium Pro (ouch) /dev/cdrom -boot d winxp.img )
-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
no comment
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).
I am TheRaven on Soylent News
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?
Trusted Computing FAQ | Free Dawit Isaak!
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.
Weaselmancer
rediculous.
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!
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 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.
main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
Don't forget his crazy hack of putting a C compiler in a bootloader and compiling the Linux kernel at boot time.
Qemu is usually an emulator, unless you use the kqemu module which makes it a virutualizer like VMware.
There's a technical name for software like WINE. It's not an emulator, it's a compatibility layer. Look it up on wikipedia.
The AACS key is NOT 0xF606EEFD628B1CA427BEA93A9CA9773F
What else could it be? Perhaps you were thinking that you could emulate a beowulf cluster on a single P4?
Note that this accelerator only works on x86 emulating x86 so if you're thinking about z80 and G5 then you need to RTFA ...
WINE Is Not a Emulator. Period. And I find it rather strange that people here are STILL so misinformed about it.
:-() it should run nearly at native speed on newer machines.
WINE is an incomplete implementation of the Win32 API for X/Unix based systems. It should run almost at native speed, but there is a very small performance hit because of the translation of the WIN32 API calls to POSIX ones. While it is barely noticeable on old machines (like mine
Geez!