tools: add selftests to hmm for COW in device memory
authorAlex Sierra <alex.sierra@amd.com>
Fri, 15 Jul 2022 15:05:21 +0000 (10:05 -0500)
committerakpm <akpm@linux-foundation.org>
Mon, 18 Jul 2022 00:14:29 +0000 (17:14 -0700)
commit96c0657383fefdee04d4053bcc266bfa620d073d
treeea3e23ca756ef055a7befcf937f0a6d418e1d42b
parent9e09b705fdb8f3892ec1efc2382f64adabc14c50
tools: add selftests to hmm for COW in device memory

The objective is to test device migration mechanism in pages marked as
COW, for private and coherent device type.  In case of writing to COW
private page(s), a page fault will migrate pages back to system memory
first.  Then, these pages will be duplicated.  In case of COW device
coherent type, pages are duplicated directly from device memory.

Link: https://lkml.kernel.org/r/20220715150521.18165-15-alex.sierra@amd.com
Signed-off-by: Alex Sierra <alex.sierra@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/vm/hmm-tests.c