x86/emul: Don't opencode CR0_TS in CLTS handling
PATCH 1/1 x86/emul: Don't opencode CR0_TS in CLTS handling
Also replace implicit 0 checks with X86EMUL_OKAY
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
--- xen/arch/x86/x86_emulate/x86_emulate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/x86_emulate/x86_emulate.c +2 -2
@@ -4684,8 +4684,8 @@ x86_emulate(case X86EMUL_OPC (0x0f ,0x06 ):/* clts */ generate_exception_if (!mode_ring0 (),EXC_GP ,0 );fail_if ((ops->read_cr ==NULL ) || (ops->write_cr ==NULL )); -if ( (rc = ops->read_cr (0 , &dst.val, ctxt)) || - (rc = ops->write_cr (0 , dst.val&~8 , ctxt)) ) +if ( (rc = ops->read_cr (0 , &dst.val, ctxt)) !=X86EMUL_OKAY || + (rc = ops->write_cr (0 , dst.val & ~CR0_TS , ctxt)) !=X86EMUL_OKAY ) goto done;break ;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 19.12.16 at 11:22, <[email protected]> wrote:
Also replace implicit 0 checks with
X86EMUL_OKAYSigned-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel