On 12/5/25 08:57, Kalyazin, Nikita wrote:
...
> +EXPORT_SYMBOL_FOR_MODULES(set_direct_map_valid_noflush, "kvm");

I think this export is a bad idea. The interface is abhorrent enough,
but exporting it just invites abuse and bugs.

I think what this really needs is a pair of helpers that are just:

        folio_zap_direct_map()
and
        folio_restore_direct_map()

that take a folio. *Those* can get exported to modules and those should
internally flush the TLB and not expect callers to do it.

Reply via email to