Balbir Singh
aa3ade4295
lib/test_hmm: add large page allocation failure testing
...
Add HMM_DMIRROR_FLAG_FAIL_ALLOC flag to simulate large page allocation
failures, enabling testing of split migration code paths.
This test flag allows validation of the fallback behavior when destination
device cannot allocate compound pages. This is useful for testing the
split migration functionality.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Balbir Singh <[email protected] >
Cc: David Hildenbrand <[email protected] >
Cc: Zi Yan <[email protected] >
Cc: Joshua Hahn <[email protected] >
Cc: Rakie Kim <[email protected] >
Cc: Byungchul Park <[email protected] >
Cc: Gregory Price <[email protected] >
Cc: Ying Huang <[email protected] >
Cc: Alistair Popple <[email protected] >
Cc: Oscar Salvador <[email protected] >
Cc: Lorenzo Stoakes <[email protected] >
Cc: Baolin Wang <[email protected] >
Cc: "Liam R. Howlett" <[email protected] >
Cc: Nico Pache <[email protected] >
Cc: Ryan Roberts <[email protected] >
Cc: Dev Jain <[email protected] >
Cc: Barry Song <[email protected] >
Cc: Lyude Paul <[email protected] >
Cc: Danilo Krummrich <[email protected] >
Cc: David Airlie <[email protected] >
Cc: Simona Vetter <[email protected] >
Cc: Ralph Campbell <[email protected] >
Cc: Mika Penttilä <[email protected] >
Cc: Matthew Brost <[email protected] >
Cc: Francois Dugast <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2025-11-24 15:08:48 -08:00
Alistair Popple
ad4c365221
hmm-tests: add test for migrate_device_range()
...
Link: https://lkml.kernel.org/r/a73cf109de0224cfd118d22be58ddebac3ae2897.1664366292.git-series.apopple@nvidia.com
Signed-off-by: Alistair Popple <[email protected] >
Cc: Jason Gunthorpe <[email protected] >
Cc: Ralph Campbell <[email protected] >
Cc: John Hubbard <[email protected] >
Cc: Alex Sierra <[email protected] >
Cc: Felix Kuehling <[email protected] >
Cc: Alex Deucher <[email protected] >
Cc: Ben Skeggs <[email protected] >
Cc: Christian König <[email protected] >
Cc: Dan Williams <[email protected] >
Cc: David Hildenbrand <[email protected] >
Cc: "Huang, Ying" <[email protected] >
Cc: Lyude Paul <[email protected] >
Cc: Matthew Wilcox <[email protected] >
Cc: Michael Ellerman <[email protected] >
Cc: Yang Shi <[email protected] >
Cc: Zi Yan <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2022-10-12 18:51:50 -07:00
Alex Sierra
4c2e0f764e
lib: add support for device coherent type in test_hmm
...
Device Coherent type uses device memory that is coherently accesible by
the CPU. This could be shown as SP (special purpose) memory range at the
BIOS-e820 memory enumeration. If no SP memory is supported in system,
this could be faked by setting CONFIG_EFI_FAKE_MEMMAP.
Currently, test_hmm only supports two different SP ranges of at least
256MB size. This could be specified in the kernel parameter variable
efi_fake_mem. Ex. Two SP ranges of 1GB starting at 0x100000000 &
0x140000000 physical address. Ex.
efi_fake_mem=1G@0x100000000:0x40000,1G@0x140000000:0x40000
Private and coherent device mirror instances can be created in the same
probed. This is done by passing the module parameters spm_addr_dev0 &
spm_addr_dev1. In this case, it will create four instances of
device_mirror. The first two correspond to private device type, the last
two to coherent type. Then, they can be easily accessed from user space
through /dev/hmm_mirror<num_device>. Usually num_device 0 and 1 are for
private, and 2 and 3 for coherent types. If no module parameters are
passed, two instances of private type device_mirror will be created only.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alex Sierra <[email protected] >
Acked-by: Felix Kuehling <[email protected] >
Reviewed-by: Alistair Poppple <[email protected] >
Cc: Christoph Hellwig <[email protected] >
Cc: David Hildenbrand <[email protected] >
Cc: Jason Gunthorpe <[email protected] >
Cc: Jerome Glisse <[email protected] >
Cc: Matthew Wilcox <[email protected] >
Cc: Ralph Campbell <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2022-07-17 17:14:29 -07:00
Alex Sierra
25b80162d5
lib: test_hmm add module param for zone device type
...
In order to configure device coherent in test_hmm, two module parameters
should be passed, which correspond to the SP start address of each device
(2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed, private
device type is configured.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alex Sierra <[email protected] >
Signed-off-by: Christoph Hellwig <[email protected] >
Acked-by: Felix Kuehling <[email protected] >
Reviewed-by: Alistair Poppple <[email protected] >
Cc: David Hildenbrand <[email protected] >
Cc: Jason Gunthorpe <[email protected] >
Cc: Jerome Glisse <[email protected] >
Cc: Matthew Wilcox <[email protected] >
Cc: Ralph Campbell <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2022-07-17 17:14:28 -07:00
Alex Sierra
188f48268d
lib: test_hmm add ioctl to get zone device type
...
Add new ioctl cmd to query zone device type. This will be used once the
test_hmm adds zone device coherent type.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alex Sierra <[email protected] >
Signed-off-by: Christoph Hellwig <[email protected] >
Acked-by: Felix Kuehling <[email protected] >
Reviewed-by: Alistair Poppple <[email protected] >
Cc: David Hildenbrand <[email protected] >
Cc: Jason Gunthorpe <[email protected] >
Cc: Jerome Glisse <[email protected] >
Cc: Matthew Wilcox <[email protected] >
Cc: Ralph Campbell <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2022-07-17 17:14:28 -07:00
Alistair Popple
b659baea75
mm: selftests for exclusive device memory
...
Adds some selftests for exclusive device memory.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alistair Popple <[email protected] >
Acked-by: Jason Gunthorpe <[email protected] >
Tested-by: Ralph Campbell <[email protected] >
Reviewed-by: Ralph Campbell <[email protected] >
Cc: Ben Skeggs <[email protected] >
Cc: Christoph Hellwig <[email protected] >
Cc: Hugh Dickins <[email protected] >
Cc: John Hubbard <[email protected] >
Cc: "Matthew Wilcox (Oracle)" <[email protected] >
Cc: Peter Xu <[email protected] >
Cc: Shakeel Butt <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
Signed-off-by: Linus Torvalds <[email protected] >
2021-07-01 11:06:03 -07:00
Ralph Campbell
e478425bec
mm/hmm: add tests for hmm_pfn_to_map_order()
...
Add a sanity test for hmm_range_fault() returning the page mapping size
order.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ralph Campbell <[email protected] >
Signed-off-by: Jason Gunthorpe <[email protected] >
2020-07-10 16:24:28 -03:00
Ralph Campbell
b2ef9f5a5c
mm/hmm/test: add selftest driver for HMM
...
This driver is for testing device private memory migration and devices
which use hmm_range_fault() to access system memory via device page tables.
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ralph Campbell <[email protected] >
Signed-off-by: Jérôme Glisse <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wei Yongjun <[email protected] >
Link: https://lore.kernel.org/r/20200511183704.GA225608@mwanda
Signed-off-by: Dan Carpenter <[email protected] >
Signed-off-by: Jason Gunthorpe <[email protected] >
2020-05-19 16:48:30 -03:00