On Thu, Apr 13, 2017 at 07:34:19PM +0300, Michael S. Tsirkin wrote: > So we don't need the bitmap to talk to host, it is just > a data structure we chose to maintain lists of pages, right? > OK as far as it goes but you need much better isolation for it. > Build a data structure with APIs such as _init, _cleanup, _add, _clear, > _find_first, _find_next. > Completely unrelated to pages, it just maintains bits. > Then use it here. That sounds an awful lot like the xbitmap I wrote a few months ago ... http://git.infradead.org/users/willy/linux-dax.git/commit/727e401bee5ad7d37e0077291d90cc17475c6392