3 ms·
> Intel was the one that dropped segment limits, AMD added them in later... I was there (at VMware). That isn't quite what happened. We got an early engineer
by kijiki 9y ago
> Intel was the one that dropped segment limits, AMD added them in later...
I was there (at VMware). That isn't quite what happened.
We got an early engineering prototype of the AMD64 chip. Ran at like 400Mhz or something, and was in an impressively massive case.
It caused two big problems for us:
1) as you note, it disabled segment offsets on all segment registers except %FS and %GS, which are commonly used for thread local storage. And much worse for us, it disabled segment limit checking entirely, which we used to protect the virtual machine monitor (VMM) in the guest's virtual address space.
2) it disabled LAHF and SAHF instructions, which cause a pretty noticeable performance regression in the binary translator (BT).
AMD was pretty helpful when we notified them, and Rev D and later of their chip had a special "VMware bit" that re-enabled segment limit checking and LAHF/SAHF. Intel was less helpful, and told us to just wait for Vanderpool (later renamed VT-X). Early versions of Vanderpool were actually slower than the traditional BT VMM. And annoyingly, for years VT-X didn't support real-mode or big-real-mode, so we had to keep emulation/BT around for that, which is really only used for the first half-second of bootup. AMD's Pacifica got this right from the start.
Ole and some of the other early monitor hackers wrote a paper that covers some of this history if you want the gory details:
https://www.ece.cmu.edu/~ece845/docs/vmware-evolution.pdf https://www.ece.cmu.edu/~ece845/docs/vmware-evolution.pdf