search for: vmci_guest_code_active

Displaying 20 results from an estimated 31 matches for "vmci_guest_code_active".

2012 Aug 30
0
[PATCH 03/11] vmci_doorbell.patch: VMCI doorbell notification handling.
...xt_get_priv_flags(handle.context); + } + + return VMCI_SUCCESS; +} + +/* + * Find doorbell entry by bitmap index. + */ +static struct dbell_entry *dbell_index_table_find(uint32_t idx) +{ + uint32_t bucket = VMCI_DOORBELL_HASH(idx); + struct dbell_entry *cur; + + ASSERT(vmci_guest_code_active()); + + list_for_each_entry(cur, &vmciDoorbellIT.entries[bucket], idxListItem) { + if (idx == cur->idx) + return cur; + } + + return NULL; +} + +/* + * Add the given entry to the index table. This will hold() the entry's + * resource...
2012 Aug 30
0
[PATCH 03/11] vmci_doorbell.patch: VMCI doorbell notification handling.
...xt_get_priv_flags(handle.context); + } + + return VMCI_SUCCESS; +} + +/* + * Find doorbell entry by bitmap index. + */ +static struct dbell_entry *dbell_index_table_find(uint32_t idx) +{ + uint32_t bucket = VMCI_DOORBELL_HASH(idx); + struct dbell_entry *cur; + + ASSERT(vmci_guest_code_active()); + + list_for_each_entry(cur, &vmciDoorbellIT.entries[bucket], idxListItem) { + if (idx == cur->idx) + return cur; + } + + return NULL; +} + +/* + * Add the given entry to the index table. This will hold() the entry's + * resource...
2016 Oct 06
0
[PATCH] VMCI: Doorbell create and destroy fixes
This change consists of two changes: 1) If vmci_doorbell_create is called when neither guest nor host personality as been initialized, vmci_get_context_id will return VMCI_INVALID_ID. In that case, we should fail the create call. 2) In doorbell destroy, we assume that vmci_guest_code_active() has the same return value on create and destroy. That may not be the case, so we may end up with the wrong refcount. Instead, destroy should check explicitly whether the doorbell is in the index table as an indicator of whether the guest code was active at create time. Reviewed-by...
2016 Oct 06
0
[PATCH] VMCI: Doorbell create and destroy fixes
This change consists of two changes: 1) If vmci_doorbell_create is called when neither guest nor host personality as been initialized, vmci_get_context_id will return VMCI_INVALID_ID. In that case, we should fail the create call. 2) In doorbell destroy, we assume that vmci_guest_code_active() has the same return value on create and destroy. That may not be the case, so we may end up with the wrong refcount. Instead, destroy should check explicitly whether the doorbell is in the index table as an indicator of whether the guest code was active at create time. Reviewed-by...
2012 Aug 30
1
[PATCH 04/11] vmci_driver.patch: VMCI device driver.
...* + * Cleans up the host specific components of the VMCI module. + */ +static void drv_host_cleanup(void) +{ + vmci_ctx_release_ctx(hostContext); + vmci_qp_broker_exit(); +} + +/* + * Checks whether the VMCI device is enabled. + */ +static bool drv_device_enabled(void) +{ + return vmci_guest_code_active() || + vmci_host_code_active(); +} + +/* + * Gets called with the new context id if updated or resumed. + * Context id. + */ +static void drv_util_cid_update(u32 subID, + struct vmci_event_data *eventData, + void *clientData)...
2012 Aug 30
1
[PATCH 04/11] vmci_driver.patch: VMCI device driver.
...* + * Cleans up the host specific components of the VMCI module. + */ +static void drv_host_cleanup(void) +{ + vmci_ctx_release_ctx(hostContext); + vmci_qp_broker_exit(); +} + +/* + * Checks whether the VMCI device is enabled. + */ +static bool drv_device_enabled(void) +{ + return vmci_guest_code_active() || + vmci_host_code_active(); +} + +/* + * Gets called with the new context id if updated or resumed. + * Context id. + */ +static void drv_util_cid_update(u32 subID, + struct vmci_event_data *eventData, + void *clientData)...
2019 Oct 23
0
[PATCH net-next 12/14] vsock/vmci: register vmci_transport only when VMCI guest/host are active
...+int vmci_register_vsock_callback(vmci_vsock_cb callback) +{ + int err = 0; + + mutex_lock(&vmci_vsock_mutex); + + if (vmci_vsock_transport_cb && callback) { + err = -EBUSY; + goto out; + } + + vmci_vsock_transport_cb = callback; + + if (!vmci_vsock_transport_cb) + goto out; + + if (vmci_guest_code_active()) + vmci_vsock_transport_cb(false); + + if (vmci_host_users() > 0) + vmci_vsock_transport_cb(true); + +out: + mutex_unlock(&vmci_vsock_mutex); + return err; +} +EXPORT_SYMBOL_GPL(vmci_register_vsock_callback); + +void vmci_call_vsock_callback(bool is_host) +{ + mutex_lock(&vmci_vsock_...
2012 Oct 30
29
[PATCH 00/12] VMCI for Linux upstreaming
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware. -split guest, host and core driver code into different files -use EXPORT_SYMBOLS_GPL -remove vmci_device_get and vmci_device_release APIs -simplify the event deliver mechanism -driver ioctl code cleanup -sparse clean * * * In an effort to improve the out-of-the-box experience with
2012 Oct 30
29
[PATCH 00/12] VMCI for Linux upstreaming
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware. -split guest, host and core driver code into different files -use EXPORT_SYMBOLS_GPL -remove vmci_device_get and vmci_device_release APIs -simplify the event deliver mechanism -driver ioctl code cleanup -sparse clean * * * In an effort to improve the out-of-the-box experience with
2012 Oct 16
11
[PATCH 00/10] VMCI for Linux upstreaming
* * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later
2012 Oct 16
11
[PATCH 00/10] VMCI for Linux upstreaming
* * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later
2012 Aug 30
0
[PATCH 10/11] vmci_route.patch: VMCI routing implementation.
...es. Will set the source context if it is invalid. + */ +int vmci_route(struct vmci_handle *src, + const struct vmci_handle *dst, + bool fromGuest, + enum vmci_route *route) +{ + bool hasHostDevice = vmci_host_code_active(); + bool hasGuestDevice = vmci_guest_code_active(); + + ASSERT(src); + ASSERT(dst); + ASSERT(route); + + *route = VMCI_ROUTE_NONE; + + /* + * "fromGuest" is only ever set to true by + * IOCTL_VMCI_DATAGRAM_SEND (or by the vmkernel equivalent), + * which comes from the VMX, so we know it...
2012 Aug 30
0
[PATCH 10/11] vmci_route.patch: VMCI routing implementation.
...es. Will set the source context if it is invalid. + */ +int vmci_route(struct vmci_handle *src, + const struct vmci_handle *dst, + bool fromGuest, + enum vmci_route *route) +{ + bool hasHostDevice = vmci_host_code_active(); + bool hasGuestDevice = vmci_guest_code_active(); + + ASSERT(src); + ASSERT(dst); + ASSERT(route); + + *route = VMCI_ROUTE_NONE; + + /* + * "fromGuest" is only ever set to true by + * IOCTL_VMCI_DATAGRAM_SEND (or by the vmkernel equivalent), + * which comes from the VMX, so we know it...
2012 Jun 12
11
[vmw_vmci RFCv2 00/11] VMCI for Linux
Second revision of the VMware VMCI RFC patchset. It incorperates fixes for all the feedback about the comment blocks and style and now passes checkpatch with 0 errors and 0 warnings. Thanks to all who have reviewed the code thus far. * * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication
2012 Jun 12
11
[vmw_vmci RFCv2 00/11] VMCI for Linux
Second revision of the VMware VMCI RFC patchset. It incorperates fixes for all the feedback about the comment blocks and style and now passes checkpatch with 0 errors and 0 warnings. Thanks to all who have reviewed the code thus far. * * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication
2012 Jul 26
16
[vmw_vmci 00/11] VMCI for Linux
In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later post.
2012 Jul 26
16
[vmw_vmci 00/11] VMCI for Linux
In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later post.
2012 May 15
13
[vmw_vmci RFC 00/11] VMCI for Linux
In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later post.
2012 May 15
13
[vmw_vmci RFC 00/11] VMCI for Linux
In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later post.
2013 Aug 23
0
[PATCH 1/2] VMCI: Remove non-blocking/pinned queuepair support
...ad; size_t read; ssize_t result; - result = qp_map_queue_headers(produce_q, consume_q, can_block); + result = qp_map_queue_headers(produce_q, consume_q); if (unlikely(result != VMCI_SUCCESS)) return result; @@ -2842,32 +2762,11 @@ int vmci_qpair_alloc(struct vmci_qp **qpair, route = vmci_guest_code_active() ? VMCI_ROUTE_AS_GUEST : VMCI_ROUTE_AS_HOST; - /* If NONBLOCK or PINNED is set, we better be the guest personality. */ - if ((!vmci_can_block(flags) || vmci_qp_pinned(flags)) && - VMCI_ROUTE_AS_GUEST != route) { - pr_devel("Not guest personality w/ NONBLOCK OR PINNED set...