crazii wrote on 2023-02-04, 15:59:
Yeah. I fixed some bugs in MPXPlay too. It did have no sound in Virtualbox with HDA, it uses PIO for immediate commands while Virtualbox only support MMIO, I read the HDA spec and found the PIO are optional only.
That makes a lot of sense, actually. As I understand it, MMIO is much more virtualization-friendly than PIO, which would require port trapping at the hypervisor level, which is costly in terms of performance.
It seems not unlike the NVMe specification (modern-day disk interface optimized for SSDs), which introduced an extension called the Doorbell Buffer Config command in version 1.3 of the spec. This extension allows the hardware to be accessed through memory-mapped I/O, with the explicit goal to make the standard more emulation/virtualization-friendly.
It's interesting how MMIO is actually the mandatory default in the HDA spec, with PIO being optional, while the opposite is true for NVMe.
It makes one wonder why not all new hardware interface standards are memory-mapped these days. Especially since port-mapped I/O isn't even supported in most non-x86 architectures. Or am I confusing things here?