提交 5785c17f 编写于 作者: R Richard Henderson

tcg/i386: Add setup_guest_base_seg for FreeBSD

Reviewed-by: NEmilio G. Cota <cota@braap.org>
Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
上级 913c2bdd
......@@ -1876,6 +1876,15 @@ static inline int setup_guest_base_seg(void)
}
return 0;
}
# elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
# include <machine/sysarch.h>
static inline int setup_guest_base_seg(void)
{
if (sysarch(AMD64_SET_GSBASE, &guest_base) == 0) {
return P_GS;
}
return 0;
}
# else
static inline int setup_guest_base_seg(void)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册