[COMMIT master] Move invlpg() into library code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gleb Natapov <gleb@xxxxxxxxxx>

Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx>
Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>

diff --git a/lib/x86/processor.h b/lib/x86/processor.h
index 8fb70cd..f69f9ff 100644
--- a/lib/x86/processor.h
+++ b/lib/x86/processor.h
@@ -290,4 +290,8 @@ static inline void irq_enable(void)
     asm volatile("sti");
 }
 
+static inline void invlpg(void *va)
+{
+	asm volatile("invlpg (%0)" ::"r" (va) : "memory");
+}
 #endif
diff --git a/x86/access.c b/x86/access.c
index c643f5c..7c8b9a5 100644
--- a/x86/access.c
+++ b/x86/access.c
@@ -202,11 +202,6 @@ int ac_test_bump(ac_test_t *at)
     return ret;
 }
 
-void invlpg(void *addr)
-{
-    asm volatile ("invlpg (%0)" : : "r"(addr));
-}
-
 pt_element_t ac_test_alloc_pt(ac_pool_t *pool)
 {
     pt_element_t ret = pool->pt_pool + pool->pt_pool_current;
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Walks]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux