x86emul: drop dead code from SYSENTER handling
PATCH 1/1 x86emul: drop dead code from SYSENTER handling
There's no point reading CS - all of the fields get set from scratch right afterwards. Also correct a wrong comment.
xen/arch/x86/x86_emulate/x86_emulate.c +1 -3
@@ -4841,12 +4841,10 @@ x86_emulate( _regs.eflags &= ~(EFLG_VM |EFLG_IF |EFLG_RF ); -fail_if (ops->read_segment ==NULL ); - ops->read_segment (x86_seg_cs, &cs, ctxt); cs.sel = msr_content & ~3 ;/* SELECTOR_RPL_MASK */ cs.base =0 ;/* flat segment */ cs.limit = ~0u ;/* 4GB limit */ - cs.attr.bytes = lm ?0xa9b /* L+DB+P+S+Code */ + cs.attr.bytes = lm ?0xa9b /* L+G+P+S+Code */ :0xc9b ;/* G+DB+P+S+Code */ sreg.sel = cs.sel +8 ;
x86emul: drop dead code from SYSENTER handling
There's no point reading CS - all of the fields get set from scratch right afterwards. Also correct a wrong comment.
xen/arch/x86/x86_emulate/x86_emulate.c +1 -3
@@ -4841,12 +4841,10 @@ x86_emulate( _regs.eflags &= ~(EFLG_VM |EFLG_IF |EFLG_RF ); -fail_if (ops->read_segment ==NULL ); - ops->read_segment (x86_seg_cs, &cs, ctxt); cs.sel = msr_content & ~3 ;/* SELECTOR_RPL_MASK */ cs.base =0 ;/* flat segment */ cs.limit = ~0u ;/* 4GB limit */ - cs.attr.bytes = lm ?0xa9b /* L+DB+P+S+Code */ + cs.attr.bytes = lm ?0xa9b /* L+G+P+S+Code */ :0xc9b ;/* G+DB+P+S+Code */ sreg.sel = cs.sel +8 ;
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 4 lines · Jan Beulich
There's no point reading CS - all of the fields get set from scratch right afterwards. Also correct a wrong comment.
Signed-off-by Jan Beulich <[email protected]>
Quoted 4 lines
xen/arch/x86/x86_emulate/x86_emulate.c x86_emulate( · line 4847
Quoted 10 lines
xen/arch/x86/x86_emulate/x86_emulate.c +1
-3@@ -4841,12 +4841,10 @@ x86_emulate( _regs.eflags &= ~(EFLG_VM |EFLG_IF |EFLG_RF ); -fail_if (ops->read_segment ==NULL ); - ops->read_segment (x86_seg_cs, &cs, ctxt); cs.sel = msr_content & ~3 ;/* SELECTOR_RPL_MASK */ cs.base =0 ;/* flat segment */ cs.limit = ~0u ;/* 4GB limit */ - cs.attr.bytes = lm ? 0xa9b /* L+DB+P+S+Code */ + cs.attr.bytes = lm ? 0xa9b /* L+G+P+S+Code */
Strictly speaking its G+L+P, seeing as the other attributes are listed in bit order.
~Andrew
xen/arch/x86/x86_emulate/x86_emulate.c x86_emulate( · line 4850
Quoted 6 lines
xen/arch/x86/x86_emulate/x86_emulate.c +0
-0: 0xc9b; /* G+DB+P+S+Code */ sreg.sel = cs.sel +8 ;
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel