logoalt Hacker News

Teknoman117 • yesterday at 11:12 PM • 0 replies • view on HN

To a VM? Possibly.

The DMA might actually be the easy part.

The main concern is how many VM exits per second a modern CPU can handle. Even though the interface is "slow", you can probably do ~500k to 1 million IN/OUTs or MOVs per second to ISA. You'd have to trap (VM exit) every access to a IO port or memory within the ISA window.

During the pandemic I cobbled together a KVM-accelerated emulator for an old 386EX based board I had and trapping every memory access to IO was slower than the real hardware.