~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/linux/shared/vmci_defs.h

  • Committer: Package Import Robot
  • Author(s): Nate Muench
  • Date: 2012-01-23 16:09:45 UTC
  • mfrom: (1.4.6) (2.4.26 sid)
  • Revision ID: package-import@ubuntu.com-20120123160945-b6s0r1vkcovucpf3
Tags: 2011.12.20-562307-0ubuntu1
* Merge latest upstream git tag. Fixes building on Precise
  (LP: #898289, LP: #905612)

* Items merged from Debian unstable:
  - debian/control:
    + open-vm-tools recommends open-vm-dkms. (LP: #598933)
    + open-vm-tools now suggests open-vm-toolbox. (LP: #604998)
  (From 2011.08.21-471295-1 release)
  - Updating maintainer and uploaders fields.
  - Removing vcs fields.
  - Removing references to Daniel's old email address.
  - Updating years in copyright file.
  - Updating to standards version 3.9.2.
  - Updating to debhelper version 8.
  - Switching to source format 3.0 (quilt).
  - Removing manual chrpath setting.
  - Removing exclusion from plugins from debhelper shlibs.
  - Rediffing kvers.patch.
  (From 2011.09.23-491607-1 release)
  - Marking binary architecture-dependend packages as linux and kfreebsd
  only.
  - Removing liburiparser-dev from build-depends as upstream dropped
  unity support.
  - Building with libproc-dev on amd64 again.
  - Dropping disabling of dnet support.
  (From 2011.09.23-491607-2 release)
  - Adding doxygen to build-depends for api documentation.
  - Adding libcunit1-dev to build-depends for test suites.
  - Minimizing rules file.
  - Adding open-vm-tools-dev package, containing only the api
    documentation for now.
  (From 2011.09.23-491607-3 release)
  - Sorting overrides in rules alphabetically.
  - Compacting copyright file.
  - Adding udev rule to set timeout for vmware scsi devices
  (From 2011.12.20-562307-1 release)
  - Adding patch to correct typo in upstreams dkms configuration

* Remaining Changes:
  - Remove Stable part of version numbering.
  - debian folder:
    + Re-added open-vm-dkms.postinst & open-vm-dkms.prerm.
      * Allows dkms modules to compile upon installation.
  - debian/control:
    + Re-add open-vm-source and make into a transitional package
      for open-vm-toolbox.
    + Return dependancies that were moved to open-vm-tools back to
      open-vm-toolbox.
  - debian/rules and debian/open-vm-toolbox.lintian-overrides:
    + Make vmware-user-suid-wrapper suid-root
  - debian/rules:
    + Added CFLAGS field with -Wno-deprecated-declarations
      * Will suppress issues with glib 2.31 or later.
    + Add line to copy vmware-xdg-detect-de into place.
    + Install vmware-user.desktop through toolbox package.
  - debian/open-vm-tools.init:
    + Re-add 'modprobe [-r] vmblock'.
    + Add 'modprobe [-r] vmxnet'.
      * Incase it's not loaded during boot.
    + Remove and re-add pcnet32 module
      * Will be done before (remove) and after (readd) vmxnet module
        is added.
      * If vmxnet doesn't exist (aka modules fail to build), pcnet32 can be
        still used for network connectivity.
      * Workaround until a better fix can be done.
  - Re-add gnome-session to debian/local/xautostart.conf
  - Manpages removed (from debian/manpages):
    + vmmemctl.9
    + vmxnet3.9
    + Remove references to manpages that have been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*********************************************************
2
 
 * Copyright (C) 2005-2010 VMware, Inc. All rights reserved.
 
2
 * Copyright (C) 2005-2011 VMware, Inc. All rights reserved.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify it
5
5
 * under the terms of the GNU General Public License as published by the
96
96
#define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024)
97
97
 
98
98
/*
 
99
 * Queues with pre-mapped data pages must be small, so that we don't pin
 
100
 * too much kernel memory (especially on vmkernel).  We limit a queuepair to
 
101
 * 32 KB, or 16 KB per queue for symmetrical pairs.
 
102
 */
 
103
#define VMCI_MAX_PINNED_QP_MEMORY (32 * 1024)
 
104
 
 
105
/*
99
106
 * We have a fixed set of resource IDs available in the VMX.
100
107
 * This allows us to have a very simple implementation since we statically
101
108
 * know how many will create datagram handles. If a new caller arrives and
112
119
#define VMCI_DOORBELL_LINK        3
113
120
#define VMCI_DOORBELL_UNLINK      4
114
121
#define VMCI_DOORBELL_NOTIFY      5
 
122
/*
 
123
 * VMCI_DATAGRAM_REQUEST_MAP and VMCI_DATAGRAM_REMOVE_MAP are
 
124
 * obsoleted by the removal of VM to VM communication.
 
125
 */
115
126
#define VMCI_DATAGRAM_REQUEST_MAP 6
116
127
#define VMCI_DATAGRAM_REMOVE_MAP  7
117
128
#define VMCI_EVENT_SUBSCRIBE      8
124
135
 */
125
136
#define VMCI_HGFS_TRANSPORT       13
126
137
#define VMCI_UNITY_PBRPC_REGISTER 14
127
 
#define VMCI_RESOURCE_MAX         15
 
138
/*
 
139
 * The next two resources are for RPC calls from guest Tools, to replace the
 
140
 * backdoor calls we used previously.  Privileged is for admin/root RPCs,
 
141
 * unprivileged is for RPCs from any user.
 
142
 */
 
143
#define VMCI_RPC_PRIVILEGED       15
 
144
#define VMCI_RPC_UNPRIVILEGED     16
 
145
#define VMCI_RESOURCE_MAX         17
128
146
 
129
147
/* VMCI Ids. */
130
148
typedef uint32 VMCIId;
228
246
#define VMCI_HYPERVISOR_CONTEXT_ID 0
229
247
 
230
248
/*
231
 
 * Well-known context id, a logical context that contains
232
 
 * a set of well-known services.
 
249
 * Well-known context id, a logical context that contains a set of
 
250
 * well-known services. This context ID is now obsolete.
233
251
 */
234
252
#define VMCI_WELL_KNOWN_CONTEXT_ID 1
235
253
 
236
 
/* Todo: Change host context id to dynamic/random id. */
 
254
/*
 
255
 * Context ID used by host endpoints.
 
256
 */
237
257
#define VMCI_HOST_CONTEXT_ID  2
238
258
 
 
259
#define VMCI_CONTEXT_IS_VM(_cid) (VMCI_INVALID_ID != _cid && \
 
260
                                  _cid > VMCI_HOST_CONTEXT_ID)
 
261
 
239
262
/*
240
263
 * The VMCI_CONTEXT_RESOURCE_ID is used together with VMCI_MAKE_HANDLE to make
241
264
 * handles that refer to a specific context.
296
319
#define VMCI_ERROR_BUSMEM_INVALIDATION   (-37)
297
320
#define VMCI_ERROR_MODULE_NOT_LOADED     (-38)
298
321
#define VMCI_ERROR_DEVICE_NOT_FOUND      (-39)
 
322
#define VMCI_ERROR_QUEUEPAIR_NOT_READY   (-40)
 
323
#define VMCI_ERROR_WOULD_BLOCK           (-41)
299
324
 
300
325
/* VMCI clients should return error code withing this range */
301
326
#define VMCI_ERROR_CLIENT_MIN     (-500)
314
339
#define VMCI_EVENT_QP_RESUMED     2  // Only applicable to guest endpoints
315
340
#define VMCI_EVENT_QP_PEER_ATTACH 3  // Applicable to guest and host
316
341
#define VMCI_EVENT_QP_PEER_DETACH 4  // Applicable to guest and host
317
 
#define VMCI_EVENT_MEM_ACCESS_ON  5  // Only applicable to VMX endpoints
318
 
#define VMCI_EVENT_MEM_ACCESS_OFF 6  // Only applicable to VMX endpoints
 
342
#define VMCI_EVENT_MEM_ACCESS_ON  5  // Applicable to VMX and vmk.  On vmk,
 
343
                                     // this event has the Context payload type.
 
344
#define VMCI_EVENT_MEM_ACCESS_OFF 6  // Applicable to VMX and vmk.  Same as
 
345
                                     // above for the payload type.
319
346
#define VMCI_EVENT_MAX            7
320
347
 
321
348
/*
329
356
#define VMCI_EVENT_VALID_VMX(_event) (_event == VMCI_EVENT_MEM_ACCESS_ON || \
330
357
                                      _event == VMCI_EVENT_MEM_ACCESS_OFF)
331
358
 
 
359
#if defined(VMX86_SERVER)
 
360
#define VMCI_EVENT_VALID(_event) (_event < VMCI_EVENT_MAX)
 
361
#else // VMX86_SERVER
332
362
#define VMCI_EVENT_VALID(_event) (_event < VMCI_EVENT_MAX && \
333
363
                                  !VMCI_EVENT_VALID_VMX(_event))
 
364
#endif // VMX86_SERVER
334
365
 
335
366
/* Reserved guest datagram resource ids. */
336
367
#define VMCI_EVENT_HANDLER 0