]> xenbits.xensource.com Git - xen.git/commit
x86/HVM: re-order operations in hvm_ud_intercept()
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Jun 2016 14:50:37 +0000 (16:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Jun 2016 14:50:37 +0000 (16:50 +0200)
commitd8ede4a09e3ea2fee0db0ebf6ab158ea5292ed98
tree51c574c784b66c93f9c558e65845301ffe1e26f2
parent9dec2c47406f4ef31711656722f5f70d758d6160
x86/HVM: re-order operations in hvm_ud_intercept()

Don't fetch CS explicitly, leverage the fact that hvm_emulate_prepare()
already does (and that hvm_virtual_to_linear_addr() doesn't alter it).

At once increase the length passed to hvm_virtual_to_linear_addr() by
one: There definitely needs to be at least one more opcode byte, and we
can avoid missing a wraparound case this way.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c