vmci_doorbell.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * VMware VMCI Driver
  4. *
  5. * Copyright (C) 2012 VMware, Inc. All rights reserved.
  6. */
  7. #ifndef VMCI_DOORBELL_H
  8. #define VMCI_DOORBELL_H
  9. #include <linux/vmw_vmci_defs.h>
  10. #include <linux/types.h>
  11. #include "vmci_driver.h"
  12. /*
  13. * VMCINotifyResourceInfo: Used to create and destroy doorbells, and
  14. * generate a notification for a doorbell or queue pair.
  15. */
  16. struct vmci_dbell_notify_resource_info {
  17. struct vmci_handle handle;
  18. u16 resource;
  19. u16 action;
  20. s32 result;
  21. };
  22. /*
  23. * Structure used for checkpointing the doorbell mappings. It is
  24. * written to the checkpoint as is, so changing this structure will
  25. * break checkpoint compatibility.
  26. */
  27. struct dbell_cpt_state {
  28. struct vmci_handle handle;
  29. u64 bitmap_idx;
  30. };
  31. int vmci_dbell_host_context_notify(u32 src_cid, struct vmci_handle handle);
  32. int vmci_dbell_get_priv_flags(struct vmci_handle handle, u32 *priv_flags);
  33. bool vmci_dbell_register_notification_bitmap(u64 bitmap_ppn);
  34. void vmci_dbell_scan_notification_entries(u8 *bitmap);
  35. #endif /* VMCI_DOORBELL_H */