vmci_doorbell.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * VMware VMCI Driver
  3. *
  4. * Copyright (C) 2012 VMware, Inc. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation version 2 and no later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  12. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  13. * for more details.
  14. */
  15. #ifndef VMCI_DOORBELL_H
  16. #define VMCI_DOORBELL_H
  17. #include <linux/vmw_vmci_defs.h>
  18. #include <linux/types.h>
  19. #include "vmci_driver.h"
  20. /*
  21. * VMCINotifyResourceInfo: Used to create and destroy doorbells, and
  22. * generate a notification for a doorbell or queue pair.
  23. */
  24. struct vmci_dbell_notify_resource_info {
  25. struct vmci_handle handle;
  26. u16 resource;
  27. u16 action;
  28. s32 result;
  29. };
  30. /*
  31. * Structure used for checkpointing the doorbell mappings. It is
  32. * written to the checkpoint as is, so changing this structure will
  33. * break checkpoint compatibility.
  34. */
  35. struct dbell_cpt_state {
  36. struct vmci_handle handle;
  37. u64 bitmap_idx;
  38. };
  39. int vmci_dbell_host_context_notify(u32 src_cid, struct vmci_handle handle);
  40. int vmci_dbell_get_priv_flags(struct vmci_handle handle, u32 *priv_flags);
  41. bool vmci_dbell_register_notification_bitmap(u32 bitmap_ppn);
  42. void vmci_dbell_scan_notification_entries(u8 *bitmap);
  43. #endif /* VMCI_DOORBELL_H */