|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4] x86: use VMLOAD for PV context switch
>>> On 04.10.18 at 13:58, <andrew.cooper3@xxxxxxxxxx> wrote:
> 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().
Yeah, I have changed this already in what will (would) become v5,
along with the optimization condition you had pointed out is not
in line with the comment next to it.
> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Thanks. I guess I'll post v5 and give it a day before committing,
just in case.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |