[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrX0CB_+QvDH3B8fYdH+ekRRX-i=jZU7zQ8qYbGzDrM-uQ@mail.gmail.com>
Date: Fri, 2 Mar 2018 20:18:18 +0000
From: Andy Lutomirski <luto@...nel.org>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
Cc: kvm list <kvm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH RFC 1/3] x86/kvm/vmx: read MSR_FS_BASE from current->thread
On Fri, Mar 2, 2018 at 10:55 AM, Vitaly Kuznetsov <vkuznets@...hat.com> wrote:
> vmx_save_host_state() is only called from kvm_arch_vcpu_ioctl_run() so
> the context is pretty well defined
>
True.
> and MSR_FS_BASE should always be
> equal to current->thread.fsbase.
Not true. current->thread.fsbase is almost entirely undefined in this
context. What you *could* do is export save_fsgs() and call it first.
When FSGSBASE support lands (which will happen eventually!), the code
in your patch will be completely wrong.
Admittedly, your patch isn't 100% bogus, but the reason is subtle and
you need lots of comments there *and* in save_fsgs().
Powered by blists - more mailing lists