On 09/27/2010 10:00 AM, Avi Kivity wrote:
The standard way to deal with this in the BIOS (and *only* the BIOS can do this!) is to trap into SMM and have an SMI handler do the I/O. Taking an SMI drops the CPU into big real mode regardless of what the previous CPU mode was.
One problem is that kvm doesn't implement SMM at this point.
While we could do it (not going to be pleasant), it's not going to be present on many deployed machines. I also don't see a way to detect SMM (I guess we could expose it via fwcfg).
What about the ISA DMA engine?
The ISA DMA engine can only access the bottom 16 MiB since it only has 24 address bits.
As far as KVM is concerned, if KVM doesn't wish to implement SMM (which really isn't all that hard -- it's pretty much a matter of dumping the state and undumping it on RSM; since SMM code is restricted to the firmware it doesn't necessarily have to be compatible with the native CPU) KVM could simply implement a custom memory-moving device -- which would be faster to boot.