Thread (36 messages) 36 messages, 6 authors, 2022-02-25

Re: [PATCH v4] virt: vmgenid: introduce driver for reinitializing RNG on VM fork

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2022-02-25 12:57:07
Also in: kvm, linux-crypto, lkml, qemu-devel

On Fri, Feb 25, 2022 at 1:53 PM Greg KH [off-list ref] wrote:
On Fri, Feb 25, 2022 at 01:48:48PM +0100, Jason A. Donenfeld wrote:
quoted
+static struct acpi_driver acpi_driver = {
+     .name = "vmgenid",
+     .ids = vmgenid_ids,
+     .owner = THIS_MODULE,
+     .ops = {
+             .add = vmgenid_acpi_add,
+             .notify = vmgenid_acpi_notify,
+     }
+};
+
+static int __init vmgenid_init(void)
+{
+     return acpi_bus_register_driver(&acpi_driver);
+}
+
+static void __exit vmgenid_exit(void)
+{
+     acpi_bus_unregister_driver(&acpi_driver);
+}
+
+module_init(vmgenid_init);
+module_exit(vmgenid_exit);
Nit, you could use module_acpi_driver() to make this even smaller if you
want to.
Nice! Will do.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help