On 26.01.2022 16:59, Julien Grall wrote: > From: Julien Grall <[email protected]> > > The name of arch_mfn_in_directmap() suggests that it will check against > that the passed MFN should be in the directmap. > > However, the current callers are passing the next MFN and the > implementation will return true for up to one MFN past the directmap. > > It would be more meaningful to test the exact MFN rather than the > next one. > > That said, the current expectation is the memory will be direct-mapped > from 0 up to a given MFN. This may not be a valid assumption on all > the architectures. > > For instance, on Arm32 only the xenheap that will be direct-mapped. > This may not be allocated a the beginning of the RAM. > > So take the opportunity to rework the parameters and pass the > number of pages we want to check. This also requires to rename > the helper to better match the implementation. > > Note that the implementation of the helper on arm32 is left as-is > for now. > > Signed-off-by: Julien Grall <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
