From: "Jan Beulich" Subject: [PATCH v2 6/6] x86emul: rename the no_writeback label Date: Wed, 18 Jan 2017 06:33:48 -0700 Message-ID: <587F7CCC020000780013147D@prv-mh.provo.novell.com> References: <587F79CF020000780013142A@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part8DB4A7AC.1__=" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTqN6-0002ho-Ry for xen-devel@lists.xenproject.org; Wed, 18 Jan 2017 13:33:52 +0000 In-Reply-To: <587F79CF020000780013142A@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel Cc: Andrew Cooper List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part8DB4A7AC.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This is to bring its name in line with what actually happens there. Suggested-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -986,7 +986,7 @@ static inline void put_loop_count( if ( using_si ) _regs.r(si) =3D _regs._esi; = \ if ( using_di ) _regs.r(di) =3D _regs._edi; = \ } \ - goto no_writeback; \ + goto complete_insn; \ } \ if ( max_reps > 1 && (_regs._eflags & EFLG_TF) && \ !is_branch_step(ctxt, ops) ) \ @@ -1015,7 +1015,7 @@ static void __put_rep_prefix( { \ __put_rep_prefix(&_regs, ctxt->regs, ad_bytes, reps_completed); \ if ( unlikely(rc =3D=3D X86EMUL_EXCEPTION) ) = \ - goto no_writeback; \ + goto complete_insn; \ } \ }) =20 @@ -2667,7 +2667,7 @@ x86_emulate( state.caller =3D NULL; #endif if ( rc =3D=3D X86EMUL_DONE ) - goto no_writeback; + goto complete_insn; if ( rc !=3D X86EMUL_OKAY ) return rc; } @@ -4287,7 +4287,7 @@ x86_emulate( if ( rc !=3D 0 ) { if ( rc =3D=3D X86EMUL_DONE ) - goto no_writeback; + goto complete_insn; goto done; } break; @@ -4663,7 +4663,7 @@ x86_emulate( _regs._eflags &=3D ~EFLG_AC; if ( modrm =3D=3D 0xcb ) _regs._eflags |=3D EFLG_AC; - goto no_writeback; + goto complete_insn; =20 #ifdef __XEN__ case 0xd1: /* xsetbv */ @@ -4675,7 +4675,7 @@ x86_emulate( handle_xsetbv(_regs._ecx, _regs._eax | (_regs.rdx = << 32)), EXC_GP, 0); - goto no_writeback; + goto complete_insn; #endif =20 case 0xd4: /* vmfunc */ @@ -4684,7 +4684,7 @@ x86_emulate( fail_if(!ops->vmfunc); if ( (rc =3D ops->vmfunc(ctxt)) !=3D X86EMUL_OKAY ) goto done; - goto no_writeback; + goto complete_insn; =20 case 0xd5: /* xend */ generate_exception_if(vex.pfx, EXC_UD); @@ -4698,7 +4698,7 @@ x86_emulate( EXC_UD); /* Neither HLE nor RTM can be active when we get here. */ _regs._eflags |=3D EFLG_ZF; - goto no_writeback; + goto complete_insn; =20 case 0xdf: /* invlpga */ generate_exception_if(!in_protmode(ctxt, ops), EXC_UD); @@ -4707,7 +4707,7 @@ x86_emulate( if ( (rc =3D ops->invlpg(x86_seg_none, truncate_ea(_regs.r(ax)= ), ctxt)) ) goto done; - goto no_writeback; + goto complete_insn; =20 case 0xf9: /* rdtscp */ { @@ -4755,7 +4755,7 @@ x86_emulate( base +=3D sizeof(zero); limit -=3D sizeof(zero); } - goto no_writeback; + goto complete_insn; } } =20 @@ -6222,8 +6222,7 @@ x86_emulate( break; } =20 - no_writeback: /* Commit shadow register state. */ - + complete_insn: /* Commit shadow register state. */ /* Zero the upper 32 bits of %rip if not in 64-bit mode. */ if ( !mode_64bit() ) _regs.r(ip) =3D _regs._eip; --=__Part8DB4A7AC.1__= Content-Type: text/plain; name="x86emul-writeback-label.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86emul-writeback-label.patch" x86emul: rename the no_writeback label=0A=0AThis is to bring its name in = line with what actually happens there.=0A=0ASuggested-by: Andrew Cooper = =0ASigned-off-by: Jan Beulich =0AReviewed-by: Andrew Cooper =0A=0A--- = a/xen/arch/x86/x86_emulate/x86_emulate.c=0A+++ b/xen/arch/x86/x86_emulate/x= 86_emulate.c=0A@@ -986,7 +986,7 @@ static inline void put_loop_count(=0A = if ( using_si ) _regs.r(si) =3D _regs._esi; = \=0A if ( using_di ) _regs.r(di) =3D _regs._edi; = \=0A } = \=0A- goto no_writeback; = \=0A+ goto complete_insn; = \=0A } = \=0A if ( max_reps > 1 && (_regs._eflags & EFLG_TF) && = \=0A !is_branch_step(ctxt, ops) ) = \=0A@@ -1015,7 +1015,7 @@ static void __put_rep_prefix(=0A = { = \=0A __put_rep_prefix(&_regs, ctxt->regs, ad_bytes, reps_completed)= ; \=0A if ( unlikely(rc =3D=3D X86EMUL_EXCEPTION) ) = \=0A- goto no_writeback; = \=0A+ goto complete_insn; = \=0A } = \=0A })=0A =0A@@ -2667,7 +2667,7 @@ x86_emulate(=0A = state.caller =3D NULL;=0A #endif=0A if ( rc =3D=3D X86EMUL_DONE = )=0A- goto no_writeback;=0A+ goto complete_insn;=0A = if ( rc !=3D X86EMUL_OKAY )=0A return rc;=0A }=0A@@ = -4287,7 +4287,7 @@ x86_emulate(=0A if ( rc !=3D 0 )=0A = {=0A if ( rc =3D=3D X86EMUL_DONE )=0A- goto = no_writeback;=0A+ goto complete_insn;=0A goto = done;=0A }=0A break;=0A@@ -4663,7 +4663,7 @@ x86_emulate(= =0A _regs._eflags &=3D ~EFLG_AC;=0A if ( modrm = =3D=3D 0xcb )=0A _regs._eflags |=3D EFLG_AC;=0A- = goto no_writeback;=0A+ goto complete_insn;=0A =0A #ifdef = __XEN__=0A case 0xd1: /* xsetbv */=0A@@ -4675,7 +4675,7 @@ = x86_emulate(=0A handle_xsetbv(_regs._ecx,= =0A _regs._eax | (_regs.rdx= << 32)),=0A EXC_GP, 0);=0A- = goto no_writeback;=0A+ goto complete_insn;=0A #endif=0A =0A = case 0xd4: /* vmfunc */=0A@@ -4684,7 +4684,7 @@ x86_emulate(=0A = fail_if(!ops->vmfunc);=0A if ( (rc =3D ops->vmfunc(ctxt)) = !=3D X86EMUL_OKAY )=0A goto done;=0A- goto = no_writeback;=0A+ goto complete_insn;=0A =0A case 0xd5: = /* xend */=0A generate_exception_if(vex.pfx, EXC_UD);=0A@@ = -4698,7 +4698,7 @@ x86_emulate(=0A = EXC_UD);=0A /* Neither HLE nor RTM can be active when we get = here. */=0A _regs._eflags |=3D EFLG_ZF;=0A- goto = no_writeback;=0A+ goto complete_insn;=0A =0A case 0xdf: = /* invlpga */=0A generate_exception_if(!in_protmode(ctxt, = ops), EXC_UD);=0A@@ -4707,7 +4707,7 @@ x86_emulate(=0A if ( = (rc =3D ops->invlpg(x86_seg_none, truncate_ea(_regs.r(ax)),=0A = ctxt)) )=0A goto done;=0A- = goto no_writeback;=0A+ goto complete_insn;=0A =0A = case 0xf9: /* rdtscp */=0A {=0A@@ -4755,7 +4755,7 @@ x86_emulate(= =0A base +=3D sizeof(zero);=0A limit -=3D = sizeof(zero);=0A }=0A- goto no_writeback;=0A+ = goto complete_insn;=0A }=0A }=0A =0A@@ -6222,8 = +6222,7 @@ x86_emulate(=0A break;=0A }=0A =0A- no_writeback: = /* Commit shadow register state. */=0A-=0A+ complete_insn: /* Commit = shadow register state. */=0A /* Zero the upper 32 bits of %rip if not = in 64-bit mode. */=0A if ( !mode_64bit() )=0A _regs.r(ip) =3D = _regs._eip;=0A --=__Part8DB4A7AC.1__= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --=__Part8DB4A7AC.1__=--