KVM: x86: Clear DR7.LE during task-switch
authorNadav Amit <namit@cs.technion.ac.il>
Thu, 2 Oct 2014 22:10:02 +0000 (01:10 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Nov 2014 11:07:25 +0000 (12:07 +0100)
commit0e8a09969afb56b6bcdfe159f90a5fa20f831e85
tree3d0d9be9187fa2d59d7d466fdc14b4d84eebe9d5
parent518547b32ab41b12c1303d12e6e15fb1621dca4c
KVM: x86: Clear DR7.LE during task-switch

DR7.LE should be cleared during task-switch. This feature is poorly documented.
For reference, see:
http://pdos.csail.mit.edu/6.828/2005/readings/i386/s12_02.htm

SDM [17.2.4]:
  This feature is not supported in the P6 family processors, later IA-32
  processors, and Intel 64 processors.

AMD [2:13.1.1.4]:
  This bit is ignored by implementations of the AMD64 architecture.

Intel's formulation could mean that it isn't even zeroed, but current
hardware indeed does not behave like that.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c