/*********************************************************
- * Copyright (C) 2013-2020 VMware, Inc. All rights reserved.
+ * Copyright (C) 2013-2021 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
X86MSR_GetMSR(MSR_BIOS_SIGN_ID))
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CLFLUSH --
+ *
+ * Wrapper around the CLFLUSH instruction.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * See CLFLUSH instruction in Intel SDM or AMD Programmer's Manual.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static INLINE void
+CLFLUSH(const void *addr)
+{
+#ifdef __GNUC__
+ __asm__ __volatile__(
+ "clflush %0"
+ :: "m" (*(uint8 *)addr));
+#elif defined _MSC_VER
+ _mm_clflush(addr);
+#else
+#error No compiler defined for CLFLUSH
+#endif
+}
+
+
/*
*-----------------------------------------------------------------------------
*