I will add this xen/apply_to_page_range() thing to my TODOs, which atm would invovle changing these drivers to use vmf_insert_pfn_prot() instead.
Busy today (want to reply to Christian) but a) Re: performance, we would want something like vmf_insert_pfns_prot(), similar to vm_insert_pages(), to bulk-insert multiple PFNs. b) Re: PAT, we'll have to figure out why PAT information is wrong here (was there no previous PAT reservation from the driver?), but IF we really have to override, we'd want a way to tell vmf_insert_pfn_prot() to force the selected caching mode. -- Cheers David / dhildenb