[OS-BUILD PATCHv2] [redhat] virtio: enable virtio-mem on x86-64 as tech-preview

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Hildenbrand <david@xxxxxxxxxx>

[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@xxxxxxxxxx>

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
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux