Page MenuHomeFreeBSD

riscv: Add a stub pmap_change_attr implementation
ClosedPublic

Authored by jrtc27 on Sep 16 2021, 11:31 PM.

Details

Summary

pmap_change_attr is required by drm-kmod so we need the function to
exist. Since the Svpbmt extension is on the horizon we will likely end
up with a real implementation of it, so this stub implementation does
all the necessary page table walking to validate the input, ensuring
that no new errors are returned once it's implemented fully (other than
due to out of memory conditions when demoting L2 entries) and providing
a skeleton for that future implementation.

MFC after: 1 week

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Handle L1 pages as those are uesd for the direct map

QEMU's devices are seemingly all too simple to ever hit the direct map case, but
on real hardware if_cgem quickly trips up on this and panics during attach in
pmap_page_set_memattr.

This revision is now accepted and ready to land.Sep 17 2021, 2:31 PM