x86emul: deliver correct math exceptions
authorJan Beulich <jbeulich@suse.com>
Wed, 5 Oct 2016 12:19:43 +0000 (14:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 5 Oct 2016 12:19:43 +0000 (14:19 +0200)
commitbeeeaa920049c88af035b3dee8e20926d9d426f8
tree54f8e0345a054193d72f12ce7914ee2cefbef43e
parentcab9638a42457d2ab360c60ec419cdef4c75ca54
x86emul: deliver correct math exceptions

#MF only applies to x87 instructions. SSE and AVX ones need #XM to be
raised instead, unless CR4.OSXMMEXCPT is clear, in which case #UD needs
to result. (But note that this is only a latent issue - we don't
emulate any instructions so far which could result in #XM.)

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