]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: Correct ordering of ldt reload wrt fs/gs reload
authorAvi Kivity <avi@redhat.com>
Tue, 19 Oct 2010 16:48:35 +0000 (18:48 +0200)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:09 +0000 (23:40 +0100)
commitd3f813da18f83a31f2678988b450e6a1c94c95ed
tree696f64f8f16b07f18c816a02f7756709b76d921f
parentbe6eb177af13eceaef0052a0628b7153844bbea9
KVM: Correct ordering of ldt reload wrt fs/gs reload

commit 0a77fe4c188e25917799f2356d4aa5e6d80c39a2 upstream.

If fs or gs refer to the ldt, they must be reloaded after the ldt.  Reorder
the code to that effect.

Userspace code that uses the ldt with kvm is nonexistent, so this doesn't fix
a user-visible bug.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c