Signed-off-by: Barret Rhoden <[email protected]>
---
 kern/arch/x86/arch.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/kern/arch/x86/arch.h b/kern/arch/x86/arch.h
index 8edd5a8713d5..9865bb2852a7 100644
--- a/kern/arch/x86/arch.h
+++ b/kern/arch/x86/arch.h
@@ -32,6 +32,7 @@ static inline void reboot(void)
               __attribute__((always_inline)) __attribute__((noreturn));
 static inline void prefetch(void *addr);
 static inline void prefetchw(void *addr);
+static inline void swap_gs(void);
 
 /* in trap.c */
 void send_ipi(uint32_t os_coreid, uint8_t vector);
@@ -187,3 +188,8 @@ static inline uint64_t max_guest_pa(void)
 {
        return (1ULL<<40) - 1;
 }
+
+static inline void swap_gs(void)
+{
+       asm volatile ("swapgs");
+}
-- 
2.6.0.rc2.230.g3dd15c0

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to