[PATCH] drm/ttm: set TTM allocated pages as reserved
Paolo Bonzini
pbonzini at redhat.com
Wed Mar 29 16:56:19 UTC 2023
On 3/29/23 18:43, Christian König wrote:
>>
>>
>> 3) other uses of kmap() must switch to MMU-notifier protection.
>
> I would rather suggest to return the page additionally to the pfn from
> hva_to_pfn() when the function was able to grab a reference to it.
>
> When the page is then not available you can't call kmap() on that either.
>
>>
>> If the DRM people are okay with SetPageReserved() as a temporary hack,
>> we can change or remove the WARN in kvm_is_zone_device_page(), since
>> that is what you are referring to in the commit message.
>
> Adding Daniel for additional comments on this, but essentially we have
> changed quite some infrastructure to make sure that everybody uses
> VM_PFNMAP to prevent stuff like this from happening.
>
> I would really prefer a proper solution in KVM instead.
Hmm... Now that I think about it that would be
https://lore.kernel.org/kvm/Yc4H+dGfK83BaGpC@google.com/t/
Time to resurrect that work.
Paolo
More information about the dri-devel
mailing list