[PATCH 4/5] x86/pv: Optimise to the segment context switching paths

2020-09-09 Thread Andrew Cooper
Save the segment selectors with explicit asm, rather than with read_sreg(). This permits the use of MOV's m16 encoding, which avoids indirecting the selector value through a register. For {save,load}_segments(), opencode the fs/gs helpers, as the optimiser is unable to rearrange the logic down to

Re: [PATCH 4/5] x86/pv: Optimise to the segment context switching paths

2020-09-11 Thread Jan Beulich
On 09.09.2020 11:59, Andrew Cooper wrote: > Save the segment selectors with explicit asm, rather than with read_sreg(). > This permits the use of MOV's m16 encoding, which avoids indirecting the > selector value through a register. Instead of this, how about making read_sreg() look like #define r

Re: [PATCH 4/5] x86/pv: Optimise to the segment context switching paths

2020-09-11 Thread Jan Beulich
On 11.09.2020 14:53, Andrew Cooper wrote: > On 11/09/2020 10:49, Jan Beulich wrote: >> On 09.09.2020 11:59, Andrew Cooper wrote: >>> Save the segment selectors with explicit asm, rather than with read_sreg(). >>> This permits the use of MOV's m16 encoding, which avoids indirecting the >>> selector

Re: [PATCH 4/5] x86/pv: Optimise to the segment context switching paths

2020-09-11 Thread Andrew Cooper
On 11/09/2020 10:49, Jan Beulich wrote: > On 09.09.2020 11:59, Andrew Cooper wrote: >> Save the segment selectors with explicit asm, rather than with read_sreg(). >> This permits the use of MOV's m16 encoding, which avoids indirecting the >> selector value through a register. > Instead of this, how