]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Mon, 22 Aug 2011 19:50:49 +0000 (12:50 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 22 Aug 2011 19:50:49 +0000 (12:50 -0700)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/vm_version.h
open-vm-tools/lib/include/vmci_defs.h
open-vm-tools/modules/linux/shared/vmci_defs.h
open-vm-tools/modules/linux/shared/vmci_infrastructure.h
open-vm-tools/modules/linux/vmci/common/vmciEvent.c

index 422f3f3ec0102791ff988d55ec77ee98e7ca1885..8c977e00607951912cebcc9bcacc7da08b26947c 100644 (file)
@@ -92,7 +92,7 @@
    #define PRODUCT_VERSION    1,1,5,PRODUCT_BUILD_NUMBER_NUMERIC
 #elif defined(VMX86_VPX)
    /* this should be kept in sync with the corresponding vpx branch. */
-   #define PRODUCT_VERSION    5,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
+   #define PRODUCT_VERSION    5,1,0,PRODUCT_BUILD_NUMBER_NUMERIC
 #elif defined(VMX86_BOOMERANG)
    #define PRODUCT_VERSION    1,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
 #else
  * VMI 2.0      : 3.1.0
  * P2VA 3.0     : 3.?.?
  */
-#define VIE_FILEVERSION 5,0,0,PRODUCT_BUILD_NUMBER_NUMERIC
+#define VIE_FILEVERSION 5,1,0,PRODUCT_BUILD_NUMBER_NUMERIC
 
 /*
  * This string can be a little more "free form".  The license
 #define BOOMERANG_VERSION "e.x.p"
 
 // These must match VIE_FILEVERSION above
-#define SYSIMAGE_VERSION "5.0.0"
+#define SYSIMAGE_VERSION "5.1.0"
 #define SYSIMAGE_FILE_VERSION VIE_FILEVERSION
 
 #define VCB_VERSION "4.0.0"
 #define VCB_FILE_VERSION 4,0,0,0
-#define VIM_VERSION "5.0.0"
-#define VPX_VERSION "5.0.0"
+#define VIM_VERSION "5.1.0"
+#define VPX_VERSION "5.1.0"
 #define VPX_RELEASE_UPDATE "0" /* 0 = Pre-release/GA, 1 = Update 1 */
 #define SVA_VERSION "1.0.0"
 #define SSO_VERSION "1.0.0"
-#define WBC_VERSION "5.0.0"
+#define WBC_VERSION "5.1.0"
 #define SDK_VERSION "4.1.0"
 #define FOUNDRY_VERSION "1.11.0"
 #define FOUNDRY_FILE_VERSION 1,11,0,PRODUCT_BUILD_NUMBER_NUMERIC
index 648c57541e6bb52f4473c6867253440d06672018..0c96ea34aeda7fe47a23e4374fdea9dc5fcf2840 100644 (file)
@@ -314,8 +314,10 @@ typedef uint32 VMCI_Event;
 #define VMCI_EVENT_QP_RESUMED     2  // Only applicable to guest endpoints
 #define VMCI_EVENT_QP_PEER_ATTACH 3  // Applicable to guest and host
 #define VMCI_EVENT_QP_PEER_DETACH 4  // Applicable to guest and host
-#define VMCI_EVENT_MEM_ACCESS_ON  5  // Only applicable to VMX endpoints
-#define VMCI_EVENT_MEM_ACCESS_OFF 6  // Only applicable to VMX endpoints
+#define VMCI_EVENT_MEM_ACCESS_ON  5  // Applicable to VMX and vmk.  On vmk,
+                                     // this event has the Context payload type.
+#define VMCI_EVENT_MEM_ACCESS_OFF 6  // Applicable to VMX and vmk.  Same as
+                                     // above for the payload type.
 #define VMCI_EVENT_MAX            7
 
 /*
@@ -329,8 +331,12 @@ typedef uint32 VMCI_Event;
 #define VMCI_EVENT_VALID_VMX(_event) (_event == VMCI_EVENT_MEM_ACCESS_ON || \
                                       _event == VMCI_EVENT_MEM_ACCESS_OFF)
 
+#if defined(VMX86_SERVER)
+#define VMCI_EVENT_VALID(_event) (_event < VMCI_EVENT_MAX)
+#else // VMX86_SERVER
 #define VMCI_EVENT_VALID(_event) (_event < VMCI_EVENT_MAX && \
                                   !VMCI_EVENT_VALID_VMX(_event))
+#endif // VMX86_SERVER
 
 /* Reserved guest datagram resource ids. */
 #define VMCI_EVENT_HANDLER 0
index 7f961543bec61ae9f1436cc678a6bf5696d85cf9..b07d7e85ad9228d2d04368ebfb4b51c489149b48 100644 (file)
@@ -314,8 +314,10 @@ typedef uint32 VMCI_Event;
 #define VMCI_EVENT_QP_RESUMED     2  // Only applicable to guest endpoints
 #define VMCI_EVENT_QP_PEER_ATTACH 3  // Applicable to guest and host
 #define VMCI_EVENT_QP_PEER_DETACH 4  // Applicable to guest and host
-#define VMCI_EVENT_MEM_ACCESS_ON  5  // Only applicable to VMX endpoints
-#define VMCI_EVENT_MEM_ACCESS_OFF 6  // Only applicable to VMX endpoints
+#define VMCI_EVENT_MEM_ACCESS_ON  5  // Applicable to VMX and vmk.  On vmk,
+                                     // this event has the Context payload type.
+#define VMCI_EVENT_MEM_ACCESS_OFF 6  // Applicable to VMX and vmk.  Same as
+                                     // above for the payload type.
 #define VMCI_EVENT_MAX            7
 
 /*
@@ -329,8 +331,12 @@ typedef uint32 VMCI_Event;
 #define VMCI_EVENT_VALID_VMX(_event) (_event == VMCI_EVENT_MEM_ACCESS_ON || \
                                       _event == VMCI_EVENT_MEM_ACCESS_OFF)
 
+#if defined(VMX86_SERVER)
+#define VMCI_EVENT_VALID(_event) (_event < VMCI_EVENT_MAX)
+#else // VMX86_SERVER
 #define VMCI_EVENT_VALID(_event) (_event < VMCI_EVENT_MAX && \
                                   !VMCI_EVENT_VALID_VMX(_event))
+#endif // VMX86_SERVER
 
 /* Reserved guest datagram resource ids. */
 #define VMCI_EVENT_HANDLER 0
index b10b609915e6528c27b24d5f11c8f4fbdbbfc30a..73e37c3c997264768f6ed5d7b4a0cf6d8c665640 100644 (file)
@@ -80,6 +80,7 @@ typedef struct VMCIDoorbellCptState {
 #define VMCI_DEV_QP_BREAK_SHARING 0x05  // DEPRECATED
 #define VMCI_DEV_RESTORE_SYNC     0x06
 #define VMCI_DEV_BMASTER_OFF      0x07
+#define VMCI_DEV_BMASTER_ON       0x08
 
 
 /*
index 31addc1631eaedf22bcccd7e5064081c8beeb649..878360cd26cec60ff4f108a72dbee2d8096abab9 100644 (file)
@@ -535,9 +535,25 @@ VMCIEventRegisterSubscription(VMCISubscription *sub,   // IN
       /*
        * In the vmkernel we defer delivery of events to a helper world.  This
        * makes the event delivery more consistent across hosts and guests with
-       * regard to which locks are held.
+       * regard to which locks are held.  Memory access events are an exception
+       * to this, since clients need to know immediately that the device
+       * memory is disabled (if we delay such events, then clients may be
+       * notified too late).
        */
-      sub->runDelayed = TRUE;
+      if (VMCI_EVENT_MEM_ACCESS_ON == event ||
+          VMCI_EVENT_MEM_ACCESS_OFF == event) {
+         /*
+          * Client must expect to get such events synchronously, and should
+          * perform its locking accordingly.  If it can't handle this, then
+          * fail.
+          */
+         if (flags & VMCI_FLAG_EVENT_DELAYED_CB) {
+            return VMCI_ERROR_INVALID_ARGS;
+         }
+         sub->runDelayed = FALSE;
+      } else {
+         sub->runDelayed = TRUE;
+      }
    } else if (!VMCI_CanScheduleDelayedWork()) {
       /*
        * If the platform doesn't support delayed work callbacks then don't