4 ms·
Something alluded to, but not really elaborated on, is what the motivation is for emulating progressively newer CPUs, versus virtualizing them. With old hardwa
by spijdar 5y ago
Something alluded to, but not really elaborated on, is what the motivation is for emulating progressively newer CPUs, versus virtualizing them.
With old hardware, the sort I imagine 86Box is mainly used to emulate (it's how I use it, anyway), old OSes rely on specific behavior of old systems and peripherals that can't be easily virtualized through KVM + QEMU or the like. A mixture of processors being too fast and behaving subtly different, possibly due to differences in "undefined behavior".
I doubt there's a binary cutoff point where it's obviously more useful to virtualize or emulate, but it's obvious that emulating an 80386 is ideal, and virtualizing a "Core 2 Duo" is ideal, for running software from those respective periods. Is the Pentium III desirable to emulate, and simply not computationally feasible, or is this just people wanting to make cool things for cool things' sakes? Or a little of both?
- chrononaut 5y ago> old OSes rely on specific behavior of old systems and peripherals that can't be easily virtualized through KVM + QEMU or the like This sounds interesting. Do you have examples of these behaviors where something is faulty using standard virtualization versus hardware-level emulation? (I know clock speed can make a difference.)
- AshamedCaptain 5y agoAMD has relaxed a bit coherency behavior after page table manipulation leading to Windows 9x crashes: https://blog.stuffedcow.net/2015/08/win9x-tlb-invalidation-bug/ https://blog.stuffedcow.net/2015/08/win9x-tlb-invalidation-b... These crashes are not related to clock speed. While Windows 9x already cannot run on these CPU due to clock speed, the clock speed issues have mostly been patched in 9x.
- exfascist 5y agoWindows 9x couldn't even run on ~2007 era Intel Macbooks because of the A20 gate.
- userbinator 5y agoThe Intel Macs were a strange not-quite-PC-compatible; the BIOS was EFI, and I believe things like the 8042 (which controls A20) weren't present although I'd have to check the schematic to be sure. That said, I'd be surprised if port 92h "fast A20" wasn't present --- that's been in nearly every chipset since ~386 or so.
- deleted 5y ago[deleted]
- AshamedCaptain 5y agoYes it can: https://www.youtube.com/watch?v=9si1le2EOGU https://www.youtube.com/watch?v=9si1le2EOGU (2009 iMac, they just use some himem.sys replacement). And 9x can still be virtualized even on the latest Intel iMac, with nested paging enabled (or not). On AMD, you need to disable nested paging due to the above change in behavior.
- andrewf 5y agoThis article goes into some specifics for OS/2: http://www.os2museum.com/wp/why-os2-is-hard-to-virtualize/ http://www.os2museum.com/wp/why-os2-is-hard-to-virtualize/
- hulitu 5y agowin 98 had a bug which would cause win98 to not boot on faster AMD systems.
- captainmuon 5y agoWhat about old versions of VirtualBox? As far as I understand, VirtualBox originally used some kind of dynamic recompilation to run on hosts without modern virtualization (like VT-D). It used to run most instructions directly on the host CPU, emulating only certain ones. I think they removed it at some point, though. Is it not accurate enough? I remember it used to run OS-X much better than other virtualizers.
- shadowofneptune 5y agoI pulled out my version of 86Box to check, and it does have mandatory dynamic recompilation if you try to emulate later chips.
- yuuko11 5y agoI'm not sure why this was ever dropped, if I remember right back in the early 2010s, this ran XP very usable on a C2D XP laptop. Pretty sure I even got 7 working at some point, the only real limit was that it absolutely could not run 64 bit vms.
- oso2k 5y agoIt's because dynamic recompilation as done in VirtualBox & QEmu is on the order of 10x slower than CPU accelerated/supported virtualization. You don't notice that (as much) with DOS or a simple Windows 9x VM. But you will notice that if you're running busy SQLServer, ISS, .Net, Linux, PostgreSQL, MySQL Servers.
- leeter 5y agoI recall awhile back Linus Tech Tips pointed out that the primary failure point for old machines wasn't the CPUs which tend to be piling up cheaply (I can't say how true this is for pre PIII parts) but instead the motherboards. I wonder if in some sense there isn't a market for someone to just make new motherboards instead for this stuff using modern parts. I realize there are some licensing issues after a certain point, but in theory everything up to a PIII should be doable. Particularly since memory controllers are in the chipset there are options to use things like modern ram chips and then 'downgrade' performance to be compatible in the chipset. This could also be used to allow for modern M.2 SATA drives to be run in IDE emulation mode locally or even have SD/CF options directly on the board. The main downside at that point is space of course, hardware always takes up more space than an emulator ;)
- sidewndr46 5y agoFor the Intel chips up to and including the Pentium 4 licensing a chipset would not be an issue. VIA made chipsets back when those products were new. I think there was a lawsuit about it, but VIA prevailed. You could license the chipset from them, then use it with an authentic Intel CPU. https://en.wikipedia.org/wiki/List_of_VIA_chipsets#:~:text=VIA%20chipsets%20were%20alternatives%20to,i386%20in%20the%20early%2D1990s https://en.wikipedia.org/wiki/List_of_VIA_chipsets#:~:text=V.... But to your original point: CPUs don't really fail unless abused is my understanding. The bad ones are filtered out at the factory before they ever get to consumers.
- drewzero1 5y agoI kind of miss add-in processor cards to allow a computer to run software from another architecture. Those devices were basically a whole computer on a card or add-on that would use the host computer for I/O with some level of integration. Stuff like the Apple IIe card for the Macintosh LC, or the MacCharlie sidecar for the original Macintosh that allowed it to run PC programs. I bet there are modern PCI cards out there that can add a hard-to-emulate processor to a consumer/prosumer-grade system, but I'm not sure what to search for.