Lines Matching +full:host +full:- +full:only
1 // SPDX-License-Identifier: GPL-2.0-only
31 * "from_guest" is only ever set to true by in vmci_route()
38 * not touch a non-existent device. in vmci_route()
42 if (VMCI_INVALID_ID == dst->context) in vmci_route()
46 if (VMCI_HYPERVISOR_CONTEXT_ID == dst->context) { in vmci_route()
63 /* And we cannot send if the source is the host context. */ in vmci_route()
64 if (VMCI_HOST_CONTEXT_ID == src->context) in vmci_route()
70 * However, if they passed only an invalid context, in vmci_route()
75 if (VMCI_INVALID_ID == src->context && in vmci_route()
76 VMCI_INVALID_ID != src->resource) in vmci_route()
77 src->context = vmci_get_context_id(); in vmci_route()
84 /* Anywhere to local client on host. */ in vmci_route()
85 if (VMCI_HOST_CONTEXT_ID == dst->context) { in vmci_route()
88 * guest, then we need to send it down to the host. in vmci_route()
89 * Note that if we are also acting as a host then this in vmci_route()
92 * way to remove any ambiguity from the host context. in vmci_route()
94 if (src->context == VMCI_HYPERVISOR_CONTEXT_ID) { in vmci_route()
97 * host local communication. The hypervisor in vmci_route()
98 * may send vmci event datagrams to the host in vmci_route()
100 * an "outer host" through the guest device. in vmci_route()
113 if (VMCI_INVALID_ID == src->context) in vmci_route()
114 src->context = vmci_get_context_id(); in vmci_route()
116 /* Send it from local client down to the host. */ in vmci_route()
123 * it is destined for a local client on this host, or in vmci_route()
124 * it is from another local client on this host. We in vmci_route()
125 * must be acting as a host to service it. in vmci_route()
130 if (VMCI_INVALID_ID == src->context) { in vmci_route()
134 * host context. in vmci_route()
139 src->context = VMCI_HOST_CONTEXT_ID; in vmci_route()
148 * If we are acting as a host then this might be destined for in vmci_route()
153 if (vmci_ctx_exists(dst->context)) { in vmci_route()
154 if (VMCI_INVALID_ID == src->context) { in vmci_route()
158 * Otherwise we can use the host in vmci_route()
165 src->context = VMCI_HOST_CONTEXT_ID; in vmci_route()
166 } else if (VMCI_CONTEXT_IS_VM(src->context) && in vmci_route()
167 src->context != dst->context) { in vmci_route()
171 * communication destined for the host in vmci_route()
184 * The host is attempting to reach a CID in vmci_route()
196 * we need to send it down to the host. We do not filter out VM to in vmci_route()
202 * Ending up here means we have neither guest nor host in vmci_route()
209 if (VMCI_INVALID_ID == src->context) in vmci_route()
210 src->context = vmci_get_context_id(); in vmci_route()
213 * Send it from local client down to the host, which will in vmci_route()