do_wp_page is entered when the pte shows that the page is not writeable
and it makes the page writable in some situations. Then we do not
invalidate the remote reference.
However, when we do COW then a *new* page is put in place of the existing
readonly page. At that point we need to remove the remote pte that is
readonly. Then we install a new pte pointing to a *different* page that is
writable.
Are you saying that you get the callback when transitioning from a read
only to a read write pte on the *same* page?
--