diff options
| author | Jacob Pan <[email protected]> | 2025-01-07 18:09:18 +0000 |
|---|---|---|
| committer | Wei Liu <[email protected]> | 2025-01-10 00:54:21 +0000 |
| commit | 1da602ec36a3e208c070ec23895e84cbb621a12e (patch) | |
| tree | 6d46de0a3f667593fc1d2d5695f52bdaa681f2d8 /net/unix/af_unix.c | |
| parent | Drivers: hv: vmbus: Log on missing offers if any (diff) | |
| download | kernel-1da602ec36a3e208c070ec23895e84cbb621a12e.tar.gz kernel-1da602ec36a3e208c070ec23895e84cbb621a12e.zip | |
hv_balloon: Fallback to generic_online_page() for non-HV hot added mem
The Hyper-V balloon driver installs a custom callback for handling page
onlining operations performed by the memory hotplug subsystem. This
custom callback is global, and overrides the default callback
(generic_online_page) that Linux otherwise uses. The custom callback
properly handles memory that is hot-added by the balloon driver as part
of a Hyper-V hot-add region.
But memory can also be hot-added directly by a device driver for a vPCI
device, particularly GPUs. In such a case, the custom callback installed by
the balloon driver runs, but won't find the page in its hot-add region list
and doesn't online it, which could cause driver initialization failures.
Fix this by having the balloon custom callback run generic_online_page()
when the page isn't part of a Hyper-V hot-add region, thereby doing the
default Linux behavior. This allows device driver hot-adds to work
properly. Similar cases are handled the same way in the virtio-mem driver.
Suggested-by: Vikram Sethi <[email protected]>
Tested-by: Michael Frohlich <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
Signed-off-by: Jacob Pan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Wei Liu <[email protected]>
Message-ID: <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
