Hi Michal, >> +int map_pages_to_xen(unsigned long virt, mfn_t mfn, unsigned long nr_mfns, >> + unsigned int flags) >> +{ >> + int rc = xen_mpumap_update(mfn_to_maddr(mfn), > What do you expect to be passed as virt? I would expect maddr which could save > you the conversion here.
I think you should be correct here and it should be fine to use virt directly. However, the one place in common code that I can see xen_mpumap_update is called is in `xen/common/vmap.c`; and here the virtual address is not the same as the machine address, but it looks like this is only used for LIVEPATCH and we perhaps don’t care about this on MPU systems? Cheers, Hari