for x86_64 macOS - “Build virtualization solutions on top of a lightweight hypervisor, without the need for third-party kernel extensions.” - 3rdパーティ製のハイパーバイザ(Intel HAXM)などは個々にKernel extensionが必要 (e.g. /Library/Extensions/intelhaxm.kext/Contents/MacOS/intelhaxm) - 最初からKextとして組み込むことで, ユーザが3rd party kextを手動でロードする手間を省く (締め出し) - 動機: どうやって動作しているのか理解したかった
→ 入口を分けるという選択 - IA32ではソフトウェア割り込み(INT 命令)でCPL3からCPL0へ - BSD側は引数に0x80, Mach側は0x81をとる(異なるIDT entry) - NeXTがAppleに買収されてMac OS Xの開発が始まったとき, Mac OS 9と同じ 当時の製品向けPowerPC版と, NeXTSTEPと同じx86版が並行開発されていた - “Mac OS X has been leading a secret double life for the past five years.” - Steve Jobs, WWDC 2005 - 各アーキ依存のシステムコールが必要に - 第3のシステムコール, Machdep(Machine dependent)
2019. A. Singh, Mac OS X internals: A Systems Approach. Addison-Wesley, 2010. Apple Inc, “Source Browser,” XNU - Apple Open Source. [Online]. Available: https://opensource.apple.com/source/xnu/xnu-6153.81.5/. [Accessed: 06-Jun-2020].