[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/3] x86/boot: Simplify address calculations in move_memory()
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 <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> CC: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> After nit, Reviewed-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |