Pointers for Developing x86 Virtualization? 41
josh asks: "For my next project, I've decided I want to do something related to x86 virtualization (the way VMware does it or Plex86 not Xen/Bochs/etc.) but I really don't know where to start. Googling hasn't been helpful (just look at the results if you don't believe me). Are there any resources for learning about this kind of x86 virtualization? I know virtual 8086 mode wouldn't work, but without that what advantage does something like VMware have over something like Bochs? Are there any F/OSS projects aimed at something along the lines of my thinking? Please enlighten me with any references and resources you might have. Thanks!"
Read More Slowly (Score:5, Informative)
Go to the plex86 page you linked to and download source. That's an excellent place to start. Apart from that, boning up on the difference between user and kernel modes and getting your hands on the free Intel developers' docs on the Intel website are about as good as it gets for this kind of learning.
Re:Read More Slowly [OP] (Score:1)
Re:Read More Slowly [OP] (Score:1, Insightful)
Plex86 is essentially a full x86 virtualization, with the exception of a few difficult corner cases that were easier to avoid (by patching the guest Linux kernel) than emulate. The same modifications could be made for any Free
Check out Qemu - the Quick Emulator (Score:3, Informative)
Check out this dude's blog [grack.com] for screenshots of QEmu running Win2K.
Combine it with a copy of x86 glibc and a recent Crossover, you can use it to run Office XP for Windows on Linux on a Mac. Scary
Go get it from the Qemu Site [qemu.org].
qemu (Score:3, Informative)
Re:qemu (Score:4, Informative)
I think that down the road qemu will adopt some virtualization techniques on various platforms. Obviously this would be limited to x86 on x86 or ppc on ppc. But it will be exciting to watch and follow qemu. I already run win2k in qemu on my 1.5 gHz athlon at quite a respectable speed.
Re:qemu (Score:2)
Re:qemu (Score:2)
How do you figure that a dynamic translator like QEMU is bounded to 1/3 the speed of the host processor? If you are dynamically translating code, you could theoretically get 100% efficiency after the initial translation hit. And if you load pre-translated code you can close the gap by a lot. Few people would count load time anyway.
The only place there is a ceiling is on the guest OS dynamically generating code, in which case you have to emulate. But I imagine there are few places in most O
Re:qemu (Score:3, Interesting)
Now of course in theory if you had a lot of cache you could approach native cpu speeds, assuming that you always executed the same code over and over again. Caching certainly is the key to performance here, just like i
Re:qemu (Score:2, Interesting)
There have been plenty of demonstrations of 75% to 100% of native performance being achieved by dynamic recompilations, by products such as the Digital FX86 and Connectix VirtualPC. The HP Dynamo research proje
Re:qemu (Score:1)
Re:qemu (Score:2)
One correction here: qemu-fast doesn't require a kernel module, but it does require a change to a kernel constant. Basically, you have to adjust the kernel so it expects to be loaded to a different location in memory when it starts. Another neat feature of Qemu is that you can point it at a linux kernel file, and it will load it at the right place in (emulated) memory, then begin executing, thus skipping the emulated PC BIOS.
One thing not to forget is that Qemu wants to be a portable project and emulate
Link (Score:1)
Re:Link (Score:3, Informative)
Re:Link (Score:3, Informative)
Why do you care? (Score:4, Insightful)
Sooner or later, Intel is going to make the Pentium virtualizable in a more straightforward way. Until then, I'd just stick with one of the available solutions (including Plex86).
Re:Why do you care? (Score:2)
I'm not a fanboy for any processor. I don't build 'em or write assembly most of the time, but the x86 architecture is a mess.
Re:Why do you care? (Score:3, Interesting)
Of course, this still adds to the mess either way, but it does make some sense.
Maybe that's why Transmeta did it.
Re:Why do you care? (Score:2)
Re:Why do you care? (Score:2)
I don't see why it requires breaking backwards compatibility. It may be a lot of work, given what a mess the Pentium is, but Intel can do it.
I suspect they don't want to--better to sell more real processors--but eventually, they won't have a choice.
Re:Why do you care? (Score:3, Interesting)
VMWare, in the workstation and GSX version, runs on top of a host OS. ESX is its own "OS". In the IBM world, the VM "OS" layer is very specialized and so far as I know, used for just allocating resources to VM instances... The hardware helps a lot in this case as well.
Idea: What would be the possibili
What's wrong with what you've got? (Score:1)
PS. They usually work by running user level code as is, and reflecting system calls to ring 1 where the
Re:What's wrong with what you've got? (Score:1)
Wait 'till he find out... (Score:2)
BTW, Con Zymaris listed out (on the OSIA list) some of the bet-your-company-on-this technologies which Microsoft has abandoned (who remembers Blackbird? How about DNA, the Distributed Network Architecture?), and more systems which Microsoft has sucked people into and then changed, requiring significant code rewrites (e.g. VB4 and again at VB7). It's a long and impressive list.
Bearing this in mind, and that Visual J++ is already w
Re:Wait 'till he find out... (Score:1)
It's a nice fast Java IDE, though. As long as you stay away from the RNI/JDirect "lots of comments that get magically transformed into native method invocations" stuff, it's pretty cool.
Newsflash! Windows NT not portable! (Score:1)
Windows NT was designed with a hardware abstraction layer to seperate machine dependent code from the rest of the code base. Windows NT 4.0 was launched on x86, Alpha, MIPS, and PowerPC. So much for not portable.
Get guides to the hardware you want to emulate (Score:5, Informative)
The other main half is BIOS info, check our Ralf Brown's int list: http://www-2.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/
For the rest you just need lots docs about various hardware like floppy controllers and such, check out my site [osdev.org] for OS developers since I probably have more links listed then anyone else. Besides this stuff you might want to re-include java in your google searches because most of the research into virtual machines that I've seen uses java but alot would still apply.
MOL (Score:3, Informative)
Don't forget that one good thing is also your ability to write a good driver for the client OS. That can yield huge speed increases on its own.
Answer (Score:5, Funny)
virtualization wiki (Score:2, Informative)
this page [jsequeira.com] has all the open source wiki pages, and this is the front page [jsequeira.com] for the site.
Not restricting to x86... (Score:4, Informative)
+ vmware
+ bochs
+ vax with simh-vax, see
http://www.netbsd.org/Ports/vax/emulator-howto.ht
+ xen
(http://www.cl.cam.ac.uk/Research/SRG/netos/xen/)
+ LilyVM
(http://lilyvm.sourceforge.net/index.ja.html)
+ mips64emul
(http://www.mdstud.chalmers.se/~md1gavan/mips64em
+ dosbox (http://dosbox.sf.net)
I'm mostly interested with running non-Linux (e.g. NetBSD, Solaris) in a virtual environment for using it in my "Virtual Unix Lab" training environment, see http://www.feyrer.de/vulab/).
- Hubert
Suggestion (Score:2, Interesting)
Fantastic idea, I would suggest you look at the L4Ka and related projects (http://l4ka.org/projects/hazelnut/).
Please do not create a new project from scratch: there are enough.
What is needed though is adapting existing operating systems (e.g. Linux, BSD, etc) to work in these virtualised environments. Further to this, also supporting co-ooperative virtualise environments.
Your efforts in this area would be very well looked upon.
Introduction to Virtualization (Score:2)
Thanks for all the replies! (Score:1)