From: VMware, Inc <> Date: Wed, 18 Sep 2013 03:19:27 +0000 (-0700) Subject: Flip the kill-switch on VM2VM VMCI X-Git-Tag: 2013.09.16-1328054~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0910f4ac428e00cad83893f6fbe68e928666466e;p=thirdparty%2Fopen-vm-tools.git Flip the kill-switch on VM2VM VMCI VM2VM VMCI made a reappearance in 5.5 because vHadoop was planning to use it, but it was eventually rejected. We left the code in so as not to disturb stability, and simply disabled it in the UI. But let's make doubly sure by flipping the kill-switch, so that our customers don't accidentally enable it and then complain about it being removed from 5.1, coming back in 5.5 and then disappearing again. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/include/vmci_defs.h b/open-vm-tools/lib/include/vmci_defs.h index 7e752fb8d..cc4298914 100644 --- a/open-vm-tools/lib/include/vmci_defs.h +++ b/open-vm-tools/lib/include/vmci_defs.h @@ -90,10 +90,10 @@ typedef enum VMCIIntrType { /* - * A single VMCI device has an upper limit of 1024MB on the amount of + * A single VMCI device has an upper limit of 128 MiB on the amount of * memory that can be used for queue pairs. */ -#define VMCI_MAX_GUEST_QP_MEMORY (1024 * 1024 * 1024) +#define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024) /* * Queues with pre-mapped data pages must be small, so that we don't pin diff --git a/open-vm-tools/modules/linux/shared/vmci_defs.h b/open-vm-tools/modules/linux/shared/vmci_defs.h index 1b291d00e..c08433591 100644 --- a/open-vm-tools/modules/linux/shared/vmci_defs.h +++ b/open-vm-tools/modules/linux/shared/vmci_defs.h @@ -90,10 +90,10 @@ typedef enum VMCIIntrType { /* - * A single VMCI device has an upper limit of 1024MB on the amount of + * A single VMCI device has an upper limit of 128 MiB on the amount of * memory that can be used for queue pairs. */ -#define VMCI_MAX_GUEST_QP_MEMORY (1024 * 1024 * 1024) +#define VMCI_MAX_GUEST_QP_MEMORY (128 * 1024 * 1024) /* * Queues with pre-mapped data pages must be small, so that we don't pin diff --git a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c index 921105ad9..bdd74d909 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciQueuePair.c @@ -1053,7 +1053,7 @@ VMCIQPBrokerCreate(VMCIHandle handle, // IN } isVM2VM = VMCI_CONTEXT_IS_VM(contextId) && VMCI_CONTEXT_IS_VM(peer); - if (!vmkernel && isVM2VM) { + if (isVM2VM) { VMCI_DEBUG_LOG(5, ("QP Create - VM2VM\n")); return VMCI_ERROR_DST_UNREACHABLE; } @@ -1269,7 +1269,7 @@ VMCIQPBrokerAttach(QPBrokerEntry *entry, // IN ASSERT(entry->attachId == VMCI_INVALID_ID); isVM2VM = VMCI_CONTEXT_IS_VM(contextId) && VMCI_CONTEXT_IS_VM(entry->createId); - if (!vmkernel && isVM2VM) { + if (isVM2VM) { VMCI_DEBUG_LOG(5, ("QP Attach - VM2VM\n")); return VMCI_ERROR_DST_UNREACHABLE; } diff --git a/open-vm-tools/modules/linux/vmci/common/vmciRoute.c b/open-vm-tools/modules/linux/vmci/common/vmciRoute.c index 6dd1eb9d9..b73d38670 100644 --- a/open-vm-tools/modules/linux/vmci/common/vmciRoute.c +++ b/open-vm-tools/modules/linux/vmci/common/vmciRoute.c @@ -219,9 +219,7 @@ VMCI_Route(VMCIHandle *src, // IN/OUT ASSERT(VMCI_CONTEXT_IS_VM(dst->context)); - if (!vmkernel) { - return VMCI_ERROR_DST_UNREACHABLE; - } + return VMCI_ERROR_DST_UNREACHABLE; } /* Pass it up to the guest. */