KVM: SVM: Move fs/gs/ldt save/restore to heavyweight exit path
authorAvi Kivity <avi@redhat.com>
Thu, 21 Oct 2010 10:20:33 +0000 (12:20 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:23:33 +0000 (11:23 +0200)
commitdacccfdd6bb386ec0714e1fec250c4b7d0aaccc9
tree95067709061a1cc268b5bf36efe5150078dc222d
parentafe9e66f8233e33e16fcc5b855070e45978f919e
KVM: SVM: Move fs/gs/ldt save/restore to heavyweight exit path

ldt is never used in the kernel context; same goes for fs (x86_64) and gs
(i386).  So save/restore them in the heavyweight exit path instead
of the lightweight path.

By itself, this doesn't buy us much, but it paves the way for moving vmload
and vmsave to the heavyweight exit path, since they modify the same registers.

[jan: fix copy/pase mistake on i386]

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/svm.c