Thread (1 message) flat view 1 message, 1 author, 2022-08-15

Re: [PATCH v1] drm/ttm: Refcount allocated tail pages

From: Christian König via Virtualization <hidden>
Date: 2022-08-15 13:54:10
Also in: dri-devel, kvm, lkml

Am 15.08.22 um 15:45 schrieb Dmitry Osipenko:
[SNIP]
quoted
Well that comment sounds like KVM is doing the right thing, so I'm
wondering what exactly is going on here.
KVM actually doesn't hold the page reference, it takes the temporal
reference during page fault and then drops the reference once page is
mapped, IIUC. Is it still illegal for TTM? Or there is a possibility for
a race condition here?
Well the question is why does KVM grab the page reference in the first 
place?

If that is to prevent the mapping from changing then yes that's illegal 
and won't work. It can always happen that you grab the address, solve 
the fault and then immediately fault again because the address you just 
grabbed is invalidated.

If it's for some other reason than we should probably investigate if we 
shouldn't stop doing this.

Regards,
Christian.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help