Jeremy Fitzhardinge wrote: > Gerd Hoffmann wrote: >> mmu motifier will fit the bill and additionally work fine on partial >> unmaps. > > OK, it'll be interesting to see how that turns out. Prelimary version attached. Features: * compiles ;) * survived light testing. * mapping via xc_gnttab_map_grant_ref*s* (i.e. multiple grants at once) works stable. Last time I tried that with 2.6.18 I quickly killed the host kernel. * much smaller than the 2.6.18 version. * maps grants directly, doesn't burn pfns and kernel address space. Issues: (1) Grant teardown on unclean exit doesn't work yet. Doesn't crash, but I think I leak the pages because they are not unmapped via grant api. (2) Also on unclean exit my release callbacks are not called for some silly reason, to be investigated. Memory leak. Probably related to (1). Maybe I did something wrong with the VM flags ... (3) There are probably some nasty corner cases not handled correctly yet, the whole thing needs a careful review once the two issues listed above are fixed. Reviews, comments and hints are welcome, Gerd