KVM: VMX: Conditionally reload debug register 6
authorAvi Kivity <avi@redhat.com>
Tue, 1 Sep 2009 13:06:25 +0000 (16:06 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 15:11:06 +0000 (18:11 +0300)
commite8a48342e9bc1c65ffe4bb3b3ac964e726dbd4c0
treea669d0c24552f924ad7d1ee463ceb823a60bdd30
parent3d53c27d05950390712f92c5ad1604c60190ed64
KVM: VMX: Conditionally reload debug register 6

Only reload debug register 6 if we're running with the guest's
debug registers.  Saves around 150 cycles from the guest lightweight
exit path.

dr6 contains a couple of bits that are updated on #DB, so intercept
that unconditionally and update those bits then.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c