VMCI renaming: upper case to lower case.

 Changes to be committed:
	modified:   drivers/misc/vmw_vmci/vmci_context.c
	modified:   drivers/misc/vmw_vmci/vmci_datagram.c
	modified:   drivers/misc/vmw_vmci/vmci_doorbell.c
	modified:   drivers/misc/vmw_vmci/vmci_driver.c
	modified:   drivers/misc/vmw_vmci/vmci_driver.h
	modified:   drivers/misc/vmw_vmci/vmci_event.c
	modified:   drivers/misc/vmw_vmci/vmci_queue_pair.c
	modified:   drivers/misc/vmw_vmci/vmci_route.c
	modified:   include/linux/vmw_vmci_api.h
	modified:   include/linux/vmw_vmci_defs.h
	modified:   net/Makefile
	modified:   net/vmw_vsock/Makefile
	modified:   net/vmw_vsock/af_vsock.c
	modified:   net/vmw_vsock/notify.c
	modified:   net/vmw_vsock/notifyQState.c
	modified:   net/vmw_vsock/stats.h
	modified:   net/vmw_vsock/vmciKernelAPI1.h
	modified:   net/vmw_vsock/vmciKernelAPI2.h
	modified:   net/vmw_vsock/vsockVmci.h
Linux syntax checking fix.

Changes to be committed:
	modified:   net/vmw_vsock/af_vsock.c
	modified:   net/vmw_vsock/notify.c
	modified:   net/vmw_vsock/vmciKernelAPI1.h
VMCI: clean up handle array implementation

Switch to using size_t in most places, replace ASSERT with BUG_ON and
use zero-sized entries array to avoid confusing size calculations.

Also remove include/linux/slab.h from vmci_handle_array.h where it is
not needed and add it to files that actually need it.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
VMCI: convert operations on context list to RCU

Instead of taking a lock on context list when firing notifications
let's use RCU walk.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
VMCI: use kuid_t when checking context ownership

Data returned by current_uid() is of type kuid_t, which, when strict
checking is active, is incompatible with uid_t that we are using. Also
we need to hold on to user's credentials (and thus user namespace),
so let's store 'sturct cred *' instead of uid_t as context owner.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
VSOCK: use kuid_t when checking VMCI context ownership

Similarly to VMCI we need to hold on to user's credentials and use
kuid_t instead of uid_t when checking ownership.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
VMCI: make vmci_is_context_owner return bool

We do not really need multitude of return values, uid either considered
an owner or it is not.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
VSOCK: rename CONFIG_VSOCK to CONFIG_VMWARE_VSOCK

Need to make sure net/Makefile, net/vmw_vsock/Makefile, and
net/vmw_vsock/Kconfig all agree with each other

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
VMCI: Fix VMCI context locking.

Dmitry noticed this.  Seems like we're holding the context list lock
here, when we should be holding the context lock (or possibly not
holding any lock, but we'll start with this).

Signed-off-by: Andy King <acking@vmware.com>
VMCI: Rename ctx variable (was: Fix VMCI context locking)

Rename ctx to context.

Signed-off-by: Andy King <acking@vmware.com>
Fix event soft lockup in vmci/vsock

We make the silly mistake of assuming in our QP event CBs that we are in
BH context, because we didn't ask for a delayed CB.  But in this case,
VMCI doesn't make any guarantees about what context we are in, it could
be BH or process, we don't know.  Fixed so that we don't make this silly
assumption.

Signed-off-by: Andy King <acking@vmware.com>
vsock: Remove dependencies on VMware atomics, asserts, and asm functions.

Remove vm_assert.h, vm_atomic.h and vm_basic_asm*.h

Add defines for the ASSERTs:

Fix atomic types:

Atomic_uint64 ==> atomic64_t
Atomic_uint32 ==> atomic_t
Atomic_Read64 ==> atomic64_read
Atomic_Read32 ==> atomic_read
Atomic_Write64 ==> atomic64_set
Atomic_Write32 ==> atomic_set
Atomic_MFence ==> smp_mb

Get rid of most significant bit asm call:

mssb32(x) ==> x ? fls(x) + 1 : 0
vsock - remove vm_basic_types and vm_basic_defs

This changes vmware types to linux types, for example uint32 to u32.
Updated to address Dmitry's comments about u32/s32 where it's not
really needed for things like loop variables.
Merge branch 'master' of ssh://git.eng.vmware.com/vmci_upstreaming_devel
vsock - remove shared vmci_infrastructure.h

Remove shared/vmci_infrastructure.h and bring the rest of the headers
under shared into closer alignment with the real vmci headers in
include/linux.  The goal is to remove the files under shared completely,
so the majority of this change is simply getting rid of fluff in the
headers that vsock doesn't need.  What remains needs to be reconciled
with the real vmci headers.  Originally, this change was going to do
the reconciliation, but the real headers have been modified to remove
things that are required for vsock, so the process is going to require
a merge instead of just reworking vsock.
vsock - remove the rest of the headers in shared

Reconcile differences between the vmci headers in include/linux
and the headers that were under shared, and removed the shared headers.
This is primarily adding IOCTL constants that were previously missing
from the vmci headers, adding simple typedefs, and changing complex
typedefs to use struct.  Also remove the vmciKernelAPI headers,
since they duplicate what's already in vmw_vmci_api.h.
Merge branch 'master' of ssh://git.eng.vmware.com/vmci_upstreaming_devel
vmci - fix camelcase in local symbols.

Verified vmci and vsock both still compile.  Tweaked a lot of things
by hand that the automated scripts didn't get quite right.
vmci - change uintX_t to uX

Simple mechanical change:

   s/uint8_t/u8/g
   s/uint16_t/u16/g
   s/uint32_t/u32/g
   s/uint64_t/u64/g
   s/int32_t/s32/g
   s/int64_t/s64/g

As a bonus, fix the formatting of the gigantic switch statement in
vmci_driver.c that got messed up in the last change.
vsock - fix indentation in case statements

The indent formatter adds an extra level of indentation when it
sees a squirrely brace after a 'case':

	switch (foo) {

	case X:{
			/* Get's indented too far because of the '{' */
			break;
	}

	default:
		break;

	}

That happened in a couple of places in vsock, so let's fix them.

While we're at it, also reformat some comments to make them more
consistent.