\hypertarget{vmci_8c_source}{}\doxysection{vmci.\+c}
\label{vmci_8c_source}\index{dev/vmware/vmci/vmci.c@{dev/vmware/vmci/vmci.c}}
\mbox{\hyperlink{vmci_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2018 VMware, Inc.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00004}00004 \textcolor{comment}{ * SPDX-\/License-\/Identifier: (BSD-\/2-\/Clause OR GPL-\/2.0)}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00005}00005 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00006}00006 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00007}00007 \textcolor{comment}{/* Driver for VMware Virtual Machine Communication Interface (VMCI) device. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00008}00008 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00009}00009 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00010}\mbox{\hyperlink{vmci_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00010}} \mbox{\hyperlink{vmci_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00011}00011 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00012}00012 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00013}00013 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00014}00014 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00015}00015 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00016}00016 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00017}00017 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00018}00018 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00019}00019 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00020}00020 \textcolor{preprocessor}{\#include <dev/pci/pcireg.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00021}00021 \textcolor{preprocessor}{\#include <dev/pci/pcivar.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00022}00022 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00023}00023 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00024}00024 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00025}00025 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{vmci_8h}{vmci.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00026}00026 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{vmci__doorbell_8h}{vmci\_doorbell.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00027}00027 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{vmci__driver_8h}{vmci\_driver.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00028}00028 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{vmci__kernel__defs_8h}{vmci\_kernel\_defs.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00029}00029 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{vmci__queue__pair_8h}{vmci\_queue\_pair.h}}"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00031}00031 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_af02738d4ae4e603c06a94b4ed52b80d9}{vmci\_probe}}(device\_t);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00032}00032 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a889b6b29dfb7d71313bd999ae8df64d7}{vmci\_attach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00033}00033 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a0a8acf04c6366dc098e49aa5bf247577}{vmci\_detach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00034}00034 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a735ec9ceafe7705f9a7587230afceb04}{vmci\_shutdown}}(device\_t);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00036}00036 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a8aba1c27d3817f0b9e2e784036f64b72}{vmci\_map\_bars}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00037}00037 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_a29a20dc517d071f8933778cd5e7e48e9}{vmci\_unmap\_bars}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00039}00039 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a7ace5c2b73a7896d0c08527a3fb79c7a}{vmci\_config\_capabilities}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00041}00041 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_aa617a7659387b8fe4bae17d863e65e2f}{vmci\_dma\_malloc\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *, bus\_size\_t,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00042}00042                     bus\_size\_t, \textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00043}00043 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_a701bccb35ecaec0a8e46311ae1a36f05}{vmci\_dma\_free\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00044}00044                     \textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00046}00046 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a8c04a60323910833b356e15ce511a7c2}{vmci\_config\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00047}00047 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_ac735d6a5d057a41d89253c1b053f268b}{vmci\_config\_interrupt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00048}00048 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a17d7ab230e47e119e5b0ea615cf31aaf}{vmci\_check\_intr\_cnt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00049}00049 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_abf00f0554e7b6331c72ecb7b8a190643}{vmci\_allocate\_interrupt\_resources}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00050}00050 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{vmci_8c_a561c88b87c08ce97dffa146bc427f266}{vmci\_setup\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00051}00051 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_a4ed258bef1dc8936d2454df56d8af416}{vmci\_dismantle\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00052}00052 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_a720c40679a6751f12e42db63ca1d638d}{vmci\_interrupt}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00053}00053 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_a7426532e5e4ad24fe688ca9649e6a3c7}{vmci\_interrupt\_bm}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00054}00054 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_a017c3dfd93aa9ffe5be4c55eb99b816f}{dispatch\_datagrams}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00055}00055 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_ab9ac49d7349a1e7e0a9f75853e1a8492}{process\_bitmap}}(\textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00057}00057 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{vmci_8c_aa32fe3d865565363d028d5917d680cda}{vmci\_delayed\_work\_fn\_cb}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} data);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00059}\mbox{\hyperlink{vmci_8c_acd374a388b97518b6da8e1e90c3e947f}{00059}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{vmci_8c_acd374a388b97518b6da8e1e90c3e947f}{vmci\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00060}00060         \textcolor{comment}{/* Device interface. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00061}00061         DEVMETHOD(device\_probe,         \mbox{\hyperlink{vmci_8c_af02738d4ae4e603c06a94b4ed52b80d9}{vmci\_probe}}),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00062}00062         DEVMETHOD(device\_attach,        \mbox{\hyperlink{vmci_8c_a889b6b29dfb7d71313bd999ae8df64d7}{vmci\_attach}}),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00063}00063         DEVMETHOD(device\_detach,        \mbox{\hyperlink{vmci_8c_a0a8acf04c6366dc098e49aa5bf247577}{vmci\_detach}}),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00064}00064         DEVMETHOD(device\_shutdown,      \mbox{\hyperlink{vmci_8c_a735ec9ceafe7705f9a7587230afceb04}{vmci\_shutdown}}),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00066}00066         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00067}00067 \};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00069}\mbox{\hyperlink{vmci_8c_ada69ad0d165bddded1e21ff14b896c51}{00069}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{vmci_8c_ada69ad0d165bddded1e21ff14b896c51}{vmci\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00070}00070         \textcolor{stringliteral}{"{}vmci"{}}, \mbox{\hyperlink{vmci_8c_acd374a388b97518b6da8e1e90c3e947f}{vmci\_methods}}, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__softc}{vmci\_softc}})}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00071}00071 \};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00073}\mbox{\hyperlink{vmci_8c_a0b4865c4a1b7ecc8cc1ab06d0c8f854e}{00073}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{vmci_8c_a0b4865c4a1b7ecc8cc1ab06d0c8f854e}{vmci\_devclass}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00074}\mbox{\hyperlink{vmci_8c_aa1676bee64fe445d1ea9d339e7ca4c18}{00074}} \mbox{\hyperlink{vmci_8c_aa1676bee64fe445d1ea9d339e7ca4c18}{DRIVER\_MODULE}}(vmci, pci, \mbox{\hyperlink{vmci_8c_ada69ad0d165bddded1e21ff14b896c51}{vmci\_driver}}, \mbox{\hyperlink{vmci_8c_a0b4865c4a1b7ecc8cc1ab06d0c8f854e}{vmci\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00075}\mbox{\hyperlink{vmci_8c_ad4477fc2632b21751039285e85eb4f74}{00075}} \mbox{\hyperlink{vmci_8c_ad4477fc2632b21751039285e85eb4f74}{MODULE\_VERSION}}(vmci, \mbox{\hyperlink{vmci_8h_ab036fff2156818134f551c31d5483805}{VMCI\_VERSION}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00076}00076 \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00077}\mbox{\hyperlink{vmci_8c_a593296dde780579566307c0f86863463}{00077}}         uint16\_t \mbox{\hyperlink{vmci_8c_a593296dde780579566307c0f86863463}{vendor}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00078}\mbox{\hyperlink{vmci_8c_a7067c32aa9abbb1c4ccd48e2ae816b25}{00078}}         uint16\_t \mbox{\hyperlink{vmci_8c_a7067c32aa9abbb1c4ccd48e2ae816b25}{device}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00079}\mbox{\hyperlink{vmci_8c_a710bce51374aba96ab04912897666c35}{00079}}         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{vmci_8c_a710bce51374aba96ab04912897666c35}{desc}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00080}00080 \} \mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{vmci\_ids}}[] = \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00081}00081         \{ \mbox{\hyperlink{vmci_8h_a5db2574d9e5995288d9ebd291e478ee4}{VMCI\_VMWARE\_VENDOR\_ID}}, \mbox{\hyperlink{vmci_8h_a7ea25d48f941f5c16b4bad28772553a0}{VMCI\_VMWARE\_DEVICE\_ID}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00082}00082             \textcolor{stringliteral}{"{}VMware Virtual Machine Communication Interface"{}} \},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00083}\mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{00083}} \};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00084}\mbox{\hyperlink{vmci_8c_a2b64aea5e5ffa34c28a2844ad1d07770}{00084}} \mbox{\hyperlink{vmci_8c_a2b64aea5e5ffa34c28a2844ad1d07770}{MODULE\_PNP\_INFO}}(\textcolor{stringliteral}{"{}U16:vendor;U16:device;D:\#"{}}, pci, vmci, \mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{vmci\_ids}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00085}00085     nitems(\mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{vmci\_ids}}));}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00087}\mbox{\hyperlink{vmci_8c_ab5c735670bad8dcfa5a52ae3d0d8d812}{00087}} \mbox{\hyperlink{vmci_8c_ab5c735670bad8dcfa5a52ae3d0d8d812}{MODULE\_DEPEND}}(vmci, pci, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00089}\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{00089}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00091}\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{00091}} \textcolor{preprocessor}{\#define LGPFX   "{}vmci: "{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00092}00092 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00093}00093 \textcolor{comment}{ * Allocate a buffer for incoming datagrams globally to avoid repeated}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00094}00094 \textcolor{comment}{ * allocation in the interrupt handler's atomic context.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00095}00095 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00096}\mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{00096}} \textcolor{keyword}{static} uint8\_t *\mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00097}\mbox{\hyperlink{vmci_8c_a53436a9bf90303bec6388313cc437245}{00097}} \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{vmci_8c_a53436a9bf90303bec6388313cc437245}{data\_buffer\_size}} = \mbox{\hyperlink{vmci__call__defs_8h_a26e6f4de872cd06b68b8166ce14d6c96}{VMCI\_MAX\_DG\_SIZE}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00099}\mbox{\hyperlink{structvmci__delayed__work__info}{00099}} \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__delayed__work__info}{vmci\_delayed\_work\_info}} \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00100}\mbox{\hyperlink{structvmci__delayed__work__info_afc270995f6a7c74c9109b11151739bf3}{00100}}         \mbox{\hyperlink{vmci__kernel__if_8h_ade40e70bb2b8d845587517871ad24777}{vmci\_work\_fn}}        *\mbox{\hyperlink{structvmci__delayed__work__info_afc270995f6a7c74c9109b11151739bf3}{work\_fn}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00101}\mbox{\hyperlink{structvmci__delayed__work__info_afc4882a48a3baec445084fef518e41a5}{00101}}         \textcolor{keywordtype}{void}            *\mbox{\hyperlink{structvmci__delayed__work__info_afc4882a48a3baec445084fef518e41a5}{data}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00102}00102         \mbox{\hyperlink{vmci__kernel__if_8h_aaefddc8009936d8115e0be80974c0512}{vmci\_list\_item}}(\mbox{\hyperlink{structvmci__delayed__work__info}{vmci\_delayed\_work\_info}}) entry;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00103}00103 \};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00105}00105 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00106}00106 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00107}00107 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00108}00108 \textcolor{comment}{ * vmci\_probe -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00109}00109 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00110}00110 \textcolor{comment}{ *     Probe to see if the VMCI device is present.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00111}00111 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00112}00112 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00113}00113 \textcolor{comment}{ *     BUS\_PROBE\_DEFAULT if device exists, ENXIO otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00114}00114 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00115}00115 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00116}00116 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00117}00117 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00118}00118 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00119}00119 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00121}00121 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00122}\mbox{\hyperlink{vmci_8c_af02738d4ae4e603c06a94b4ed52b80d9}{00122}} \mbox{\hyperlink{vmci_8c_af02738d4ae4e603c06a94b4ed52b80d9}{vmci\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00123}00123 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00125}00125         \textcolor{keywordflow}{if} (pci\_get\_vendor(dev) == \mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{vmci\_ids}}[0].\mbox{\hyperlink{vmci_8c_a593296dde780579566307c0f86863463}{vendor}} \&\&}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00126}00126             pci\_get\_device(dev) == \mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{vmci\_ids}}[0].\mbox{\hyperlink{vmci_8c_a7067c32aa9abbb1c4ccd48e2ae816b25}{device}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00127}00127                 device\_set\_desc(dev, \mbox{\hyperlink{vmci_8c_a4872245cee573a0a4bcf79009b1c47ee}{vmci\_ids}}[0].\mbox{\hyperlink{vmci_8c_a710bce51374aba96ab04912897666c35}{desc}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00129}00129                 \textcolor{keywordflow}{return} (BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00130}00130         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00132}00132         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00133}00133 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00135}00135 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00136}00136 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00137}00137 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00138}00138 \textcolor{comment}{ * vmci\_attach -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00139}00139 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00140}00140 \textcolor{comment}{ *     Attach VMCI device to the system after vmci\_probe() has been called and}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00141}00141 \textcolor{comment}{ *     the device has been detected.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00142}00142 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00143}00143 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00144}00144 \textcolor{comment}{ *     0 if success, ENXIO otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00145}00145 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00146}00146 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00147}00147 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00148}00148 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00149}00149 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00150}00150 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00152}00152 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00153}\mbox{\hyperlink{vmci_8c_a889b6b29dfb7d71313bd999ae8df64d7}{00153}} \mbox{\hyperlink{vmci_8c_a889b6b29dfb7d71313bd999ae8df64d7}{vmci\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00154}00154 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00155}00155         \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00156}00156         \textcolor{keywordtype}{int} error, i;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00158}00158         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00159}00159         sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00160}00160         \mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}} = sc;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00161}00161 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00162}00162         \mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00163}00163         sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} = 0;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00164}00164         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{vmci__defs_8h_adac49335e4124461e1dc7bb7e4f46b28}{VMCI\_MAX\_INTRS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00165}00165                 sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[i].\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00166}00166                 sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[i].\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00167}00167         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00169}00169         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a59f96dd23dfee49ab2d4df11eddc9079}{vmci\_interrupt\_dq\_task}}, 0, \mbox{\hyperlink{vmci_8c_a017c3dfd93aa9ffe5be4c55eb99b816f}{dispatch\_datagrams}}, sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00170}00170         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a6d6bf4d4411e6bd49556aec11abf8dce}{vmci\_interrupt\_bm\_task}}, 0, \mbox{\hyperlink{vmci_8c_ab9ac49d7349a1e7e0a9f75853e1a8492}{process\_bitmap}}, sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00172}00172         TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a72e1929ef0940f6a413ed5c345907d00}{vmci\_delayed\_work\_task}}, 0, \mbox{\hyperlink{vmci_8c_aa32fe3d865565363d028d5917d680cda}{vmci\_delayed\_work\_fn\_cb}}, sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00174}00174         pci\_enable\_busmaster(dev);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00176}00176         mtx\_init(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a03425d50c367800e01888bbc5666049b}{vmci\_spinlock}}, \textcolor{stringliteral}{"{}VMCI Spinlock"{}}, NULL, MTX\_SPIN);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00177}00177         mtx\_init(\&sc-\/>\mbox{\hyperlink{structvmci__softc_aaaa0072b3701cc4b394fec4671d7b42c}{vmci\_delayed\_work\_lock}}, \textcolor{stringliteral}{"{}VMCI Delayed Work Lock"{}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00178}00178             NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00180}00180         error = \mbox{\hyperlink{vmci_8c_a8aba1c27d3817f0b9e2e784036f64b72}{vmci\_map\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00181}00181         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00182}00182                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Failed to map PCI BARs.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00183}00183                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00184}00184         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00186}00186         error = \mbox{\hyperlink{vmci_8c_a7ace5c2b73a7896d0c08527a3fb79c7a}{vmci\_config\_capabilities}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00187}00187         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00188}00188                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Failed to configure capabilities.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00189}00189                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00190}00190         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00191}00191 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00192}00192         \mbox{\hyperlink{vmci__kernel__if_8h_ae0f755fbb601b1324846583240334fe9}{vmci\_list\_init}}(\&sc-\/>vmci\_delayed\_work\_infos);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00194}00194         \mbox{\hyperlink{vmci__driver_8c_a814e7a1d21c6d52d2cade5d3c13c3f8a}{vmci\_components\_init}}();}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00195}00195         \mbox{\hyperlink{vmci__driver_8c_aa4d83f7787406802cc2bc8bcb1045629}{vmci\_util\_init}}();}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00196}00196         error = \mbox{\hyperlink{vmci__queue__pair_8c_ada6612e9a02903851f01ee5efc9a3a07}{vmci\_qp\_guest\_endpoints\_init}}();}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00197}00197         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00198}00198                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}vmci\_qp\_guest\_endpoints\_init failed.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00199}00199                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00200}00200         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00202}00202         error = \mbox{\hyperlink{vmci_8c_a8c04a60323910833b356e15ce511a7c2}{vmci\_config\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00203}00203         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00204}00204                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Failed to enable interrupts.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00206}00206 fail:}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00207}00207         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00208}00208                 \mbox{\hyperlink{vmci_8c_a0a8acf04c6366dc098e49aa5bf247577}{vmci\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00209}00209                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00212}00212         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00213}00213 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00215}00215 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00216}00216 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00217}00217 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00218}00218 \textcolor{comment}{ * vmci\_detach -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00219}00219 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00220}00220 \textcolor{comment}{ *     Detach the VMCI device.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00221}00221 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00222}00222 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00223}00223 \textcolor{comment}{ *     0}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00224}00224 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00225}00225 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00226}00226 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00227}00227 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00228}00228 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00229}00229 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00230}00230 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00231}00231 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00232}\mbox{\hyperlink{vmci_8c_a0a8acf04c6366dc098e49aa5bf247577}{00232}} \mbox{\hyperlink{vmci_8c_a0a8acf04c6366dc098e49aa5bf247577}{vmci\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00233}00233 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00234}00234         \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00236}00236         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00238}00238         \mbox{\hyperlink{vmci__queue__pair_8c_a51e9c995b05f4501c7650f0abe63b57b}{vmci\_qp\_guest\_endpoints\_exit}}();}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00239}00239         \mbox{\hyperlink{vmci__driver_8c_a1d050f08dd26dafa525fb633cbf116b1}{vmci\_util\_exit}}();}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00241}00241         \mbox{\hyperlink{vmci_8c_a4ed258bef1dc8936d2454df56d8af416}{vmci\_dismantle\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00243}00243         \mbox{\hyperlink{vmci__driver_8c_ab0e4f326a9b26f59d3d556a8de59de8d}{vmci\_components\_cleanup}}();}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00245}00245         \textcolor{keywordflow}{if} mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a03425d50c367800e01888bbc5666049b}{vmci\_spinlock}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00246}00246                 taskqueue\_drain(taskqueue\_thread, \&sc-\/>\mbox{\hyperlink{structvmci__softc_a72e1929ef0940f6a413ed5c345907d00}{vmci\_delayed\_work\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00247}00247                 mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structvmci__softc_aaaa0072b3701cc4b394fec4671d7b42c}{vmci\_delayed\_work\_lock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00248}00248         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00250}00250         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}} != NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00251}00251                 bus\_space\_write\_4(sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00252}00252                     \mbox{\hyperlink{vmci__defs_8h_a6dab46e47b628ea08395986f15302665}{VMCI\_CONTROL\_ADDR}}, \mbox{\hyperlink{vmci__defs_8h_aa9aa8404134fe0aa348df35647fdc057}{VMCI\_CONTROL\_RESET}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00254}00254         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}}.\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}} != NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00255}00255                 \mbox{\hyperlink{vmci_8c_a699bef8dbaff1248a730fcc752e2a91e}{vmci\_dma\_free}}(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00257}00257         \mbox{\hyperlink{vmci_8c_a29a20dc517d071f8933778cd5e7e48e9}{vmci\_unmap\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00259}00259         \textcolor{keywordflow}{if} mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a03425d50c367800e01888bbc5666049b}{vmci\_spinlock}})}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00260}00260                 mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structvmci__softc_a03425d50c367800e01888bbc5666049b}{vmci\_spinlock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00262}00262         pci\_disable\_busmaster(dev);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00264}00264         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00265}00265 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00267}00267 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00268}00268 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00269}00269 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00270}00270 \textcolor{comment}{ * vmci\_shutdown -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00271}00271 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00272}00272 \textcolor{comment}{ *     This function is called during system shutdown. We don't do anything.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00273}00273 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00274}00274 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00275}00275 \textcolor{comment}{ *     0}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00276}00276 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00277}00277 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00278}00278 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00279}00279 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00280}00280 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00281}00281 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00283}00283 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00284}\mbox{\hyperlink{vmci_8c_a735ec9ceafe7705f9a7587230afceb04}{00284}} \mbox{\hyperlink{vmci_8c_a735ec9ceafe7705f9a7587230afceb04}{vmci\_shutdown}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00285}00285 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00287}00287         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00288}00288 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00290}00290 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00291}00291 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00292}00292 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00293}00293 \textcolor{comment}{ * vmci\_map\_bars -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00294}00294 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00295}00295 \textcolor{comment}{ *     Maps the PCI I/O and MMIO BARs.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00296}00296 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00297}00297 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00298}00298 \textcolor{comment}{ *     0 on success, ENXIO otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00299}00299 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00300}00300 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00301}00301 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00302}00302 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00303}00303 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00304}00304 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00306}00306 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00307}\mbox{\hyperlink{vmci_8c_a8aba1c27d3817f0b9e2e784036f64b72}{00307}} \mbox{\hyperlink{vmci_8c_a8aba1c27d3817f0b9e2e784036f64b72}{vmci\_map\_bars}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00308}00308 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00309}00309         \textcolor{keywordtype}{int} rid;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00310}00310 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00311}00311         \textcolor{comment}{/* Map the PCI I/O BAR: BAR0 */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00312}00312         rid = PCIR\_BAR(0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00313}00313         sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}} = bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, SYS\_RES\_IOPORT,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00314}00314             \&rid, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00315}00315         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00316}00316                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Could not map: BAR0\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00317}00317                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00318}00318         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00320}00320         sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}} = rman\_get\_bustag(sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00321}00321         sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}} = rman\_get\_bushandle(sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00322}00322         sc-\/>\mbox{\hyperlink{structvmci__softc_a294463887d6eea41d430d507451052de}{vmci\_ioaddr}} = rman\_get\_start(sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00324}00324         \textcolor{comment}{/* Map the PCI MMIO BAR: BAR1 */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00325}00325         rid = PCIR\_BAR(1);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00326}00326         sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}} = bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00327}00327             \&rid, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00328}00328         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00329}00329                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Could not map: BAR1\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00330}00330                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00331}00331         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00333}00333         sc-\/>\mbox{\hyperlink{structvmci__softc_ae86764d6b97ee08825e93d1e47a348f7}{vmci\_iot1}} = rman\_get\_bustag(sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00334}00334         sc-\/>\mbox{\hyperlink{structvmci__softc_a93f8c7829147242501656324e0436359}{vmci\_ioh1}} = rman\_get\_bushandle(sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00335}00335 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00336}00336         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00337}00337 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00339}00339 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00340}00340 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00341}00341 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00342}00342 \textcolor{comment}{ * vmci\_unmap\_bars -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00343}00343 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00344}00344 \textcolor{comment}{ *     Unmaps the VMCI PCI I/O and MMIO BARs.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00345}00345 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00346}00346 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00347}00347 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00348}00348 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00349}00349 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00350}00350 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00351}00351 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00352}00352 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00353}00353 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00355}00355 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00356}\mbox{\hyperlink{vmci_8c_a29a20dc517d071f8933778cd5e7e48e9}{00356}} \mbox{\hyperlink{vmci_8c_a29a20dc517d071f8933778cd5e7e48e9}{vmci\_unmap\_bars}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00357}00357 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00358}00358         \textcolor{keywordtype}{int} rid;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00360}00360         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00361}00361                 rid = PCIR\_BAR(0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00362}00362                 bus\_release\_resource(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, SYS\_RES\_IOPORT, rid,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00363}00363                     sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00364}00364                 sc-\/>\mbox{\hyperlink{structvmci__softc_ac1b32617609edafc3af8d9dedfc1dab5}{vmci\_res0}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00365}00365         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00367}00367         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00368}00368                 rid = PCIR\_BAR(1);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00369}00369                 bus\_release\_resource(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, SYS\_RES\_MEMORY, rid,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00370}00370                     sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00371}00371                 sc-\/>\mbox{\hyperlink{structvmci__softc_a5173bea4f8407895240fc269399e7ff8}{vmci\_res1}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00372}00372         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00373}00373 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00375}00375 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00376}00376 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00377}00377 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00378}00378 \textcolor{comment}{ * vmci\_config\_capabilities -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00379}00379 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00380}00380 \textcolor{comment}{ *     Check the VMCI device capabilities and configure the device accordingly.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00381}00381 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00382}00382 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00383}00383 \textcolor{comment}{ *     0 if success, ENODEV otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00384}00384 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00385}00385 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00386}00386 \textcolor{comment}{ *     Device capabilities are enabled.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00387}00387 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00388}00388 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00389}00389 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00390}00390 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00391}00391 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00392}\mbox{\hyperlink{vmci_8c_a7ace5c2b73a7896d0c08527a3fb79c7a}{00392}} \mbox{\hyperlink{vmci_8c_a7ace5c2b73a7896d0c08527a3fb79c7a}{vmci\_config\_capabilities}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00393}00393 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00394}00394         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} bitmap\_PPN;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00395}00395         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00397}00397         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00398}00398 \textcolor{comment}{         * Verify that the VMCI device supports the capabilities that we}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00399}00399 \textcolor{comment}{         * need. Datagrams are necessary and notifications will be used}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00400}00400 \textcolor{comment}{         * if the device supports it.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00401}00401 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00402}00402         sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} = bus\_space\_read\_4(sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00403}00403             \mbox{\hyperlink{vmci__defs_8h_abc9ea2bd96a29bf5caeb6845e61d1692}{VMCI\_CAPS\_ADDR}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00405}00405         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} \& \mbox{\hyperlink{vmci__defs_8h_a70a71cb31f68f8c142532889347c352c}{VMCI\_CAPS\_DATAGRAM}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00406}00406                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}VMCI device does not support "{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00407}00407                     \textcolor{stringliteral}{"{}datagrams.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00408}00408                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00409}00409         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00411}00411         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} \& \mbox{\hyperlink{vmci__defs_8h_aa48993a3c5d648146ae49e072f49d93e}{VMCI\_CAPS\_NOTIFICATIONS}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00412}00412                 sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} = \mbox{\hyperlink{vmci__defs_8h_a70a71cb31f68f8c142532889347c352c}{VMCI\_CAPS\_DATAGRAM}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00413}00413                 error = \mbox{\hyperlink{vmci_8c_aedc73d83d7b1dbea354ac98383740d08}{vmci\_dma\_malloc}}(PAGE\_SIZE, 1,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00414}00414                     \&sc-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00415}00415                 \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00416}00416                         \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Failed to alloc memory for "{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00417}00417                             \textcolor{stringliteral}{"{}notification bitmap.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00418}00418                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00419}00419                         memset(sc-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}}.\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}}, 0,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00420}00420                             PAGE\_SIZE);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00421}00421                         sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} |= \mbox{\hyperlink{vmci__defs_8h_aa48993a3c5d648146ae49e072f49d93e}{VMCI\_CAPS\_NOTIFICATIONS}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00422}00422                 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00423}00423         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00424}00424                 sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} = \mbox{\hyperlink{vmci__defs_8h_a70a71cb31f68f8c142532889347c352c}{VMCI\_CAPS\_DATAGRAM}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00426}00426         \textcolor{comment}{/* Let the host know which capabilities we intend to use. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00427}00427         bus\_space\_write\_4(sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00428}00428             \mbox{\hyperlink{vmci__defs_8h_abc9ea2bd96a29bf5caeb6845e61d1692}{VMCI\_CAPS\_ADDR}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00429}00429 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00430}00430         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00431}00431 \textcolor{comment}{         * Register notification bitmap with device if that capability is}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00432}00432 \textcolor{comment}{         * used.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00433}00433 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00434}00434         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} \& \mbox{\hyperlink{vmci__defs_8h_aa48993a3c5d648146ae49e072f49d93e}{VMCI\_CAPS\_NOTIFICATIONS}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00435}00435                 bitmap\_PPN =}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00436}00436                     sc-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}}.\mbox{\hyperlink{structvmci__dma__alloc_a20cd587b3bbebc2c78df69f15a05c665}{dma\_paddr}} >> PAGE\_SHIFT;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00437}00437                 \mbox{\hyperlink{vmci__doorbell_8c_a1c73cb5e2d8e9cea3bfeed15794fbe43}{vmci\_register\_notification\_bitmap}}(bitmap\_PPN);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00438}00438         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00440}00440         \textcolor{comment}{/* Check host capabilities. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00441}00441         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{vmci__driver_8c_a792a6cfb9acfb7c586a213c3a8e4a2f4}{vmci\_check\_host\_capabilities}}())}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00442}00442                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00444}00444         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00445}00445 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00447}00447 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00448}00448 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00449}00449 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00450}00450 \textcolor{comment}{ * vmci\_dmamap\_cb -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00451}00451 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00452}00452 \textcolor{comment}{ *     Callback to receive mapping information resulting from the load of a}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00453}00453 \textcolor{comment}{ *     bus\_dmamap\_t via bus\_dmamap\_load()}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00454}00454 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00455}00455 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00456}00456 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00457}00457 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00458}00458 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00459}00459 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00460}00460 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00461}00461 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00462}00462 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00463}00463 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00464}00464 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00465}\mbox{\hyperlink{vmci_8c_a4270359a63efda8231789e1cea6230b8}{00465}} \mbox{\hyperlink{vmci_8c_a4270359a63efda8231789e1cea6230b8}{vmci\_dmamap\_cb}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nseg, \textcolor{keywordtype}{int} error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00466}00466 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00467}00467         bus\_addr\_t *baddr = arg;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00469}00469         \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00470}00470                 *baddr = segs-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00471}00471 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00473}00473 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00474}00474 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00475}00475 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00476}00476 \textcolor{comment}{ * vmci\_dma\_malloc\_int -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00477}00477 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00478}00478 \textcolor{comment}{ *     Internal function that allocates DMA memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00479}00479 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00480}00480 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00481}00481 \textcolor{comment}{ *     0 if success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00482}00482 \textcolor{comment}{ *     ENOMEM if insufficient memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00483}00483 \textcolor{comment}{ *     EINPROGRESS if mapping is deferred.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00484}00484 \textcolor{comment}{ *     EINVAL if the request was invalid.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00485}00485 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00486}00486 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00487}00487 \textcolor{comment}{ *     DMA memory is allocated.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00488}00488 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00489}00489 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00490}00490 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00491}00491 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00492}00492 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00493}\mbox{\hyperlink{vmci_8c_aa617a7659387b8fe4bae17d863e65e2f}{00493}} \mbox{\hyperlink{vmci_8c_aa617a7659387b8fe4bae17d863e65e2f}{vmci\_dma\_malloc\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc, bus\_size\_t size, bus\_size\_t align,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00494}00494     \textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}} *dma)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00495}00495 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00496}00496         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00498}00498         bzero(dma, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}}));}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00499}00499 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00500}00500         error = bus\_dma\_tag\_create(bus\_get\_dma\_tag(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00501}00501             align, 0,           \textcolor{comment}{/* alignment, bounds */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00502}00502             BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* lowaddr */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00503}00503             BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* highaddr */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00504}00504             NULL, NULL,         \textcolor{comment}{/* filter, filterarg */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00505}00505             size,               \textcolor{comment}{/* maxsize */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00506}00506             1,                  \textcolor{comment}{/* nsegments */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00507}00507             size,               \textcolor{comment}{/* maxsegsize */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00508}00508             BUS\_DMA\_ALLOCNOW,   \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00509}00509             NULL,               \textcolor{comment}{/* lockfunc */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00510}00510             NULL,               \textcolor{comment}{/* lockfuncarg */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00511}00511             \&dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00512}00512         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00513}00513                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}bus\_dma\_tag\_create failed: \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00514}00514                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00515}00515         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00517}00517         error = bus\_dmamem\_alloc(dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}}, (\textcolor{keywordtype}{void} **)\&dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00518}00518             BUS\_DMA\_ZERO | BUS\_DMA\_NOWAIT, \&dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a145d4545f83e17fe23281ba446442cb4}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00519}00519         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00520}00520                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}bus\_dmamem\_alloc failed: \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00521}00521                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00522}00522         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00524}00524         error = bus\_dmamap\_load(dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}}, dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a145d4545f83e17fe23281ba446442cb4}{dma\_map}}, dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00525}00525             size, \mbox{\hyperlink{vmci_8c_a4270359a63efda8231789e1cea6230b8}{vmci\_dmamap\_cb}}, \&dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a20cd587b3bbebc2c78df69f15a05c665}{dma\_paddr}}, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00526}00526         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00527}00527                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}bus\_dmamap\_load failed: \%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00528}00528                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00529}00529         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00531}00531         dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a8ff3960422a1ec20f921d016f7ede41a}{dma\_size}} = size;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00532}00532 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00533}00533 fail:}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00534}00534         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00535}00535                 \mbox{\hyperlink{vmci_8c_a699bef8dbaff1248a730fcc752e2a91e}{vmci\_dma\_free}}(dma);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00536}00536 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00537}00537         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00538}00538 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00540}00540 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00541}00541 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00542}00542 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00543}00543 \textcolor{comment}{ * vmci\_dma\_malloc -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00544}00544 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00545}00545 \textcolor{comment}{ *     This function is a wrapper around vmci\_dma\_malloc\_int for callers}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00546}00546 \textcolor{comment}{ *     outside of this module. Since we only support a single VMCI device, this}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00547}00547 \textcolor{comment}{ *     wrapper provides access to the device softc structure.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00548}00548 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00549}00549 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00550}00550 \textcolor{comment}{ *     0 if success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00551}00551 \textcolor{comment}{ *     ENOMEM if insufficient memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00552}00552 \textcolor{comment}{ *     EINPROGRESS if mapping is deferred.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00553}00553 \textcolor{comment}{ *     EINVAL if the request was invalid.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00554}00554 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00555}00555 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00556}00556 \textcolor{comment}{ *     DMA memory is allocated.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00557}00557 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00558}00558 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00559}00559 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00561}00561 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00562}\mbox{\hyperlink{vmci_8c_aedc73d83d7b1dbea354ac98383740d08}{00562}} \mbox{\hyperlink{vmci_8c_aedc73d83d7b1dbea354ac98383740d08}{vmci\_dma\_malloc}}(bus\_size\_t size, bus\_size\_t align, \textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}} *dma)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00563}00563 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00564}00564 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00565}00565         \textcolor{keywordflow}{return} (\mbox{\hyperlink{vmci_8c_aa617a7659387b8fe4bae17d863e65e2f}{vmci\_dma\_malloc\_int}}(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}, size, align, dma));}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00566}00566 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00567}00567 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00568}00568 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00569}00569 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00570}00570 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00571}00571 \textcolor{comment}{ * vmci\_dma\_free\_int -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00572}00572 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00573}00573 \textcolor{comment}{ *     Internal function that frees DMA memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00574}00574 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00575}00575 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00576}00576 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00577}00577 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00578}00578 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00579}00579 \textcolor{comment}{ *     Frees DMA memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00580}00580 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00581}00581 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00582}00582 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00583}00583 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00584}00584 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00585}\mbox{\hyperlink{vmci_8c_a701bccb35ecaec0a8e46311ae1a36f05}{00585}} \mbox{\hyperlink{vmci_8c_a701bccb35ecaec0a8e46311ae1a36f05}{vmci\_dma\_free\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}} *dma)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00586}00586 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00587}00587 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00588}00588         \textcolor{keywordflow}{if} (dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00589}00589                 \textcolor{keywordflow}{if} (dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a20cd587b3bbebc2c78df69f15a05c665}{dma\_paddr}} != 0) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00590}00590                         bus\_dmamap\_sync(dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}}, dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a145d4545f83e17fe23281ba446442cb4}{dma\_map}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00591}00591                             BUS\_DMASYNC\_POSTREAD | BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00592}00592                         bus\_dmamap\_unload(dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}}, dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a145d4545f83e17fe23281ba446442cb4}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00593}00593                 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00595}00595                 \textcolor{keywordflow}{if} (dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}} != NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00596}00596                         bus\_dmamem\_free(dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}}, dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00597}00597                             dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_a145d4545f83e17fe23281ba446442cb4}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00599}00599                 bus\_dma\_tag\_destroy(dma-\/>\mbox{\hyperlink{structvmci__dma__alloc_ad054a993fac03f779f579d9e4c3952ec}{dma\_tag}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00600}00600         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00601}00601         bzero(dma, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}}));}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00602}00602 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00604}00604 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00605}00605 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00606}00606 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00607}00607 \textcolor{comment}{ * vmci\_dma\_free -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00608}00608 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00609}00609 \textcolor{comment}{ *     This function is a wrapper around vmci\_dma\_free\_int for callers outside}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00610}00610 \textcolor{comment}{ *     of this module. Since we only support a single VMCI device, this wrapper}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00611}00611 \textcolor{comment}{ *     provides access to the device softc structure.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00612}00612 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00613}00613 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00614}00614 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00615}00615 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00616}00616 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00617}00617 \textcolor{comment}{ *     Frees DMA memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00618}00618 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00619}00619 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00620}00620 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00621}00621 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00622}00622 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00623}\mbox{\hyperlink{vmci_8c_a699bef8dbaff1248a730fcc752e2a91e}{00623}} \mbox{\hyperlink{vmci_8c_a699bef8dbaff1248a730fcc752e2a91e}{vmci\_dma\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__dma__alloc}{vmci\_dma\_alloc}} *dma)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00624}00624 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00625}00625 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00626}00626         \mbox{\hyperlink{vmci_8c_a701bccb35ecaec0a8e46311ae1a36f05}{vmci\_dma\_free\_int}}(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}, dma);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00627}00627 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00628}00628 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00629}00629 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00630}00630 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00631}00631 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00632}00632 \textcolor{comment}{ * vmci\_config\_interrupts -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00633}00633 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00634}00634 \textcolor{comment}{ *     Configures and enables interrupts. Try to configure MSI-\/X. If this fails,}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00635}00635 \textcolor{comment}{ *     try to configure MSI. If even this fails, try legacy interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00636}00636 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00637}00637 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00638}00638 \textcolor{comment}{ *     0 if success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00639}00639 \textcolor{comment}{ *     ENOMEM if insufficient memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00640}00640 \textcolor{comment}{ *     ENODEV if the device doesn't support interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00641}00641 \textcolor{comment}{ *     ENXIO if the device configuration failed.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00642}00642 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00643}00643 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00644}00644 \textcolor{comment}{ *     Interrupts get enabled if successful.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00645}00645 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00646}00646 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00647}00647 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00648}00648 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00649}00649 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00650}\mbox{\hyperlink{vmci_8c_a8c04a60323910833b356e15ce511a7c2}{00650}} \mbox{\hyperlink{vmci_8c_a8c04a60323910833b356e15ce511a7c2}{vmci\_config\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00651}00651 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00652}00652         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00653}00653 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00654}00654         \mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}} = malloc(\mbox{\hyperlink{vmci_8c_a53436a9bf90303bec6388313cc437245}{data\_buffer\_size}}, M\_DEVBUF, M\_ZERO | M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00655}00655         \textcolor{keywordflow}{if} (\mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}} == NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00656}00656                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00657}00657 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00658}00658         sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} = \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a44875a8575bc7458306308dccfc33b0c}{VMCI\_INTR\_TYPE\_MSIX}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00659}00659         error = \mbox{\hyperlink{vmci_8c_ac735d6a5d057a41d89253c1b053f268b}{vmci\_config\_interrupt}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00660}00660         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00661}00661                 sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} = \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98ab13f8177df9b25a98c498a191158e8c8}{VMCI\_INTR\_TYPE\_MSI}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00662}00662                 error = \mbox{\hyperlink{vmci_8c_ac735d6a5d057a41d89253c1b053f268b}{vmci\_config\_interrupt}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00663}00663         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00664}00664         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00665}00665                 sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} = \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a36a5c222893b7b43c80a4b6d1fa4e71c}{VMCI\_INTR\_TYPE\_INTX}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00666}00666                 error = \mbox{\hyperlink{vmci_8c_ac735d6a5d057a41d89253c1b053f268b}{vmci\_config\_interrupt}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00667}00667         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00668}00668         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00669}00669                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00670}00670 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00671}00671         \textcolor{comment}{/* Enable specific interrupt bits. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00672}00672         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_a46da4840b04ef9066d4af0412c6f6e93}{capabilities}} \& \mbox{\hyperlink{vmci__defs_8h_aa48993a3c5d648146ae49e072f49d93e}{VMCI\_CAPS\_NOTIFICATIONS}})}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00673}00673                 bus\_space\_write\_4(sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00674}00674                     \mbox{\hyperlink{vmci__defs_8h_aae1eb34865f0ccc4d5d993f300ed1e9e}{VMCI\_IMR\_ADDR}}, \mbox{\hyperlink{vmci__defs_8h_a6b3c255dfdd23b99440b37f240d65c1e}{VMCI\_IMR\_DATAGRAM}} | \mbox{\hyperlink{vmci__defs_8h_a4c1236a730cb3db18a9f711e3e764d34}{VMCI\_IMR\_NOTIFICATION}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00675}00675         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00676}00676                 bus\_space\_write\_4(sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00677}00677                     \mbox{\hyperlink{vmci__defs_8h_aae1eb34865f0ccc4d5d993f300ed1e9e}{VMCI\_IMR\_ADDR}}, \mbox{\hyperlink{vmci__defs_8h_a6b3c255dfdd23b99440b37f240d65c1e}{VMCI\_IMR\_DATAGRAM}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00678}00678 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00679}00679         \textcolor{comment}{/* Enable interrupts. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00680}00680         bus\_space\_write\_4(sc-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}}, sc-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00681}00681             \mbox{\hyperlink{vmci__defs_8h_a6dab46e47b628ea08395986f15302665}{VMCI\_CONTROL\_ADDR}}, \mbox{\hyperlink{vmci__defs_8h_a637b11b5a5ac7e9d238075c7f0905296}{VMCI\_CONTROL\_INT\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00683}00683         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00684}00684 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00686}00686 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00687}00687 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00688}00688 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00689}00689 \textcolor{comment}{ * vmci\_config\_interrupt -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00690}00690 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00691}00691 \textcolor{comment}{ *     Check the number of interrupts supported, allocate resources and setup}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00692}00692 \textcolor{comment}{ *     interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00693}00693 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00694}00694 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00695}00695 \textcolor{comment}{ *     0 if success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00696}00696 \textcolor{comment}{ *     ENOMEM if insufficient memory.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00697}00697 \textcolor{comment}{ *     ENODEV if the device doesn't support interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00698}00698 \textcolor{comment}{ *     ENXIO if the device configuration failed.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00699}00699 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00700}00700 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00701}00701 \textcolor{comment}{ *     Resources get allocated and interrupts get setup (but not enabled) if}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00702}00702 \textcolor{comment}{ *     successful.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00703}00703 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00704}00704 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00705}00705 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00706}00706 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00707}00707 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00708}\mbox{\hyperlink{vmci_8c_ac735d6a5d057a41d89253c1b053f268b}{00708}} \mbox{\hyperlink{vmci_8c_ac735d6a5d057a41d89253c1b053f268b}{vmci\_config\_interrupt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00709}00709 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00710}00710         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00711}00711 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00712}00712         error = \mbox{\hyperlink{vmci_8c_a17d7ab230e47e119e5b0ea615cf31aaf}{vmci\_check\_intr\_cnt}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00713}00713         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00714}00714                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00715}00715 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00716}00716         error = \mbox{\hyperlink{vmci_8c_abf00f0554e7b6331c72ecb7b8a190643}{vmci\_allocate\_interrupt\_resources}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00717}00717         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00718}00718                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00720}00720         error = \mbox{\hyperlink{vmci_8c_a561c88b87c08ce97dffa146bc427f266}{vmci\_setup\_interrupts}}(sc);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00721}00721         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00722}00722                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00723}00723 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00724}00724         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00725}00725 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00727}00727 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00728}00728 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00729}00729 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00730}00730 \textcolor{comment}{ * vmci\_check\_intr\_cnt -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00731}00731 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00732}00732 \textcolor{comment}{ *     Check the number of interrupts supported by the device and ask PCI bus}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00733}00733 \textcolor{comment}{ *     to allocate appropriate number of interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00734}00734 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00735}00735 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00736}00736 \textcolor{comment}{ *     0 if success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00737}00737 \textcolor{comment}{ *     ENODEV if the device doesn't support any interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00738}00738 \textcolor{comment}{ *     ENXIO if the device configuration failed.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00739}00739 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00740}00740 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00741}00741 \textcolor{comment}{ *     Resources get allocated on success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00742}00742 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00743}00743 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00744}00744 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00746}00746 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00747}\mbox{\hyperlink{vmci_8c_a17d7ab230e47e119e5b0ea615cf31aaf}{00747}} \mbox{\hyperlink{vmci_8c_a17d7ab230e47e119e5b0ea615cf31aaf}{vmci\_check\_intr\_cnt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00748}00748 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00749}00749 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00750}00750         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} == \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a36a5c222893b7b43c80a4b6d1fa4e71c}{VMCI\_INTR\_TYPE\_INTX}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00751}00751                 sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} = 1;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00752}00752                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00753}00753         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00754}00754 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00755}00755         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00756}00756 \textcolor{comment}{         * Make sure that the device supports the required number of MSI/MSI-\/X}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00757}00757 \textcolor{comment}{         * messages. We try for 2 MSI-\/X messages but 1 is good too. We need at}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00758}00758 \textcolor{comment}{         * least 1 MSI message.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00759}00759 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00760}00760         sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} = (sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} == \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a44875a8575bc7458306308dccfc33b0c}{VMCI\_INTR\_TYPE\_MSIX}}) ?}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00761}00761             pci\_msix\_count(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}) : pci\_msi\_count(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00763}00763         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00764}00764                 \mbox{\hyperlink{vmci__driver_8h_a96c2539184ecd77ae6dd6cb868493c94}{VMCI\_LOG\_ERROR}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Device does not support any interrupt"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00765}00765                     \textcolor{stringliteral}{"{} messages"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00766}00766                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00767}00767         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00769}00769         sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} = (sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} == \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a44875a8575bc7458306308dccfc33b0c}{VMCI\_INTR\_TYPE\_MSIX}}) ?}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00770}00770             \mbox{\hyperlink{vmci__defs_8h_adac49335e4124461e1dc7bb7e4f46b28}{VMCI\_MAX\_INTRS}} : 1;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00771}00771         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} == \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a44875a8575bc7458306308dccfc33b0c}{VMCI\_INTR\_TYPE\_MSIX}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00772}00772                 \textcolor{keywordflow}{if} (pci\_alloc\_msix(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, \&sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}}))}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00773}00773                         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00774}00774         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} == \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98ab13f8177df9b25a98c498a191158e8c8}{VMCI\_INTR\_TYPE\_MSI}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00775}00775                 \textcolor{keywordflow}{if} (pci\_alloc\_msi(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, \&sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}}))}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00776}00776                         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00777}00777         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00778}00778 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00779}00779         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00780}00780 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00782}00782 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00783}00783 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00784}00784 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00785}00785 \textcolor{comment}{ * vmci\_allocate\_interrupt\_resources -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00786}00786 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00787}00787 \textcolor{comment}{ *     Allocate resources necessary for interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00788}00788 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00789}00789 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00790}00790 \textcolor{comment}{ *     0 if success, ENXIO otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00791}00791 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00792}00792 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00793}00793 \textcolor{comment}{ *     Resources get allocated on success.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00794}00794 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00795}00795 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00796}00796 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00797}00797 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00798}00798 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00799}\mbox{\hyperlink{vmci_8c_abf00f0554e7b6331c72ecb7b8a190643}{00799}} \mbox{\hyperlink{vmci_8c_abf00f0554e7b6331c72ecb7b8a190643}{vmci\_allocate\_interrupt\_resources}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00800}00800 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00801}00801         \textcolor{keyword}{struct }resource *irq;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00802}00802         \textcolor{keywordtype}{int} flags, i, rid;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00804}00804         flags = RF\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00805}00805         flags |= (sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} == 1) ? RF\_SHAREABLE : 0;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00806}00806         rid = (sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} == \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a36a5c222893b7b43c80a4b6d1fa4e71c}{VMCI\_INTR\_TYPE\_INTX}}) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00807}00807 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00808}00808         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}}; i++, rid++) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00809}00809                 irq = bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, SYS\_RES\_IRQ, \&rid,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00810}00810                     flags);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00811}00811                 \textcolor{keywordflow}{if} (irq == NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00812}00812                         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00813}00813                 sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[i].\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}} = irq;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00814}00814                 sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[i].\mbox{\hyperlink{structvmci__interrupt_ad0e03b362e2438193ce0764468efa217}{vmci\_rid}} = rid;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00815}00815         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00817}00817         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00818}00818 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00820}00820 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00821}00821 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00822}00822 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00823}00823 \textcolor{comment}{ * vmci\_setup\_interrupts -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00824}00824 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00825}00825 \textcolor{comment}{ *     Sets up the interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00826}00826 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00827}00827 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00828}00828 \textcolor{comment}{ *     0 if success, appropriate error code from bus\_setup\_intr otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00829}00829 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00830}00830 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00831}00831 \textcolor{comment}{ *     Interrupt handler gets attached.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00832}00832 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00833}00833 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00834}00834 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00835}00835 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00836}00836 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00837}\mbox{\hyperlink{vmci_8c_a561c88b87c08ce97dffa146bc427f266}{00837}} \mbox{\hyperlink{vmci_8c_a561c88b87c08ce97dffa146bc427f266}{vmci\_setup\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00838}00838 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00839}00839         \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__interrupt}{vmci\_interrupt}} *intr;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00840}00840         \textcolor{keywordtype}{int} error, flags;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00841}00841 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00842}00842         flags = INTR\_TYPE\_NET | INTR\_MPSAFE;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00843}00843         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} > 1)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00844}00844                 flags |= INTR\_EXCL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00846}00846         intr = \&sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[0];}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00847}00847         error = bus\_setup\_intr(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}}, flags, NULL,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00848}00848             \mbox{\hyperlink{structvmci__interrupt}{vmci\_interrupt}}, NULL, \&intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00849}00849         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00850}00850                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00851}00851 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00852}00852         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} == 2) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00853}00853                 bus\_describe\_intr(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00854}00854                     intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}}, \textcolor{stringliteral}{"{}dg"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00855}00855                 intr = \&sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[1];}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00856}00856                 error = bus\_setup\_intr(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}}, flags,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00857}00857                     NULL, \mbox{\hyperlink{vmci_8c_a7426532e5e4ad24fe688ca9649e6a3c7}{vmci\_interrupt\_bm}}, NULL, \&intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00858}00858                 \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00859}00859                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00860}00860                 bus\_describe\_intr(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00861}00861                     intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}}, \textcolor{stringliteral}{"{}bm"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00862}00862         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00863}00863 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00864}00864         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00865}00865 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00867}00867 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00868}00868 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00869}00869 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00870}00870 \textcolor{comment}{ * vmci\_interrupt -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00871}00871 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00872}00872 \textcolor{comment}{ *     Interrupt handler for legacy or MSI interrupt, or for first MSI-\/X}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00873}00873 \textcolor{comment}{ *     interrupt (vector VMCI\_INTR\_DATAGRAM).}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00874}00874 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00875}00875 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00876}00876 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00877}00877 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00878}00878 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00879}00879 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00880}00880 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00881}00881 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00882}00882 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00884}00884 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00885}\mbox{\hyperlink{vmci_8c_a720c40679a6751f12e42db63ca1d638d}{00885}} \mbox{\hyperlink{vmci_8c_a720c40679a6751f12e42db63ca1d638d}{vmci\_interrupt}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00886}00886 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00887}00887 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00888}00888         \textcolor{keywordflow}{if} (\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} == 2)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00889}00889                 taskqueue\_enqueue(taskqueue\_swi,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00890}00890                     \&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a59f96dd23dfee49ab2d4df11eddc9079}{vmci\_interrupt\_dq\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00891}00891         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00892}00892                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} icr;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00893}00893 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00894}00894                 icr = inl(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a294463887d6eea41d430d507451052de}{vmci\_ioaddr}} + \mbox{\hyperlink{vmci__defs_8h_abd29e8aae4f8c18bd33fbffea679426b}{VMCI\_ICR\_ADDR}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00895}00895                 \textcolor{keywordflow}{if} (icr == 0 || icr == 0xffffffff)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00896}00896                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00897}00897                 \textcolor{keywordflow}{if} (icr \& \mbox{\hyperlink{vmci__defs_8h_a564ae257f88b121dfdd81d06e7c04790}{VMCI\_ICR\_DATAGRAM}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00898}00898                         taskqueue\_enqueue(taskqueue\_swi,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00899}00899                             \&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a59f96dd23dfee49ab2d4df11eddc9079}{vmci\_interrupt\_dq\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00900}00900                         icr \&= \string~VMCI\_ICR\_DATAGRAM;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00901}00901                 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00902}00902                 \textcolor{keywordflow}{if} (icr \& \mbox{\hyperlink{vmci__defs_8h_a45d077a70eda5a7aeb735f579f6a6826}{VMCI\_ICR\_NOTIFICATION}}) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00903}00903                         taskqueue\_enqueue(taskqueue\_swi,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00904}00904                             \&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a6d6bf4d4411e6bd49556aec11abf8dce}{vmci\_interrupt\_bm\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00905}00905                         icr \&= \string~VMCI\_ICR\_NOTIFICATION;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00906}00906                 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00907}00907                 \textcolor{keywordflow}{if} (icr != 0)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00908}00908                         \mbox{\hyperlink{vmci__driver_8h_ade38bdd262f83637d6bacaec257ce731}{VMCI\_LOG\_INFO}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}Ignoring unknown interrupt "{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00909}00909                             \textcolor{stringliteral}{"{}cause"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00910}00910         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00911}00911 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00913}00913 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00914}00914 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00915}00915 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00916}00916 \textcolor{comment}{ * vmci\_interrupt\_bm -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00917}00917 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00918}00918 \textcolor{comment}{ *     Interrupt handler for MSI-\/X interrupt vector VMCI\_INTR\_NOTIFICATION,}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00919}00919 \textcolor{comment}{ *     which is for the notification bitmap. Will only get called if we are}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00920}00920 \textcolor{comment}{ *     using MSI-\/X with exclusive vectors.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00921}00921 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00922}00922 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00923}00923 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00924}00924 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00925}00925 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00926}00926 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00927}00927 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00928}00928 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00929}00929 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00930}00930 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00931}00931 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00932}\mbox{\hyperlink{vmci_8c_a7426532e5e4ad24fe688ca9649e6a3c7}{00932}} \mbox{\hyperlink{vmci_8c_a7426532e5e4ad24fe688ca9649e6a3c7}{vmci\_interrupt\_bm}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00933}00933 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00934}00934 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00935}00935         \mbox{\hyperlink{vmci__kernel__defs_8h_a0966b817b229d48e5ffc7feab19a0be6}{ASSERT}}(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}} == 2);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00936}00936         taskqueue\_enqueue(taskqueue\_swi, \&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a6d6bf4d4411e6bd49556aec11abf8dce}{vmci\_interrupt\_bm\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00937}00937 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00938}00938 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00939}00939 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00940}00940 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00941}00941 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00942}00942 \textcolor{comment}{ * dispatch\_datagrams -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00943}00943 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00944}00944 \textcolor{comment}{ *     Reads and dispatches incoming datagrams.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00945}00945 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00946}00946 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00947}00947 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00948}00948 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00949}00949 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00950}00950 \textcolor{comment}{ *     Reads data from the device.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00951}00951 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00952}00952 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00953}00953 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00954}00954 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00955}00955 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00956}\mbox{\hyperlink{vmci_8c_a017c3dfd93aa9ffe5be4c55eb99b816f}{00956}} \mbox{\hyperlink{vmci_8c_a017c3dfd93aa9ffe5be4c55eb99b816f}{dispatch\_datagrams}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} data)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00957}00957 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00958}00958 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00959}00959         \textcolor{keywordflow}{if} (\mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}} == NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00960}00960                 \mbox{\hyperlink{vmci__driver_8h_ade38bdd262f83637d6bacaec257ce731}{VMCI\_LOG\_INFO}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}dispatch\_datagrams(): no buffer "{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00961}00961                     \textcolor{stringliteral}{"{}present"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00962}00962 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00963}00963         \mbox{\hyperlink{vmci__driver_8c_adcd74cd44278fecc3b101628243ec615}{vmci\_read\_datagrams\_from\_port}}((\mbox{\hyperlink{vmci__kernel__if_8h_a49048fd1e8f34d2dbd908c015b59b9ec}{vmci\_io\_handle}}) 0,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00964}00964             \mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a294463887d6eea41d430d507451052de}{vmci\_ioaddr}} + \mbox{\hyperlink{vmci__defs_8h_aaac3daaaa049d7a0c34e8b032df23669}{VMCI\_DATA\_IN\_ADDR}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00965}00965             \mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}}, \mbox{\hyperlink{vmci_8c_a53436a9bf90303bec6388313cc437245}{data\_buffer\_size}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00966}00966 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00968}00968 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00969}00969 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00970}00970 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00971}00971 \textcolor{comment}{ * process\_bitmap -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00972}00972 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00973}00973 \textcolor{comment}{ *     Scans the notification bitmap for raised flags, clears them and handles}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00974}00974 \textcolor{comment}{ *     the notifications.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00975}00975 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00976}00976 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00977}00977 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00978}00978 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00979}00979 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00980}00980 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00981}00981 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00982}00982 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00983}00983 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00984}00984 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00985}00985 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00986}\mbox{\hyperlink{vmci_8c_ab9ac49d7349a1e7e0a9f75853e1a8492}{00986}} \mbox{\hyperlink{vmci_8c_ab9ac49d7349a1e7e0a9f75853e1a8492}{process\_bitmap}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} data)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00987}00987 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00988}00988 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00989}00989         \textcolor{keywordflow}{if} (\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}}.\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}} == NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00990}00990                 \mbox{\hyperlink{vmci__driver_8h_ade38bdd262f83637d6bacaec257ce731}{VMCI\_LOG\_INFO}}(\mbox{\hyperlink{vmci_8c_a721631f31bb99ab98a3c01f3ad1b7b9f}{LGPFX}}\textcolor{stringliteral}{"{}process\_bitmaps(): no bitmap present"{}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00991}00991 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00992}00992         \mbox{\hyperlink{vmci__doorbell_8c_ad0e9fe43dda21c194860ade02fedadaa}{vmci\_scan\_notification\_bitmap}}(}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00993}00993             \mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a8477447246dfcc41afb302903f08a5fb}{vmci\_notifications\_bitmap}}.\mbox{\hyperlink{structvmci__dma__alloc_a72da95f274d4200af3c1808de47e46e3}{dma\_vaddr}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00994}00994 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00995}00995 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00996}00996 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00997}00997 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00998}00998 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l00999}00999 \textcolor{comment}{ * vmci\_dismantle\_interrupts -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01000}01000 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01001}01001 \textcolor{comment}{ *     Releases resources, detaches the interrupt handler and drains the task}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01002}01002 \textcolor{comment}{ *     queue.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01003}01003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01004}01004 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01005}01005 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01006}01006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01007}01007 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01008}01008 \textcolor{comment}{ *     No more interrupts.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01009}01009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01010}01010 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01011}01011 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01012}01012 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01013}01013 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01014}\mbox{\hyperlink{vmci_8c_a4ed258bef1dc8936d2454df56d8af416}{01014}} \mbox{\hyperlink{vmci_8c_a4ed258bef1dc8936d2454df56d8af416}{vmci\_dismantle\_interrupts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__softc}{vmci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01015}01015 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01016}01016         \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__interrupt}{vmci\_interrupt}} *intr;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01017}01017         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01018}01018 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01019}01019         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}}; i++) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01020}01020                 intr = \&sc-\/>\mbox{\hyperlink{structvmci__softc_a9495e52a3afe0687a1769c95dcb37bad}{vmci\_intrs}}[i];}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01021}01021                 \textcolor{keywordflow}{if} (intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01022}01022                         bus\_teardown\_intr(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01023}01023                             intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01024}01024                         intr-\/>\mbox{\hyperlink{structvmci__interrupt_acda92c00b5b1166d73583260bbb5ca15}{vmci\_handler}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01025}01025                 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01026}01026                 \textcolor{keywordflow}{if} (intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01027}01027                         bus\_release\_resource(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}}, SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01028}01028                             intr-\/>\mbox{\hyperlink{structvmci__interrupt_ad0e03b362e2438193ce0764468efa217}{vmci\_rid}}, intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01029}01029                         intr-\/>\mbox{\hyperlink{structvmci__interrupt_aba1bdc6d9da7494e383212df5ebb90bd}{vmci\_irq}} = NULL;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01030}01030                         intr-\/>\mbox{\hyperlink{structvmci__interrupt_ad0e03b362e2438193ce0764468efa217}{vmci\_rid}} = -\/1;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01031}01031                 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01032}01032         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01033}01033 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01034}01034         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structvmci__softc_aa20fc121fcba635be6713b24fcfe22a2}{vmci\_intr\_type}} != \mbox{\hyperlink{vmci__defs_8h_a24d53c3d5b954b4c0045eb9289345b98a36a5c222893b7b43c80a4b6d1fa4e71c}{VMCI\_INTR\_TYPE\_INTX}}) \&\&}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01035}01035             (sc-\/>\mbox{\hyperlink{structvmci__softc_ad862841ad4c196f6e67d78d6ef314a03}{vmci\_num\_intr}}))}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01036}01036                 pci\_release\_msi(sc-\/>\mbox{\hyperlink{structvmci__softc_a40b99f6a9d7e83150943d2e3285fc725}{vmci\_dev}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01037}01037 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01038}01038         taskqueue\_drain(taskqueue\_swi, \&sc-\/>\mbox{\hyperlink{structvmci__softc_a59f96dd23dfee49ab2d4df11eddc9079}{vmci\_interrupt\_dq\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01039}01039         taskqueue\_drain(taskqueue\_swi, \&sc-\/>\mbox{\hyperlink{structvmci__softc_a6d6bf4d4411e6bd49556aec11abf8dce}{vmci\_interrupt\_bm\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01040}01040 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01041}01041         \textcolor{keywordflow}{if} (\mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}} != NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01042}01042                 free(\mbox{\hyperlink{vmci_8c_abef30bdb6743d7636588fc07f3455843}{data\_buffer}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01043}01043 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01045}01045 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01046}01046 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01047}01047 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01048}01048 \textcolor{comment}{ * vmci\_delayed\_work\_fn\_cb -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01049}01049 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01050}01050 \textcolor{comment}{ *     Callback function that executes the queued up delayed work functions.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01051}01051 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01052}01052 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01053}01053 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01054}01054 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01055}01055 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01056}01056 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01057}01057 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01058}01058 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01059}01059 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01060}01060 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01061}01061 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01062}\mbox{\hyperlink{vmci_8c_aa32fe3d865565363d028d5917d680cda}{01062}} \mbox{\hyperlink{vmci_8c_aa32fe3d865565363d028d5917d680cda}{vmci\_delayed\_work\_fn\_cb}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} data)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01063}01063 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01064}01064         \mbox{\hyperlink{vmci__kernel__if_8h_afad83d650764fc96e3c45385eeea40a8}{vmci\_list}}(\mbox{\hyperlink{structvmci__delayed__work__info}{vmci\_delayed\_work\_info}}) temp\_list;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01065}01065 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01066}01066         \mbox{\hyperlink{vmci__kernel__if_8h_ae0f755fbb601b1324846583240334fe9}{vmci\_list\_init}}(\&temp\_list);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01067}01067 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01068}01068         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01069}01069 \textcolor{comment}{         * Swap vmci\_delayed\_work\_infos list with the empty temp\_list while}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01070}01070 \textcolor{comment}{         * holding a lock. vmci\_delayed\_work\_infos would then be an empty list}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01071}01071 \textcolor{comment}{         * and temp\_list would contain the elements from the original}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01072}01072 \textcolor{comment}{         * vmci\_delayed\_work\_infos. Finally, iterate through temp\_list}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01073}01073 \textcolor{comment}{         * executing the delayed callbacks.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01074}01074 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01075}01075 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01076}01076         mtx\_lock(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_aaaa0072b3701cc4b394fec4671d7b42c}{vmci\_delayed\_work\_lock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01077}01077         \mbox{\hyperlink{vmci__kernel__if_8h_a30dabef6b258c84bd9a04f5e2d19ffa9}{vmci\_list\_swap}}(\&temp\_list, \&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>vmci\_delayed\_work\_infos,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01078}01078             \mbox{\hyperlink{structvmci__delayed__work__info}{vmci\_delayed\_work\_info}}, entry);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01079}01079         mtx\_unlock(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_aaaa0072b3701cc4b394fec4671d7b42c}{vmci\_delayed\_work\_lock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01081}01081         \textcolor{keywordflow}{while} (!\mbox{\hyperlink{vmci__kernel__if_8h_a828298aa64d77ed71470fead95e6a09a}{vmci\_list\_empty}}(\&temp\_list)) \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01082}01082                 \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__delayed__work__info}{vmci\_delayed\_work\_info}} *delayed\_work\_info =}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01083}01083                     \mbox{\hyperlink{vmci__kernel__if_8h_a40c4bfcf81904162a9285c047585cf99}{vmci\_list\_first}}(\&temp\_list);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01085}01085                 delayed\_work\_info-\/>\mbox{\hyperlink{structvmci__delayed__work__info_afc270995f6a7c74c9109b11151739bf3}{work\_fn}}(delayed\_work\_info-\/>\mbox{\hyperlink{structvmci__delayed__work__info_afc4882a48a3baec445084fef518e41a5}{data}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01086}01086 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01087}01087                 \mbox{\hyperlink{vmci__kernel__if_8h_afb08f44c6dfbcf9f71108e8eb8912803}{vmci\_list\_remove}}(delayed\_work\_info, entry);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01088}01088                 \mbox{\hyperlink{vmci__kernel__if_8c_ac55ceaf5f269d5ffafd52e332cf8dbc4}{vmci\_free\_kernel\_mem}}(delayed\_work\_info,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01089}01089                     \textcolor{keyword}{sizeof}(*delayed\_work\_info));}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01090}01090         \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01091}01091 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01092}01092 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01093}01093 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01094}01094 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01095}01095 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01096}01096 \textcolor{comment}{ * vmci\_schedule\_delayed\_work\_fn -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01097}01097 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01098}01098 \textcolor{comment}{ *     Schedule the specified callback.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01099}01099 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01100}01100 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01101}01101 \textcolor{comment}{ *     0 if success, error code otherwise.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01102}01102 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01103}01103 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01104}01104 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01105}01105 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01106}01106 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01107}01107 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01108}01108 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01109}01109 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01110}\mbox{\hyperlink{vmci_8c_a43699b26310b1bb2f6445f60c72ddb4e}{01110}} \mbox{\hyperlink{vmci_8c_a43699b26310b1bb2f6445f60c72ddb4e}{vmci\_schedule\_delayed\_work\_fn}}(\mbox{\hyperlink{vmci__kernel__if_8h_ade40e70bb2b8d845587517871ad24777}{vmci\_work\_fn}} *\mbox{\hyperlink{structvmci__delayed__work__info_afc270995f6a7c74c9109b11151739bf3}{work\_fn}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structvmci__delayed__work__info_afc4882a48a3baec445084fef518e41a5}{data}})}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01111}01111 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01112}01112         \textcolor{keyword}{struct }\mbox{\hyperlink{structvmci__delayed__work__info}{vmci\_delayed\_work\_info}} *delayed\_work\_info;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01114}01114         delayed\_work\_info = \mbox{\hyperlink{vmci__kernel__if_8c_a9704e99048c2cb66ded146e496decff2}{vmci\_alloc\_kernel\_mem}}(\textcolor{keyword}{sizeof}(*delayed\_work\_info),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01115}01115             \mbox{\hyperlink{vmci__kernel__if_8h_a7b8b9e55a6707635b5ba3e19ee25ca16}{VMCI\_MEMORY\_ATOMIC}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01116}01116 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01117}01117         \textcolor{keywordflow}{if} (!delayed\_work\_info)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01118}01118                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{vmci__defs_8h_a66b7fa43b4b851f7457d3d6ec3569a47}{VMCI\_ERROR\_NO\_MEM}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01119}01119 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01120}01120         delayed\_work\_info-\/>\mbox{\hyperlink{structvmci__delayed__work__info_afc270995f6a7c74c9109b11151739bf3}{work\_fn}} = \mbox{\hyperlink{structvmci__delayed__work__info_afc270995f6a7c74c9109b11151739bf3}{work\_fn}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01121}01121         delayed\_work\_info-\/>\mbox{\hyperlink{structvmci__delayed__work__info_afc4882a48a3baec445084fef518e41a5}{data}} = \mbox{\hyperlink{structvmci__delayed__work__info_afc4882a48a3baec445084fef518e41a5}{data}};}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01122}01122         mtx\_lock(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_aaaa0072b3701cc4b394fec4671d7b42c}{vmci\_delayed\_work\_lock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01123}01123         \mbox{\hyperlink{vmci__kernel__if_8h_a52e621e3aca0a5875c17c51a3ce93960}{vmci\_list\_insert}}(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>vmci\_delayed\_work\_infos,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01124}01124             delayed\_work\_info, entry);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01125}01125         mtx\_unlock(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_aaaa0072b3701cc4b394fec4671d7b42c}{vmci\_delayed\_work\_lock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01126}01126 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01127}01127         taskqueue\_enqueue(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01128}01128             \&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a72e1929ef0940f6a413ed5c345907d00}{vmci\_delayed\_work\_task}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01130}01130         \textcolor{keywordflow}{return} (\mbox{\hyperlink{vmci__defs_8h_ab286f495fff827d2718453f2968a6899}{VMCI\_SUCCESS}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01131}01131 \}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01132}01132 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01133}01133 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01134}01134 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01135}01135 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01136}01136 \textcolor{comment}{ * vmci\_send\_datagram -\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01137}01137 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01138}01138 \textcolor{comment}{ *     VM to hypervisor call mechanism.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01139}01139 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01140}01140 \textcolor{comment}{ * Results:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01141}01141 \textcolor{comment}{ *     The result of the hypercall.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01142}01142 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01143}01143 \textcolor{comment}{ * Side effects:}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01144}01144 \textcolor{comment}{ *     None.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01145}01145 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01146}01146 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01147}01147 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01148}01148 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01149}01149 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01150}\mbox{\hyperlink{vmci_8c_a856fbe17560b2419da1e495a3232dd5c}{01150}} \mbox{\hyperlink{vmci_8c_a856fbe17560b2419da1e495a3232dd5c}{vmci\_send\_datagram}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structvmci__datagram}{vmci\_datagram}} *dg)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01151}01151 \{}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01152}01152         \textcolor{keywordtype}{int} result;}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01153}01153 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01154}01154         \textcolor{keywordflow}{if} (dg == NULL)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01155}01155                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{vmci__defs_8h_a8ab0ddbd99d8d5d8f1ed882d0f5de1a3}{VMCI\_ERROR\_INVALID\_ARGS}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01156}01156 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01157}01157         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01158}01158 \textcolor{comment}{         * Need to acquire spinlock on the device because}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01159}01159 \textcolor{comment}{         * the datagram data may be spread over multiple pages and the monitor}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01160}01160 \textcolor{comment}{         * may interleave device user rpc calls from multiple VCPUs. Acquiring}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01161}01161 \textcolor{comment}{         * the spinlock precludes that possibility. Disabling interrupts to}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01162}01162 \textcolor{comment}{         * avoid incoming datagrams during a "{}rep out"{} and possibly landing up}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01163}01163 \textcolor{comment}{         * in this function.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01164}01164 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01165}01165         mtx\_lock\_spin(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a03425d50c367800e01888bbc5666049b}{vmci\_spinlock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01166}01166 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01167}01167         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01168}01168 \textcolor{comment}{         * Send the datagram and retrieve the return value from the result}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01169}01169 \textcolor{comment}{         * register.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01170}01170 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01171}01171         \_\_asm\_\_ \_\_volatile\_\_(}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01172}01172             \textcolor{stringliteral}{"{}cld\(\backslash\)n\(\backslash\)t"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01173}01173             \textcolor{stringliteral}{"{}rep outsb\(\backslash\)n\(\backslash\)t"{}}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01174}01174             : \textcolor{comment}{/* No output. */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01175}01175             : \textcolor{stringliteral}{"{}d"{}}(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a294463887d6eea41d430d507451052de}{vmci\_ioaddr}} + \mbox{\hyperlink{vmci__defs_8h_a42b5704d5f1f5893725aa1b8cddaf8ac}{VMCI\_DATA\_OUT\_ADDR}}),}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01176}01176             \textcolor{stringliteral}{"{}c"{}}(\mbox{\hyperlink{vmci__call__defs_8h_a1a5fd7a1dd53d6ae486bcb91ce157546}{VMCI\_DG\_SIZE}}(dg)), \textcolor{stringliteral}{"{}S"{}}(dg)}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01177}01177             );}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01178}01178 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01179}01179         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01180}01180 \textcolor{comment}{         * XXX: Should read result high port as well when updating handlers to}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01181}01181 \textcolor{comment}{         * return 64bit.}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01182}01182 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01183}01183 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01184}01184         result = bus\_space\_read\_4(\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_af3275eb4ab7f35549e083757d0a1aa12}{vmci\_iot0}},}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01185}01185             \mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a4c2e699eb2672a5755b6ff78c7054e7a}{vmci\_ioh0}}, \mbox{\hyperlink{vmci__defs_8h_a31598357a7bbe52f8821c313b00ca39b}{VMCI\_RESULT\_LOW\_ADDR}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01186}01186         mtx\_unlock\_spin(\&\mbox{\hyperlink{vmci_8c_a8598984cb028f5dc5ab056e32b7878e6}{vmci\_sc}}-\/>\mbox{\hyperlink{structvmci__softc_a03425d50c367800e01888bbc5666049b}{vmci\_spinlock}});}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01188}01188         \textcolor{keywordflow}{return} (result);}
\DoxyCodeLine{\Hypertarget{vmci_8c_source_l01189}01189 \}}

\end{DoxyCode}
