Centos-kernel-stream-9/drivers/hv
Maxim Levitsky c324026db7 hv_balloon: Fallback to generic_online_page() for non-HV hot added mem
JIRA: https://issues.redhat.com/browse/RHEL-80096

commit 1da602ec36a3e208c070ec23895e84cbb621a12e
Author: Jacob Pan <jacob.pan@linux.microsoft.com>
Date:   Tue Jan 7 10:09:18 2025 -0800

    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 <vsethi@nvidia.com>
    Tested-by: Michael Frohlich <mfrohlich@microsoft.com>
    Reviewed-by: Michael Kelley <mhklinux@outlook.com>
    Signed-off-by: Jacob Pan <jacob.pan@linux.microsoft.com>
    Link: https://lore.kernel.org/r/20250107180918.1053933-1-jacob.pan@linux.microsoft.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Message-ID: <20250107180918.1053933-1-jacob.pan@linux.microsoft.com>

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
2025-06-16 14:00:51 -04:00
..
Kconfig Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
Makefile Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
channel.c Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer() 2025-06-16 14:00:51 -04:00
channel_mgmt.c Drivers: hv: vmbus: Wait for boot-time offers during boot and resume 2025-06-10 14:29:59 -04:00
connection.c Drivers: hv: vmbus: Wait for boot-time offers during boot and resume 2025-06-10 14:29:59 -04:00
hv.c hyperv: Introduce hv_recommend_using_aeoi() 2025-06-10 14:30:03 -04:00
hv_balloon.c hv_balloon: Fallback to generic_online_page() for non-HV hot added mem 2025-06-16 14:00:51 -04:00
hv_common.c Drivers: hv: Fix bad ref to hv_synic_eventring_tail when CPU goes offline 2025-06-10 14:30:05 -04:00
hv_debugfs.c hv_debugfs: Make hv_debug_root static 2020-04-04 17:47:43 +01:00
hv_fcopy.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-06-10 14:29:58 -04:00
hv_kvp.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-06-10 14:29:58 -04:00
hv_proc.c Drivers: hv: Export some functions for use by root partition module 2025-06-10 14:30:03 -04:00
hv_snapshot.c hyperv: Switch from hyperv-tlfs.h to hyperv/hvhdk.h 2025-06-10 14:29:58 -04:00
hv_trace.c
hv_trace.h Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE 2021-04-18 13:03:11 +00:00
hv_trace_balloon.h
hv_util.c Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet 2025-06-10 14:29:57 -04:00
hv_utils_transport.c Drivers: hv: utils: Make use of the helper macro LIST_HEAD() 2022-06-14 17:25:23 +02:00
hv_utils_transport.h
hyperv_vmbus.h uio_hv_generic: Fix sysfs creation path for ring buffer 2025-06-10 14:30:07 -04:00
mshv.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_common.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_eventfd.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_eventfd.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_irq.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_portid_table.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_root.h Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_root_hv_call.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_root_main.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
mshv_synic.c Drivers: hv: Introduce mshv_root module to expose /dev/mshv to VMMs 2025-06-10 14:30:04 -04:00
ring_buffer.c Drivers: hv: vmbus: Remove second way of mapping ring buffers 2023-07-27 18:36:02 +02:00
vmbus_drv.c Drivers: hv: Make the sysfs node size for the ring buffer dynamic 2025-06-10 14:30:07 -04:00