virtio_anchor.h 507 B

12345678910111213141516171819
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_VIRTIO_ANCHOR_H
  3. #define _LINUX_VIRTIO_ANCHOR_H
  4. #ifdef CONFIG_VIRTIO_ANCHOR
  5. struct virtio_device;
  6. bool virtio_require_restricted_mem_acc(struct virtio_device *dev);
  7. extern bool (*virtio_check_mem_acc_cb)(struct virtio_device *dev);
  8. static inline void virtio_set_mem_acc_cb(bool (*func)(struct virtio_device *))
  9. {
  10. virtio_check_mem_acc_cb = func;
  11. }
  12. #else
  13. #define virtio_set_mem_acc_cb(func) do { } while (0)
  14. #endif
  15. #endif /* _LINUX_VIRTIO_ANCHOR_H */