diff options
| author | David Hildenbrand <[email protected]> | 2021-02-25 17:17:45 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-02-26 09:41:01 -0800 |
| commit | 94c8945376d44b37aa3ab5b58669a2a86326968e (patch) | |
| tree | d0ceadb78653a722fa5848d41c6e6b2faa894a55 /tools/perf/scripts/python | |
| parent | 7707248a4727c4e8ee8d84ed578a9807d8994a40 (diff) | |
virtio-mem: check against mhp_get_pluggable_range() which memory we can hotplug
Right now, we only check against MAX_PHYSMEM_BITS - but turns out there
are more restrictions of which memory we can actually hotplug, especially
om arm64 or s390x once we support them: we might receive something like
-E2BIG or -ERANGE from add_memory_driver_managed(), stopping device
operation.
So, check right when initializing the device which memory we can add,
warning the user. Try only adding actually pluggable ranges: in the worst
case, no memory provided by our device is pluggable.
In the usual case, we expect all device memory to be pluggable, and in
corner cases only some memory at the end of the device-managed memory
region to not be pluggable.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Signed-off-by: Anshuman Khandual <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Pankaj Gupta <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: teawater <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: Pankaj Gupta <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Catalin Marinas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions