Commit 0214feb8 authored by ZhangPeng's avatar ZhangPeng Committed by Peng Zhang
Browse files

mm/userswap: introduce UFFDIO_COPY_MODE_DIRECT_MAP

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8KESX


CVE: NA

--------------------------------

Add a new UFFDIO_COPY mode UFFDIO_COPY_MODE_DIRECT_MAP to map physical
pages without copy_from_user(). We use uswap_unmap_anon_page() to unmap
an anonymous page and uswap_map_anon_page() to map page to src addr. We
introduce mfill_atomic_pte_nocopy() to achieve zero copy by unmapping
src_addr to the physical page and establishing the mapping from dst_addr
to the physical page.

Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent b54b55c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment