On 10/22/24 18:39, Andrew Cooper wrote:
Given that soffs is the offset into the 2M superpage,

   start = (src - soffs) >> PAGE_SIFT

is a complicated expression for the frame address of the containing superpage.
Except, start is converted straight back to a byte address to use, so the
shifting is unnecessary too.

The only done with the mapped pointer is to have soffs added back on for the

nit: think you dropped a word here, "The only done".

memmove() call.  bootstrap_map_addr() passes through the offset, so we can
pass src directly in and simplify the memmove() call too.  For the end mapping
address, this simplifies to just src + sz too.

The same reasoning holds for dst and doffs.

No functional change.

Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau MonnĂ© <[email protected]>
CC: Daniel P. Smith <[email protected]>

After nit,

Reviewed-by: Daniel P. Smith <[email protected]>

Reply via email to