From 4b46e7be783df641b2889e514e85643febd378c2 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 11 Oct 2013 09:30:31 +0200 Subject: x86: use {rd,wr}{fs,gs}base when available ... as being intended to be faster than MSR reads/writes. In the case of emulate_privileged_op() also use these in favor of the cached (but possibly stale) addresses from arch.pv_vcpu. This allows entirely removing the code that was the subject of XSA-67. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Acked-by: Keir Fraser --- xen/arch/x86/setup.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xen/arch/x86/setup.c') diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 637f1f97f8..30a4fd6b88 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1264,6 +1264,9 @@ void __init __start_xen(unsigned long mbi_p) if ( cpu_has_smep ) set_in_cr4(X86_CR4_SMEP); + if ( cpu_has_fsgsbase ) + set_in_cr4(X86_CR4_FSGSBASE); + local_irq_enable(); pt_pci_init(); -- cgit v1.2.3