Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354909
b: refs/heads/master
c: 2025984
h: refs/heads/master
i:
  354907: dc788df
v: v3
  • Loading branch information
George Zhang authored and Greg Kroah-Hartman committed Jan 9, 2013
1 parent b274309 commit 64cb131
Show file tree
Hide file tree
Showing 7 changed files with 986 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bf503991f87e32ea42a7bd69b79ba084fddc5d7
refs/heads/master: 20259849bb1ac1ffb0156eb359810e8b99cb644d
1 change: 1 addition & 0 deletions trunk/drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -507,4 +507,5 @@ source "drivers/misc/lis3lv02d/Kconfig"
source "drivers/misc/carma/Kconfig"
source "drivers/misc/altera-stapl/Kconfig"
source "drivers/misc/mei/Kconfig"
source "drivers/misc/vmw_vmci/Kconfig"
endmenu
2 changes: 2 additions & 0 deletions trunk/drivers/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ obj-y += carma/
obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
obj-$(CONFIG_INTEL_MEI) += mei/
obj-$(CONFIG_MAX8997_MUIC) += max8997-muic.o
obj-$(CONFIG_VMWARE_VMCI) += vmw_vmci/
16 changes: 16 additions & 0 deletions trunk/drivers/misc/vmw_vmci/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# VMware VMCI device
#

config VMWARE_VMCI
tristate "VMware VMCI Driver"
depends on X86
help
This is VMware's Virtual Machine Communication Interface. It enables
high-speed communication between host and guest in a virtual
environment via the VMCI virtual device.

If unsure, say N.

To compile this driver as a module, choose M here: the
module will be called vmw_vmci.
4 changes: 4 additions & 0 deletions trunk/drivers/misc/vmw_vmci/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
obj-$(CONFIG_VMWARE_VMCI) += vmw_vmci.o
vmw_vmci-y += vmci_context.o vmci_datagram.o vmci_doorbell.o \
vmci_driver.o vmci_event.o vmci_guest.o vmci_handle_array.o \
vmci_host.o vmci_queue_pair.o vmci_resource.o vmci_route.o
82 changes: 82 additions & 0 deletions trunk/include/linux/vmw_vmci_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* VMware VMCI Driver
*
* Copyright (C) 2012 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation version 2 and no later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/

#ifndef __VMW_VMCI_API_H__
#define __VMW_VMCI_API_H__

#include <linux/uidgid.h>
#include <linux/vmw_vmci_defs.h>

#undef VMCI_KERNEL_API_VERSION
#define VMCI_KERNEL_API_VERSION_1 1
#define VMCI_KERNEL_API_VERSION_2 2
#define VMCI_KERNEL_API_VERSION VMCI_KERNEL_API_VERSION_2

typedef void (vmci_device_shutdown_fn) (void *device_registration,
void *user_data);

int vmci_datagram_create_handle(u32 resource_id, u32 flags,
vmci_datagram_recv_cb recv_cb,
void *client_data,
struct vmci_handle *out_handle);
int vmci_datagram_create_handle_priv(u32 resource_id, u32 flags, u32 priv_flags,
vmci_datagram_recv_cb recv_cb,
void *client_data,
struct vmci_handle *out_handle);
int vmci_datagram_destroy_handle(struct vmci_handle handle);
int vmci_datagram_send(struct vmci_datagram *msg);
int vmci_doorbell_create(struct vmci_handle *handle, u32 flags,
u32 priv_flags,
vmci_callback notify_cb, void *client_data);
int vmci_doorbell_destroy(struct vmci_handle handle);
int vmci_doorbell_notify(struct vmci_handle handle, u32 priv_flags);
u32 vmci_get_context_id(void);
bool vmci_is_context_owner(u32 context_id, kuid_t uid);

int vmci_event_subscribe(u32 event,
vmci_event_cb callback, void *callback_data,
u32 *subid);
int vmci_event_unsubscribe(u32 subid);
u32 vmci_context_get_priv_flags(u32 context_id);
int vmci_qpair_alloc(struct vmci_qp **qpair,
struct vmci_handle *handle,
u64 produce_qsize,
u64 consume_qsize,
u32 peer, u32 flags, u32 priv_flags);
int vmci_qpair_detach(struct vmci_qp **qpair);
int vmci_qpair_get_produce_indexes(const struct vmci_qp *qpair,
u64 *producer_tail,
u64 *consumer_head);
int vmci_qpair_get_consume_indexes(const struct vmci_qp *qpair,
u64 *consumer_tail,
u64 *producer_head);
s64 vmci_qpair_produce_free_space(const struct vmci_qp *qpair);
s64 vmci_qpair_produce_buf_ready(const struct vmci_qp *qpair);
s64 vmci_qpair_consume_free_space(const struct vmci_qp *qpair);
s64 vmci_qpair_consume_buf_ready(const struct vmci_qp *qpair);
ssize_t vmci_qpair_enqueue(struct vmci_qp *qpair,
const void *buf, size_t buf_size, int mode);
ssize_t vmci_qpair_dequeue(struct vmci_qp *qpair,
void *buf, size_t buf_size, int mode);
ssize_t vmci_qpair_peek(struct vmci_qp *qpair, void *buf, size_t buf_size,
int mode);
ssize_t vmci_qpair_enquev(struct vmci_qp *qpair,
void *iov, size_t iov_size, int mode);
ssize_t vmci_qpair_dequev(struct vmci_qp *qpair,
void *iov, size_t iov_size, int mode);
ssize_t vmci_qpair_peekv(struct vmci_qp *qpair, void *iov, size_t iov_size,
int mode);

#endif /* !__VMW_VMCI_API_H__ */
Loading

0 comments on commit 64cb131

Please sign in to comment.