libmicrovmi
libmicrovmi copied to clipboard
API: remove get_page_access
get_page_access
is actually not implemented by hypervisor. the library is supposed to maintain the state of page whose permissions have been modified, and return this state, via this API.
So it's a higher-level than we expected.
Example in Libvmi: https://github.com/libvmi/libvmi/blob/master/libvmi/events.c#L667
The function you have linked is used to retrieve internally stored vmi events, so that's something entirely different. We are now unable to read page permissions via kvmi. In Xen this would still be possible though (see: https://github.com/Wenzel/libmicrovmi/pull/110/files#diff-80464c41fe16049f9a2f969fe95cb68d2209a0d760f8d7adfe002e260c443d8bR325). I would argue that this is pretty basic hypervisor level functionality.
Indeed, good catch. Then we keep this API in the trait, and leave it unimplemented for KVM. The Libvmi Xen driver doesn't actually use the function in the driver implementation: https://github.com/libvmi/libvmi/search?q=xc_get_mem_access