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.
I thought this was qemu-fast?
Or is it something new?
Something new – qemu-fast was basically an x86 assembler based version of qemu I think, ran on any x86 platform qemu ran on. This is for Linux/x86 only, and requires a kernel module.
do somebody know a link to benchmark of qemu vs vmware ?
is it possible to run several qemu using the same kqemu kernel module at the same time ?
its a shame people dont have any faith in fabrice. qemu is still opensource (GPL). all his other projects are fully GPL… you would think he is trying to make off with the linux kernel the way people are carrying on.
the knee jerk reaction to close freeoszoo is an absolute classic of throwing your toys out of the pram.
I support fabrice in his effort.
It’s a shame that nothing like this has been made yet for cross-platform QEMU. I’d love to speed up the x86 emulation on PPC.
The accelerator only works when emulating the same cpu your host is running. All it does is let unprivileged code run native and captures ring0 code, that’s why is way faster. You cannot use that technique to run ppc code on x86, although it would be interesting to try running OS X on an IBM server
I’ve looked at his projects, and they are fantastic: fabrice has put more into the community that many other people, especially any of the critics bashing him here and elsewhere for his one small attempt to derive income for himself. The last thing he needs is nasty negativity from a small minded part of the community, what he needs is support to continue producing works that have a positive impact for us all.
I can understand the author wanting to make some money and I tolerate his method for trying to get paid for his work. What I don’t tolerate is somebody labeling people that don’t agree with their opinion as zealots or elitist.
I wonder how much this depends on the internals of the Linux kernel, and if it would be possible to use the module (rewritten, obviously) as a generic BeOS kernel add-on.
Would be pretty nifty to be able to run Windows without having to reboot, anyway…
Absolutely brilliant. I just tried this thing out, and it’s a lot faster than stock qemu. Still has some bugs in it (Windows 98 won’t run with it enabled, but Linux does, as do most other operating systems that run in qemu). Things go from being tolerable, to fairly fast. Still not as fast as running natively, but a lot faster than pure emulation.
The really neat thing is the way it works. Virtualization programs like VMWare are very, very complex. They attempt to run everything natively on the host CPU, and they have no real CPU emulator in sight. They execute even kernel-level code natively, but they trap any un-virtualizable instructions. That’s really difficult to do, and even more difficult to do efficiently. At least on x86. On PowerPC, not so much (see Mac on Linux – a PowerPC virtualizer that runs on LinuxPPC).
Qemu cuts right round that. Kernel level code is entirely emulated, in user space, using qemu’s existing (and itself very simple yet fast) CPU emulator. Only user-level code is virtualized. User-level code is almost trivial to virtualize – you just need a mechanism to trap system calls. When you enter kernel mode, just grab the CPU state, set up the user-space CPU emulator, and start emulating.
Granted, this will never be as fast as VMWare. That’s pretty much a given, considering that it emulates everything that runs in kernel mode. It’s I/O performance is also quite terrible, just like VMWare, but that’s pretty much inherent in the way it works. Still, it is a lot simpler than VMWare, and I can think of quite a few other applications for the same virtualization of user-space apps. We’ll just have to hope that fabrice GPLs the thing at some point in the future.
This accelerator, what does it require and work on? If i understood correctly its a kernel module (requires Linux), is probably compiled for x86 (and in x86 ASM?) hence works for host i386-linux only?
Actually, not only “open source hippies” would prefer open source kernel modules. If your security minded or ever had to contend with keeping binary modules compatibile with some version of the kernel or some other OS (BeOS was brought up) or you want to run on some other processor, you’d prefer open source.
I use VMware and I’m very happy with it. I paid for both the original and the upgrade to version 4 and I’ll likely upgrade to version 5 when the time comes. It also has a kernel module, but it’s GPLed and from a superficial audit of the well commented code, it appears innocious. I like that comfort level of seeing the code and adapting it as necessary (In the early days of VMware 3. I had to make a few changes to the installer so it would compile on my OS). Win4Lin is apparently creating a VMware-like emulator that doesn’t require a kernel module. If it works at half the speed as VMware and has the feature set I need and it establishes itself, I’ll likely switch (even if it costs a little more than VMware). I don’t want binary modules in my kernel.
I don’t care about free as in beer and I don’t mind closed source user space apps, so I’ll likely not use KQemu since there are better and well established alternatives available that don’t use binary kernel modules.
Now if Fabrice used licensed his code under a staged “Streets Performer Protocol” or Alladin License (see Transgaming:
http://www.transgaming.com/license.php?source=1 ), I’d be very interested in moving my upgrade money to KQemu, even if the alternatives are (currently) superior. Xen and an (eventually) open source KQemu would greatly help Linux and I don’t mind paying to be a part of that future. From Fabrice’s roadmap ( http://fabrice.bellard.free.fr/qemu/roadmap.html ), it appears there’s a lot of work yet to do so adopting something like a Transgaming model would keep him comfortable for a long time.
How can I download the CVS version of qemu ? I didn’t find nothing about it on qemu’s homepage ?
that the infamous usb malloc() bug falls over into the emulated OS.
the qemu cvs is on savanah
http://savannah.nongnu.org/projects/qemu
you can access the CVS there.
Personally, I have tried it – with the excellent QemuX frontend – on an upgraded 1 GHz Power Mac G4: sadly, QEMU is still too slow to be usable, especially when emulating Linux (x86).
On the positive front, however, some more recent distributions (such as Fedora Core 3 and Mandrake 10.1) install and run (slooooowly) without problems in QEMU, while they aren’t compatible with Microsoft Virtual PC 7, for example.
Of course, it would be a very good thing to see some powerful performance enhancements also on QEMU/OS X, sooner or later… 🙂
Thanks, ceaser !
export CVS_RSH=”ssh”
cvs -z3 -d:ext:[email protected]:/cvsroot/qemu co qemu
When prompted for a password for anoncvs, simply press the Enter key.
Unfortunately, qemu it needs to emulate a better graphics chip before it’s useable for me. Right now I think the best you can achieve is 1024x768x16.
Beyond that, it seemed to work really well. Very impressive.
So FreeBSD folks are locked out of the party again?
Qemu is designed to emulate a x86 on other architectures and vice versa. If you only want to run x86 on x86, VMWare is the option for windows and linux, Virtual PC and Serenity Virtual Station is for Windows and if you want a really good free alternative, XEN is the way to go.
XEN doesn’t emulate any architecture and instead implements a small hypervisor which can basically schedule OS kernels. With minor kernel modifications, it gives nearly native speed as well.
Xen is right approach to run free operating systems, not to run windows:
http://www.cl.cam.ac.uk/Research/SRG/netos/xen/faq.html#a1.4
Correct, but only for short term. Intel’s LT and VT technology will enable xen to run unmodified windows. Its a matter of an year or two.
so basically QEMU is no longer an emulator but is now a virtualiser?
has he posted any paypal account where together people can pitch in and donate to open-sourcing the project kind of like funding PHK?
Wolf,
What are these Intel’s LT and VT technologies ?
So the author of the closed source module is complaining about ‘loss of revenue’, yet this is still a way “you could theoretically run Windows (or another OS) on a Linux machine at near native speeds without buying a commercial emulator”? Whatever. Next please.
You can still use qemu like a normal emulator or use the kernel modules and do some virtualizing. Privileged code still runs in emulation mode, though, but the speed up is pretty impressive.
I wish he would setup and fundraiser. I for one would be glad to see this open sourced so it could be ported to other free operating systems and ever other arches.
I tired it on my linux box (Fedora C3, P4, 2Ghz, XP guest OS). It is faster the quemu without kernel module (and without kqemu the XP died after boot). But imho at this moment it is not too useable because very-very slow (it seems 2-300 Mhz PII or PIII on P4/2Ghz, at least on my machine).
QEMU can also runs liveCD of Linux in windows. Hopefully a win32 version of the accelerator so those can work faster. Although I guess that would be a totally different code.
I wrote about my experience with QEMU at http://linux.wasted-army.com
LT is nick named la grande technology and VT is nick named Vanderpool technology. I haven’t yet the specs of it (so i may not be 100% correct here) but VT provides some virtualization support which was needed by hypervisor like Xen to work efficiently. One of the problem with XEN was to manage Page tables, x86 has hardware managed page tables, thus its difficult to protect page tables of one OS from another if all OS run on ring 0. XEN modifies OS to run on ring 1 and mark all page tables read-only. It then cause OS to fault if they try to write to a page table and XEN hypervisor checks if OS is updating its own page tables or not. VT provides a way to partition the memory space (i think). Also if i am not wrong, VT provides DMA remapping such that you can dedicate certain physical device to different OS instances.
More details about these technologies are at:
http://www.intel.com/technology/security/
http://www.intel.com/technology/computing/vptech/
Not too bad at all. Doesn’t seem to compile from source on Fedora Core FC3 though.
So what? Go pay author to get support for minor _desktop_ OS like that.
No OS war here but OpenBSD hackers I know (using it on desktop, too) wouldn’t be so demandive and so idle at the same time as FreeBSD folks sometimes tend to be (hm, little brother’s syndrome?).
And Linux fols just run stuff to just do the job. ;o)
Normal user syndrome. Unlike OpenBSD and NetBSD, FreeBSD has normal user to, not just hackers.
I compiled it on my FC3 box without any problem. I unpacked the cvs version the qemu and the kquemu to the quemu. configure, make, make install…
I too compiled from source on FC3 and it runs fine.
Doesnt seem to boot the latest Syllable LiveCD (0.5.5) though.
AROS, FeatherLinux, Ubuntu Hoary LiveCD and FreeDOS all seem to work just great though.
i got it and dont know if its any faster than it once was because this is my first qemu try. but it seems all linux distros run fine and pretty fast compaired to vmware. but i tried solaris and XP and both seem to crash after the install with a bus error. but we all know solaris and XP suck anyway