Date: Fri, 6 Jul 2012 12:23:23 GMT From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 213975 for review Message-ID: <201207061223.q66CNNXV058764@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@213975?ac=10 Change 213975 by jhb@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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207061223.q66CNNXV058764>