Re: [RFC] KVM: SVM: ignore type when setting segment registers

2017-05-30 Thread Gi-Oh Kim
On Tue, May 30, 2017 at 8:03 PM, Matt Mullins wrote: > On Tue, May 30, 2017 at 02:54:21PM +0200, Radim Krčmář wrote: >> 2017-05-29 15:24+0200, Gioh Kim: >> > If so, why type is checked when setting segment registers? >> >> No idea. 19bca6ab75d8 ("KVM: SVM: Fix cross vendor migration issue with >>

Re: [RFC] KVM: SVM: ignore type when setting segment registers

2017-05-30 Thread Matt Mullins
On Tue, May 30, 2017 at 02:54:21PM +0200, Radim Krčmář wrote: > 2017-05-29 15:24+0200, Gioh Kim: > > If so, why type is checked when setting segment registers? > > No idea. 19bca6ab75d8 ("KVM: SVM: Fix cross vendor migration issue with > unusable bit") also moved the assigment up to initialize it

Re: [RFC] KVM: SVM: ignore type when setting segment registers

2017-05-30 Thread Gioh Kim
On Tue, May 30, 2017 at 02:54:21PM +0200, Radim Krčmář wrote: > 2017-05-29 15:24+0200, Gioh Kim: > > Current code sets unusable as 1 if present is 1 and type is 0. > > In Long mode, type value in segment descriptor is ignored. > > So I think type should be ignored when setting the segment registers

Re: [RFC] KVM: SVM: ignore type when setting segment registers

2017-05-30 Thread Radim Krčmář
2017-05-29 15:24+0200, Gioh Kim: > Current code sets unusable as 1 if present is 1 and type is 0. > In Long mode, type value in segment descriptor is ignored. > So I think type should be ignored when setting the segment registers, > if type means the descriptor type in the segment descriptor. > >

[RFC] KVM: SVM: ignore type when setting segment registers

2017-05-29 Thread Gioh Kim
Current code sets unusable as 1 if present is 1 and type is 0. In Long mode, type value in segment descriptor is ignored. So I think type should be ignored when setting the segment registers, if type means the descriptor type in the segment descriptor. Is the type field of struct kvm_segment the d