Re: [PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-15 Thread Paolo Bonzini
On 13/07/2018 19:10, Vitaly Kuznetsov wrote: >> Because bikeshedding is fun, what do you think about using fs_base and >> kernel_gs_base for these names? I have a series that touches this >> code and also adds local variables for {FS,GS}.base and {FS,GS}.sel. >> I used {fs,gs}_base and {fs,gs}_sel

Re: [PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-13 Thread Vitaly Kuznetsov
Sean Christopherson writes: > On Wed, Jul 11, 2018 at 07:37:18PM +0200, Vitaly Kuznetsov wrote: >> When we switched from doing rdmsr() to reading FS/GS base values from >> current->thread we completely forgot about legacy 32-bit userspaces which >> we still support in KVM (why?). task->thread.{fs

Re: [PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-13 Thread Sean Christopherson
On Wed, Jul 11, 2018 at 07:37:18PM +0200, Vitaly Kuznetsov wrote: > When we switched from doing rdmsr() to reading FS/GS base values from > current->thread we completely forgot about legacy 32-bit userspaces which > we still support in KVM (why?). task->thread.{fsbase,gsbase} are only > synced for

Re: [PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-12 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Wanpeng Li writes: > >> Test suite: MSR switch >> PASS: VM entry MSR load >> PASS: VM exit MSR store >> PASS: VM exit MSR load >> FAIL: VM entry MSR load: try to load FS_BASE >> SUMMARY: 4 tests, 1 unexpected failures >> >> kvm-unit-tests fails w/ and w/o the patch, ma

Re: [PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-12 Thread Vitaly Kuznetsov
Wanpeng Li writes: > On Thu, 12 Jul 2018 at 08:07, Vitaly Kuznetsov wrote: >> >> When we switched from doing rdmsr() to reading FS/GS base values from >> current->thread we completely forgot about legacy 32-bit userspaces which >> we still support in KVM (why?). task->thread.{fsbase,gsbase} are

Re: [PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-11 Thread Wanpeng Li
On Thu, 12 Jul 2018 at 08:07, Vitaly Kuznetsov wrote: > > When we switched from doing rdmsr() to reading FS/GS base values from > current->thread we completely forgot about legacy 32-bit userspaces which > we still support in KVM (why?). task->thread.{fsbase,gsbase} are only > synced for 64-bit pr

[PATCH] x86/kvm/vmx: don't read current->thread.{fs,gs}base of legacy tasks

2018-07-11 Thread Vitaly Kuznetsov
When we switched from doing rdmsr() to reading FS/GS base values from current->thread we completely forgot about legacy 32-bit userspaces which we still support in KVM (why?). task->thread.{fsbase,gsbase} are only synced for 64-bit processes, calling save_fsgs_for_kvm() and using its result from cu