Page MenuHomeFreeBSD

riscv: Add a stub pmap_change_attr implementation
ClosedPublic

Authored by jrtc27 on Sep 16 2021, 11:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 20, 2:48 AM
Unknown Object (File)
Thu, Sep 19, 10:52 AM
Unknown Object (File)
Thu, Sep 5, 12:09 PM
Unknown Object (File)
Wed, Sep 4, 10:53 PM
Unknown Object (File)
Mon, Sep 2, 6:35 AM
Unknown Object (File)
Sun, Sep 1, 5:41 AM
Unknown Object (File)
Sat, Aug 31, 7:13 PM
Unknown Object (File)
Thu, Aug 29, 9:27 PM
Subscribers

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
rG FreeBSD src repository
Lint
Lint Not Applicable
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