Re: [Xen-devel] [PATCH for-4.9] x86/vmx: Shorten vmx_{get, set}_segment_register() for user segments

2016-11-17 Thread Andrew Cooper
On 17/11/16 05:10, Tian, Kevin wrote: >> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] >> Sent: Wednesday, November 16, 2016 9:42 PM >> >> On 26/10/16 14:15, Andrew Cooper wrote: >>> The x86_segment enumeration matches hardware SReg encoding, which can be >>> used >>> to calculate the

Re: [Xen-devel] [PATCH for-4.9] x86/vmx: Shorten vmx_{get, set}_segment_register() for user segments

2016-11-16 Thread Tian, Kevin
> From: Andrew Cooper [mailto:andrew.coop...@citrix.com] > Sent: Wednesday, November 16, 2016 9:42 PM > > On 26/10/16 14:15, Andrew Cooper wrote: > > The x86_segment enumeration matches hardware SReg encoding, which can be > > used > > to calculate the appropriate VMCS fields, rather than open

Re: [Xen-devel] [PATCH for-4.9] x86/vmx: Shorten vmx_{get, set}_segment_register() for user segments

2016-11-16 Thread Andrew Cooper
On 26/10/16 14:15, Andrew Cooper wrote: > The x86_segment enumeration matches hardware SReg encoding, which can be used > to calculate the appropriate VMCS fields, rather than open coding every > instance. > > This reduces the size of the switch statement, and the number of embedded BUG > frames

[Xen-devel] [PATCH for-4.9] x86/vmx: Shorten vmx_{get, set}_segment_register() for user segments

2016-10-26 Thread Andrew Cooper
The x86_segment enumeration matches hardware SReg encoding, which can be used to calculate the appropriate VMCS fields, rather than open coding every instance. This reduces the size of the switch statement, and the number of embedded BUG frames from the __vm{read,write}() calls. In the unlikely