From: David Hildenbrand <david(a)redhat.com>
[redhat] virtio: enable virtio-mem on x86-64 as tech-preview
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=2014492
Let's enable CONFIG_VIRTIO_MEM=m on x86-64 in RHEL 9. As it will be
tech-preview, properly taint the kernel as soon as we're initializing
the driver for an actual device in a !kdump environment where we might
actually hot(un)plug memory when instructed by the hypervisor.
We won't be tainting in a kdump kernel where the sole purpose is to check
if a given PFN is actually part of a plugged virtio-mem device and can
be dumped safely.
Signed-off-by: David Hildenbrand <david(a)redhat.com>
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index blahblah..blahblah 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -2754,6 +2754,19 @@ static int virtio_mem_probe(struct virtio_device *vdev)
/* trigger a config update to start processing the requested_size */
if (!vm->in_kdump) {
+#ifdef CONFIG_RHEL_DIFFERENCES
+ static bool printed;
+
+ /*
+ * virtio-mem, and especially its memory hot(un)plug
+ * functionality, is tech-preview.
+ */
+ if (!printed) {
+ printed = true;
+ mark_tech_preview("virtio_mem", THIS_MODULE);
+ }
+#endif /* CONFIG_RHEL_DIFFERENCES */
+
atomic_set(&vm->config_changed, 1);
queue_work(system_freezable_wq, &vm->wq);
}
diff --git a/redhat/configs/common/generic/x86/x86_64/CONFIG_VIRTIO_MEM
b/redhat/configs/common/generic/x86/x86_64/CONFIG_VIRTIO_MEM
index blahblah..blahblah 100644
--- a/redhat/configs/common/generic/x86/x86_64/CONFIG_VIRTIO_MEM
+++ b/redhat/configs/common/generic/x86/x86_64/CONFIG_VIRTIO_MEM
@@ -1 +1 @@
-# CONFIG_VIRTIO_MEM is not set
+CONFIG_VIRTIO_MEM=m
diff --git a/redhat/configs/fedora/generic/x86/x86_64/CONFIG_VIRTIO_MEM
b/redhat/configs/fedora/generic/x86/x86_64/CONFIG_VIRTIO_MEM
deleted file mode 100644
index blahblah..blahblah 0
--- a/redhat/configs/fedora/generic/x86/x86_64/CONFIG_VIRTIO_MEM
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_VIRTIO_MEM=m
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1535