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