// SPDX-License-Identifier: GPL-2.0-or-later #include "linux/virtio_pci.h" #include <linux/virtio_pci_legacy.h> #include <linux/module.h> #include <linux/pci.h> /* * vp_legacy_probe: probe the legacy virtio pci device, note that the * caller is required to enable PCI device before calling this function. * @ldev: the legacy virtio-pci device * * Return 0 on succeed otherwise fail */ int vp_legacy_probe(struct virtio_pci_legacy_device *ldev) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_probe: remove and cleanup the legacy virtio pci device * @ldev: the legacy virtio-pci device */ void vp_legacy_remove(struct virtio_pci_legacy_device *ldev) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_get_features - get features from device * @ldev: the legacy virtio-pci device * * Returns the features read from the device */ u64 vp_legacy_get_features(struct virtio_pci_legacy_device *ldev) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_get_driver_features - get driver features from device * @ldev: the legacy virtio-pci device * * Returns the driver features read from the device */ u64 vp_legacy_get_driver_features(struct virtio_pci_legacy_device *ldev) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_set_features - set features to device * @ldev: the legacy virtio-pci device * @features: the features set to device */ void vp_legacy_set_features(struct virtio_pci_legacy_device *ldev, u32 features) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_get_status - get the device status * @ldev: the legacy virtio-pci device * * Returns the status read from device */ u8 vp_legacy_get_status(struct virtio_pci_legacy_device *ldev) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_set_status - set status to device * @ldev: the legacy virtio-pci device * @status: the status set to device */ void vp_legacy_set_status(struct virtio_pci_legacy_device *ldev, u8 status) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_queue_vector - set the MSIX vector for a specific virtqueue * @ldev: the legacy virtio-pci device * @index: queue index * @vector: the config vector * * Returns the config vector read from the device */ u16 vp_legacy_queue_vector(struct virtio_pci_legacy_device *ldev, u16 index, u16 vector) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_config_vector - set the vector for config interrupt * @ldev: the legacy virtio-pci device * @vector: the config vector * * Returns the config vector read from the device */ u16 vp_legacy_config_vector(struct virtio_pci_legacy_device *ldev, u16 vector) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_set_queue_address - set the virtqueue address * @ldev: the legacy virtio-pci device * @index: the queue index * @queue_pfn: pfn of the virtqueue */ void vp_legacy_set_queue_address(struct virtio_pci_legacy_device *ldev, u16 index, u32 queue_pfn) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_get_queue_enable - enable a virtqueue * @ldev: the legacy virtio-pci device * @index: the queue index * * Returns whether a virtqueue is enabled or not */ bool vp_legacy_get_queue_enable(struct virtio_pci_legacy_device *ldev, u16 index) { … } EXPORT_SYMBOL_GPL(…); /* * vp_legacy_get_queue_size - get size for a virtqueue * @ldev: the legacy virtio-pci device * @index: the queue index * * Returns the size of the virtqueue */ u16 vp_legacy_get_queue_size(struct virtio_pci_legacy_device *ldev, u16 index) { … } EXPORT_SYMBOL_GPL(…); MODULE_VERSION(…) …; MODULE_DESCRIPTION(…) …; MODULE_AUTHOR(…) …; MODULE_LICENSE(…) …;