Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andrew Cooper
On 08/04/16 23:06, Andy Lutomirski wrote: > On Fri, Apr 8, 2016 at 10:12 AM, Paolo Bonzini wrote: >> >> On 08/04/2016 18:00, Andy Lutomirski wrote: >>> But %ss can be loaded with 0 on 64-bit kernels. (I assume that >>> loading 0 into %ss sets SS.DPL to 0 if done at CPL0, but

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andrew Cooper
On 08/04/16 23:06, Andy Lutomirski wrote: > On Fri, Apr 8, 2016 at 10:12 AM, Paolo Bonzini wrote: >> >> On 08/04/2016 18:00, Andy Lutomirski wrote: >>> But %ss can be loaded with 0 on 64-bit kernels. (I assume that >>> loading 0 into %ss sets SS.DPL to 0 if done at CPL0, but I'm vague on >>>

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andy Lutomirski
On Fri, Apr 8, 2016 at 10:12 AM, Paolo Bonzini wrote: > > > On 08/04/2016 18:00, Andy Lutomirski wrote: >> But %ss can be loaded with 0 on 64-bit kernels. (I assume that >> loading 0 into %ss sets SS.DPL to 0 if done at CPL0, but I'm vague on >> this, since it only really

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andy Lutomirski
On Fri, Apr 8, 2016 at 10:12 AM, Paolo Bonzini wrote: > > > On 08/04/2016 18:00, Andy Lutomirski wrote: >> But %ss can be loaded with 0 on 64-bit kernels. (I assume that >> loading 0 into %ss sets SS.DPL to 0 if done at CPL0, but I'm vague on >> this, since it only really matters to hypervisor

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Paolo Bonzini
On 08/04/2016 18:00, Andy Lutomirski wrote: > But %ss can be loaded with 0 on 64-bit kernels. (I assume that > loading 0 into %ss sets SS.DPL to 0 if done at CPL0, but I'm vague on > this, since it only really matters to hypervisor code AFAIK.) It's even simpler, unless CPL=0 SS cannot be

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Paolo Bonzini
On 08/04/2016 18:00, Andy Lutomirski wrote: > But %ss can be loaded with 0 on 64-bit kernels. (I assume that > loading 0 into %ss sets SS.DPL to 0 if done at CPL0, but I'm vague on > this, since it only really matters to hypervisor code AFAIK.) It's even simpler, unless CPL=0 SS cannot be

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andy Lutomirski
On Fri, Apr 8, 2016 at 1:01 AM, Andrew Cooper wrote: > On 08/04/2016 01:24, Andy Lutomirski wrote: >> I can't see any reason that we need the __KERNEL_DS segment at all -- >> I think that everything that uses __KERNEL_DS could use __USER_DS >> instead. Am I missing

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andy Lutomirski
On Fri, Apr 8, 2016 at 1:01 AM, Andrew Cooper wrote: > On 08/04/2016 01:24, Andy Lutomirski wrote: >> I can't see any reason that we need the __KERNEL_DS segment at all -- >> I think that everything that uses __KERNEL_DS could use __USER_DS >> instead. Am I missing anything? This has been

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andrew Cooper
On 08/04/2016 01:24, Andy Lutomirski wrote: > I can't see any reason that we need the __KERNEL_DS segment at all -- > I think that everything that uses __KERNEL_DS could use __USER_DS > instead. Am I missing anything? This has been bugging me for a > while. > > I mulled over this a bit when

Re: [Xen-devel] Does __KERNEL_DS serve a purpose?

2016-04-08 Thread Andrew Cooper
On 08/04/2016 01:24, Andy Lutomirski wrote: > I can't see any reason that we need the __KERNEL_DS segment at all -- > I think that everything that uses __KERNEL_DS could use __USER_DS > instead. Am I missing anything? This has been bugging me for a > while. > > I mulled over this a bit when