OSDN Git Service

xen/gntdev: use mmu_interval_notifier_insert
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 12 Nov 2019 20:22:31 +0000 (16:22 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 23 Nov 2019 23:56:45 +0000 (19:56 -0400)
commitd3eeb1d77c5d0af9df442db63722928238310a86
tree99df12b44bbc7831e17a626e565e59245fd83ce8
parenta22dd506400d0f4784ad596f073b9eb5ed7c6a2a
xen/gntdev: use mmu_interval_notifier_insert

gntdev simply wants to monitor a specific VMA for any notifier events,
this can be done straightforwardly using mmu_interval_notifier_insert()
over the VMA's VA range.

The notifier should be attached until the original VMA is destroyed.

It is unclear if any of this is even sane, but at least a lot of duplicate
code is removed.

Link: https://lore.kernel.org/r/20191112202231.3856-15-jgg@ziepe.ca
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/xen/gntdev-common.h
drivers/xen/gntdev.c