18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * VMware VMCI Driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2012 VMware, Inc. All rights reserved. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef VMCI_DOORBELL_H 98c2ecf20Sopenharmony_ci#define VMCI_DOORBELL_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <linux/vmw_vmci_defs.h> 128c2ecf20Sopenharmony_ci#include <linux/types.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include "vmci_driver.h" 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/* 178c2ecf20Sopenharmony_ci * VMCINotifyResourceInfo: Used to create and destroy doorbells, and 188c2ecf20Sopenharmony_ci * generate a notification for a doorbell or queue pair. 198c2ecf20Sopenharmony_ci */ 208c2ecf20Sopenharmony_cistruct vmci_dbell_notify_resource_info { 218c2ecf20Sopenharmony_ci struct vmci_handle handle; 228c2ecf20Sopenharmony_ci u16 resource; 238c2ecf20Sopenharmony_ci u16 action; 248c2ecf20Sopenharmony_ci s32 result; 258c2ecf20Sopenharmony_ci}; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* 288c2ecf20Sopenharmony_ci * Structure used for checkpointing the doorbell mappings. It is 298c2ecf20Sopenharmony_ci * written to the checkpoint as is, so changing this structure will 308c2ecf20Sopenharmony_ci * break checkpoint compatibility. 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_cistruct dbell_cpt_state { 338c2ecf20Sopenharmony_ci struct vmci_handle handle; 348c2ecf20Sopenharmony_ci u64 bitmap_idx; 358c2ecf20Sopenharmony_ci}; 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciint vmci_dbell_host_context_notify(u32 src_cid, struct vmci_handle handle); 388c2ecf20Sopenharmony_ciint vmci_dbell_get_priv_flags(struct vmci_handle handle, u32 *priv_flags); 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cibool vmci_dbell_register_notification_bitmap(u64 bitmap_ppn); 418c2ecf20Sopenharmony_civoid vmci_dbell_scan_notification_entries(u8 *bitmap); 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#endif /* VMCI_DOORBELL_H */ 44