]> xenbits.xensource.com Git - xen.git/commitdiff
x86/svm/asid: Introduce svm_invlpga()
authorChristoph Egger <Christoph.Egger@amd.com>
Wed, 13 Apr 2011 13:14:59 +0000 (14:14 +0100)
committerChristoph Egger <Christoph.Egger@amd.com>
Wed, 13 Apr 2011 13:14:59 +0000 (14:14 +0100)
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
xen/include/asm-x86/hvm/svm/asid.h
xen/include/asm-x86/hvm/svm/svm.h

index a484f3eff3b567dbe9799fb8f2478a89e4f5e657..356a1cd0230458cd47df795cc2d7d915ae348ce0 100644 (file)
@@ -34,10 +34,7 @@ static inline void svm_asid_g_invlpg(struct vcpu *v, unsigned long g_vaddr)
 {
 #if 0
     /* Optimization? */
-    asm volatile (".byte 0x0F,0x01,0xDF    \n"
-                  : /* output */
-                  : /* input */
-                  "a" (g_vaddr), "c"(v->arch.hvm_svm.vmcb->guest_asid) );
+    svm_invlpga(g_vaddr, v->arch.hvm_svm.vmcb->guest_asid);
 #endif
 
     /* Safe fallback. Take a new ASID. */
index 920c9e29d35a30163b8d3b06c12a23f28c7c944f..9f0afd8478a96b46149452d6c728a99df13eb7c7 100644 (file)
@@ -60,6 +60,15 @@ static inline void svm_vmsave(void *vmcb)
         : : "a" (__pa(vmcb)) : "memory" );
 }
 
+static inline void svm_invlpga(unsigned long vaddr, uint32_t asid)
+{
+    asm volatile (
+        ".byte 0x0f,0x01,0xdf"
+        : /* output */
+        : /* input */
+        "a" (vaddr), "c" (asid));
+}
+
 unsigned long *svm_msrbit(unsigned long *msr_bitmap, uint32_t msr);
 void __update_guest_eip(struct cpu_user_regs *regs, unsigned int inst_len);