KVM: VMX: Fix host GDT.LIMIT corruption
authorAvi Kivity <avi@redhat.com>
Thu, 28 Oct 2010 18:48:12 +0000 (16:48 -0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Nov 2010 18:47:33 +0000 (10:47 -0800)
commitffc109c28a6a4cb5047df82b1d18ad7a13d3e247
treeac75613711d4bf998430a810fc379b6bdc5d8257
parentdbd877e34acf443e11c09361d0eaeaade441de86
KVM: VMX: Fix host GDT.LIMIT corruption

commit 3444d7da1839b851eefedd372978d8a982316c36 upstream.

vmx does not restore GDT.LIMIT to the host value, instead it sets it to 64KB.
This means host userspace can learn a few bits of host memory.

Fix by reloading GDTR when we load other host state.

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>
arch/x86/kvm/vmx.c