HomeFreeBSD

linuxkpi: Fix set_memory_*

Description

linuxkpi: Fix set_memory_*

set_memory_* is currently implemented using PHYS_TO_DMAP but not all
architectures have a DMAP. Looking at how this function is used the
given address isn't physical but virtual so the PHYS_TO_DMAP call can
simply be removed.

Also cast numpages before shifting it to avoid overflow.

Reviewed by: kib, markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45057

(cherry picked from commit 7206f7c619912bdd4d54dd539824733eae50c3a9)

Details

Provenance
tijlAuthored on May 3 2024, 1:27 PM
Reviewer
kib
Differential Revision
D45057: linuxkpi: Fix set_memory_*
Parents
rGd8ccaa995f45: bhyve: Do not define GDB_LOG
Branches
Unknown
Tags
Unknown