From: VMware, Inc <> Date: Mon, 22 Aug 2011 19:50:49 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.08.21-471295~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4904cb3fc069cafb09d8213192a80ea06030cd04;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/vm_version.h b/open-vm-tools/lib/include/vm_version.h index 422f3f3ec..8c977e006 100644 --- a/open-vm-tools/lib/include/vm_version.h +++ b/open-vm-tools/lib/include/vm_version.h @@ -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 @@ -123,7 +123,7 @@ * 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 @@ -215,17 +215,17 @@ #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 diff --git a/open-vm-tools/lib/include/vmci_defs.h b/open-vm-tools/lib/include/vmci_defs.h index 648c57541..0c96ea34a 100644 --- a/open-vm-tools/lib/include/vmci_defs.h +++ b/open-vm-tools/lib/include/vmci_defs.h @@ -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 diff --git a/open-vm-tools/modules/linux/shared/vmci_defs.h b/open-vm-tools/modules/linux/shared/vmci_defs.h index 7f961543b..b07d7e85a 100644 --- a/open-vm-tools/modules/linux/shared/vmci_defs.h +++ b/open-vm-tools/modules/linux/shared/vmci_defs.h @@ -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 diff --git a/open-vm-tools/modules/linux/shared/vmci_infrastructure.h b/open-vm-tools/modules/linux/shared/vmci_infrastructure.h index b10b60991..73e37c3c9 100644 --- a/open-vm-tools/modules/linux/shared/vmci_infrastructure.h +++ b/open-vm-tools/modules/linux/shared/vmci_infrastructure.h @@ -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 /* diff --git a/open-vm-tools/modules/linux/vmci/common/vmciEvent.c b/open-vm-tools/modules/linux/vmci/common/vmciEvent.c index 31addc163..878360cd2 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciEvent.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciEvent.c @@ -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