PERFORCE change 213975 for review
John Baldwin
jhb at FreeBSD.org
Fri Jul 6 12:23:24 UTC 2012
http://p4web.freebsd.org/@@213975?ac=10
Change 213975 by jhb at jhb_jhbbsd on 2012/07/06 12:22:19
Cleanup.
Affected files ...
.. //depot/projects/smpng/sys/modules/x86dis/x86dis.c#8 edit
Differences ...
==== //depot/projects/smpng/sys/modules/x86dis/x86dis.c#8 (text+ko) ====
@@ -1,8 +1,6 @@
#include <sys/types.h>
#include <machine/cpufunc.h>
-#define NEW_AS
-
static __inline void
xrstor(char *addr, uint64_t mask)
{
@@ -69,7 +67,6 @@
void
isn_list(char *addr, uint32_t reg, uint64_t mask, uint64_t val)
{
-#if 0
uint32_t aux;
rdtscp(&aux);
@@ -82,22 +79,6 @@
mfence();
__asm __volatile("sfence" ::: "memory");
clflush((u_long)addr);
-#endif
- /*
- * TODO:
- * * invept
- * * invvpid
- * * vmcall
- * * vmclear
- * * vmlaunch
- * * vmresume
- * * vmptrld
- * * vmptrst
- * * vmread
- * * vmwrite
- * * vmxoff
- * * vmxon
- */
__asm __volatile("cbw");
__asm __volatile("cwde");
__asm __volatile("cdqe");
@@ -109,15 +90,8 @@
__asm __volatile("cmpxchg8b %0" : "+m" (*addr));
__asm __volatile("cmpxchg16b %0" : "+m" (*addr));
__asm __volatile("rep stosl");
-#ifdef NEW_AS
__asm __volatile("invept %0,%1" :: "m" (*addr), "r" ((uint64_t)reg));
__asm __volatile("invvpid %0,%1" :: "m" (*addr), "r" ((uint64_t)reg));
-#else
- /* invept (%rdi),%rax */
- __asm __volatile(".byte 0x66,0x0f,0x38,0x80,0x07" :: "D" (*addr), "a" (reg));
- /* invvpid (%rdi),%rax */
- __asm __volatile(".byte 0x66,0x0f,0x38,0x81,0x07" :: "D" (*addr), "a" (reg));
-#endif
__asm __volatile("vmcall");
__asm __volatile("vmclear %0" : "=m" (*addr));
__asm __volatile("vmlaunch");
More information about the p4-projects
mailing list