linux/drivers/virt/vmgenid.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2022 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
 *
 * The "Virtual Machine Generation ID" is exposed via ACPI or DT and changes when a
 * virtual machine forks or is cloned. This driver exists for shepherding that
 * information to random.c.
 */

#include <linux/acpi.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/random.h>

ACPI_MODULE_NAME("vmgenid");

enum {};

struct vmgenid_state {};

static void vmgenid_notify(struct device *device)
{}

static void setup_vmgenid_state(struct vmgenid_state *state, void *virt_addr)
{}

#ifdef CONFIG_ACPI
static void vmgenid_acpi_handler(acpi_handle __always_unused handle,
				 u32 __always_unused event, void *dev)
{}

static int vmgenid_add_acpi(struct device *dev, struct vmgenid_state *state)
{}
#else
static int vmgenid_add_acpi(struct device *dev, struct vmgenid_state *state)
{
	return -EINVAL;
}
#endif

static irqreturn_t vmgenid_of_irq_handler(int __always_unused irq, void *dev)
{}

static int vmgenid_add_of(struct platform_device *pdev,
			  struct vmgenid_state *state)
{}

static int vmgenid_add(struct platform_device *pdev)
{}

static const struct of_device_id vmgenid_of_ids[] =;
MODULE_DEVICE_TABLE(of, vmgenid_of_ids);

static const struct acpi_device_id vmgenid_acpi_ids[] =;
MODULE_DEVICE_TABLE(acpi, vmgenid_acpi_ids);

static struct platform_driver vmgenid_plaform_driver =;

module_platform_driver()

MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_AUTHOR();