From: VMware, Inc <> Date: Wed, 18 Sep 2013 03:30:26 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2013.09.16-1328054~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c9c43caa766bfd6222ee994e9d97f0fefeeedf9;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/include/loglevel_user.h b/open-vm-tools/lib/include/loglevel_user.h index 3dec8d3ea..ef2476188 100644 --- a/open-vm-tools/lib/include/loglevel_user.h +++ b/open-vm-tools/lib/include/loglevel_user.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 1998-2003 VMware, Inc. All rights reserved. + * Copyright (C) 1998-2013 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -57,6 +57,7 @@ LOGLEVEL_VAR(serial), \ LOGLEVEL_VAR(parallel), \ LOGLEVEL_VAR(chipset), \ + LOGLEVEL_VAR(smram), \ LOGLEVEL_VAR(smc), \ LOGLEVEL_VAR(ich7m), \ LOGLEVEL_VAR(hpet), \ diff --git a/open-vm-tools/lib/include/vm_atomic.h b/open-vm-tools/lib/include/vm_atomic.h index af2f578cf..2a983c7d9 100644 --- a/open-vm-tools/lib/include/vm_atomic.h +++ b/open-vm-tools/lib/include/vm_atomic.h @@ -623,7 +623,9 @@ Atomic_ReadIfEqualWrite(Atomic_uint32 *var, // IN * The value of the atomic variable before the write. * * Side effects: - * The variable may be modified. + * The atomic variable may be modified. + * May return in transactional execution mode on TSX enabled CPUs + * IFF the atomic variable is modified. * *----------------------------------------------------------------------------- */ @@ -644,6 +646,10 @@ Atomic_ReadIfEqualWriteLockAcquire(Atomic_uint32 *var, // IN : "cc" ); AtomicEpilogue(); + if (val != oldVal) { + /* Leave transactional execution mode if TSX enabled. */ + __asm__ __volatile__("pause"); + } return val; #else return Atomic_ReadIfEqualWrite(var, oldVal, newVal);