On 26/09/18 08:42, Jan Beulich wrote: > @@ -1630,6 +1646,66 @@ static void svm_init_erratum_383(const s > } > } > > +#ifdef CONFIG_PV > +bool svm_load_segs(unsigned int ldt_ents, unsigned long ldt_base, > + unsigned int fs_sel, unsigned long fs_base, > + unsigned int gs_sel, unsigned long gs_base, > + unsigned long gs_shadow) > +{ > + unsigned int cpu = smp_processor_id(); > + struct vmcb_struct *vmcb = per_cpu(host_vmcb_va, cpu); > + > + if ( unlikely(!vmcb) ) > + return false; > + > + if ( !ldt_base ) > + { > + /* > + * The actual structure field used here was arbitrarily chosen. > + * Empirically it doesn't seem to matter much which element is used, > + * and a clear explanation of the otherwise poor performance has not > + * been found/provided so far. > + */ > + asm volatile ( "prefetch %0" :: "m" (vmcb->ldtr) );
prefetchw(). Otherwise, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel