Using EPT to map guest MMIO to host MMIO

Cyclonus J
2011-08-05T07:20:06Z

hi,

I am wondering if it is possible to map guest MMIO to host MMIO, the
purpose is to reduce VM_EXIT as the page tables will be setup before
MMIO accessing from guest. Here is what I have in mind:

qemu_map_guest_mmio(guest_phys_addr, host_phys_addr, flags) -->
kvm_ioctl_map_guest_mmio_region(...)

Inside function kvm_ioctl_map_guest_mmio_region, it needs to setup
mappings for EPT to map guest_phys_addr(MMIO) to host_phys_addr(MMIO).

The first host_phys_addr inside QEMU function will be provided by the
para-virtualized guest.

Thanks,
CJ