redhat: stop tainting the kernel with virtio-mem
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2228379
Upstream Status: RHEL only
Tested: Attached a virtio-mem device to a RHEL9 VM and made sure that the driver is loaded and the kernel is not tainted. Further, made sure that the "bbm_safe_unplug" parameter no longer shows up under /sys/module/virtio_mem/parameters/.
Let's stop tainting the kernel simply because a virtio-mem device is attached and the driver is loaded.
From a kernel / memory hot(un)plug point of view, virtio-mem works nowadays at least as good as DIMM-based memory hot(un)plug.
That virtio-mem is active can be observed, for example, using dmesg:
[root@vm-0 ~]# dmesg | grep virtio_mem
[ 3.286652] virtio_mem virtio0: start address: 0x180000000
[ 3.290898] virtio_mem virtio0: region size: 0x800000000
[ 3.294758] virtio_mem virtio0: device block size: 0x200000
[ 3.298746] virtio_mem virtio0: nid: 0
[ 3.301568] virtio_mem virtio0: memory block size: 0x8000000
[ 3.305360] virtio_mem virtio0: subblock size: 0x400000
[ 3.309225] virtio_mem virtio0: plugged size: 0x0
[ 3.312397] virtio_mem virtio0: requested size: 0x3e800000
Or /proc/iomem:
[root@vm-0 ~]# cat /proc/iomem
...
180000000-97fffffff : virtio0
180000000-1bfffffff : System RAM (virtio_mem)
...
Further, whenever the hypervisor requests a size change (such that virtio-mem would go ahead and try (un)plugging memory), we get additional info in dmesg such that we could correlate events:
[ 159.583623] virtio_mem virtio0: plugged size: 0x3e800000
[ 159.587320] virtio_mem virtio0: requested size: 0x4000000
As we stop tainting the kernel, hide the "bbm_safe_unplug" kernel parameter in RHEL 9, because we really don't want that to ever be active.
Signed-off-by: David Hildenbrand david@redhat.com