>>> On 01.03.18 at 16:47, wrote:
> On 07/12/17 10:45, Jan Beulich wrote:
> On 06.12.17 at 20:34, wrote:
>>> On 06/12/17 16:37, Jan Beulich wrote:
@@ -196,6 +215,19 @@ static inline void wrgsbase(unsigned lon
wrmsrl(MSR_GS_BASE, base);
}
+static inline void
On 07/12/17 10:45, Jan Beulich wrote:
On 06.12.17 at 20:34, wrote:
>> On 06/12/17 16:37, Jan Beulich wrote:
>>> @@ -172,6 +173,24 @@ static inline unsigned long rdgsbase(voi
>>> return base;
>>> }
>>>
>>> +static inline unsigned long rdgsshadow(void)
>>> +{
>>> +unsigned long base
>>> On 06.12.17 at 20:34, wrote:
> On 06/12/17 16:37, Jan Beulich wrote:
>> @@ -172,6 +173,24 @@ static inline unsigned long rdgsbase(voi
>> return base;
>> }
>>
>> +static inline unsigned long rdgsshadow(void)
>> +{
>> +unsigned long base;
>> +
>> +alternative_io("mov %[msr], %%ec
On 06/12/17 16:37, Jan Beulich wrote:
> --- a/xen/include/asm-x86/msr.h
> +++ b/xen/include/asm-x86/msr.h
> @@ -8,6 +8,7 @@
> #include
> #include
> #include
> +#include
> #include
> #include
>
> @@ -172,6 +173,24 @@ static inline unsigned long rdgsbase(voi
> return base;
> }
>
Instead of using RDMSR/WRMSR, on fsgsbase-capable systems use a double
SWAPGS combined with RDGSBASE/WRGSBASE. This halves execution time for
a shadow GS update alone on my Haswell (and we have indications of
good performance improvements by this on Skylake too), while the win is
even higher when e