Skip to content
Snippets Groups Projects
Commit 56cf7ef0 authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Keith Busch
Browse files

nvme-pci: skip CMB blocks incompatible with PCI P2P DMA


The PCI P2PDMA code will register the CMB block to the memory
hot-plugging subsystem, which have an alignment requirement. Memory
blocks that do not satisfy this alignment requirement (usually 2MB) will
lead to a WARNING from memory hotplugging.

Verify the CMB block's address and size against the alignment and only
try to send CMB blocks compatible with it to prevent this warning.

Tested on Intel DC D4502 SSD, which has a 512K CMB block that is too
small for memory hotplugging (thus PCI P2PDMA).

Signed-off-by: Icenowy Zheng's avatarIcenowy Zheng <uwu@icenowy.me>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 6a3572e1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment