Displaying 3 results from an estimated 3 matches for "have_futex_cmpxchg".
2019 May 07
4
[PATCH RFC] vhost: don't use kmap() to log dirty pages
Vhost log dirty pages directly to a userspace bitmap through GUP and
kmap_atomic() since kernel doesn't have a set_bit_to_user()
helper. This will cause issues for the arch that has virtually tagged
caches. The way to fix is to keep using userspace virtual address.
Fortunately, futex has a cmpxchg to userspace memory helper
futex_atomic_cmpxchg_inatomic(). So switch to use it to exchange the
2019 May 07
4
[PATCH RFC] vhost: don't use kmap() to log dirty pages
Vhost log dirty pages directly to a userspace bitmap through GUP and
kmap_atomic() since kernel doesn't have a set_bit_to_user()
helper. This will cause issues for the arch that has virtually tagged
caches. The way to fix is to keep using userspace virtual address.
Fortunately, futex has a cmpxchg to userspace memory helper
futex_atomic_cmpxchg_inatomic(). So switch to use it to exchange the
2019 May 07
0
[PATCH RFC] vhost: don't use kmap() to log dirty pages
On Mon, May 06, 2019 at 10:23:29PM -0400, Jason Wang wrote:
> Note: there're archs (few non popular ones) that don't implement
> futex helper, we can't log dirty pages. We can fix them on top or
> simply disable LOG_ALL features of vhost.
That means vhost now has to depend on HAVE_FUTEX_CMPXCHG to make
sure we have a working implementation.
> #include <linux/sched/signal.h>
> #include <linux/interval_tree_generic.h>
> #include <linux/nospec.h>
> +#include <asm/futex.h>
Also please include the futex maintainers to make sure they are fine
with this...