vmx: restore debug registers when injecting #DB traps
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 15 Mar 2016 11:19:13 +0000 (12:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Mar 2016 11:19:13 +0000 (12:19 +0100)
commitba22f1f4732acb4d5aebd779122e91753a0e374d
tree3e53dbbba60fadce817966c0e2a207e8750be7fb
parent61a5cfe15dd90b35850fa7359c5c033a1109289e
vmx: restore debug registers when injecting #DB traps

Commit a929bee0e652 ("x86/vmx: Fix injection of #DB traps following
XSA-156") prevents an infinite loop in certain #DB traps. However, it
changed the behavior to not call hvm_hw_inject_trap() for #DB and #AC
traps which which means that the debug registers are not restored
correctly and nullified commit b56ae5b48c38 ("VMX: fix/adjust trap
injection").

To fix this, restore the original code path through hvm_inject_trap(),
but ensure that the struct hvm_trap is populated with all the required
data.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c