/* * For backwards compatibility, here is a version of the * VMCIqueue_pairPageFileInfo before host support end-points was added. * Note that the current version of that structure requires VMX to * pass down the VA of the mapped file. Before host support was added * there was nothing of the sort. So, when the driver sees the ioctl * with a parameter that is the sizeof * VMCIqueue_pairPageFileInfo_NoHostQP then it can infer that the version * of VMX running can't attach to host end points because it doesn't * provide the VA of the mapped files. * * The Linux driver doesn't get an indication of the size of the * structure passed down from user space. So, to fix a long standing * but unfiled bug, the _pad field has been renamed to version. * Existing versions of VMX always initialize the PageFileInfo * structure so that _pad, er, version is set to 0. * * A version value of 1 indicates that the size of the structure has * been increased to include two UVA's: produce_uva and consume_uva. * These UVA's are of the mmap()'d queue contents backing files. * * In addition, if when VMX is sending down the * VMCIqueue_pairPageFileInfo structure it gets an error then it will * try again with the _NoHostQP version of the file to see if an older * VMCI kernel module is running.
*/
/* VMCIqueue_pairPageFileInfo */ struct vmci_qp_page_file_info { struct vmci_handle handle;
u64 produce_page_file; /* User VA. */
u64 consume_page_file; /* User VA. */
u64 produce_page_file_size; /* Size of the file name array. */
u64 consume_page_file_size; /* Size of the file name array. */
s32 result;
u32 version; /* Was _pad. */
u64 produce_va; /* User VA of the mapped file. */
u64 consume_va; /* User VA of the mapped file. */
};
/* * struct vmci_qp_page_store describes how the memory of a given queue pair * is backed. When the queue pair is between the host and a guest, the * page store consists of references to the guest pages. On vmkernel, * this is a list of PPNs, and on hosted, it is a user VA where the * queue pair is mapped into the VMX address space.
*/ struct vmci_qp_page_store { /* Reference to pages backing the queue pair. */
u64 pages; /* Length of pageList/virtual address range (in pages). */
u32 len;
};
/* * This data type contains the information about a queue. * There are two queues (hence, queue pairs) per transaction model between a * pair of end points, A & B. One queue is used by end point A to transmit * commands and responses to B. The other queue is used by B to transmit * commands and responses. * * struct vmci_queue_kern_if is a per-OS defined Queue structure. It contains * either a direct pointer to the linear address of the buffer contents or a * pointer to structures which help the OS locate those data pages. See * vmciKernelIf.c for each platform for its definition.
*/ struct vmci_queue { struct vmci_queue_header *q_header; struct vmci_queue_header *saved_header; struct vmci_queue_kern_if *kernel_if;
};
/* * Utility function that checks whether the fields of the page * store contain valid values. * Result: * true if the page store is wellformed. false otherwise.
*/ staticinlinebool
VMCI_QP_PAGESTORE_IS_WELLFORMED(struct vmci_qp_page_store *page_store)
{ return page_store->len >= 2;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.