On 06/04/17 09:56, Jan Beulich wrote: >>>> On 05.04.17 at 19:33, <andrew.coop...@citrix.com> wrote: >> --- a/xen/arch/x86/hvm/emulate.c >> +++ b/xen/arch/x86/hvm/emulate.c >> @@ -549,7 +549,7 @@ static int hvmemul_virtual_to_linear( >> okay = hvm_virtual_to_linear_addr( >> seg, reg, offset - (*reps - 1) * bytes_per_rep, >> *reps * bytes_per_rep, access_type, >> - hvmemul_ctxt->ctxt.addr_size, linear); >> + hvmemul_get_seg_reg(x86_seg_cs, hvmemul_ctxt), linear); >> *linear += (*reps - 1) * bytes_per_rep; >> if ( hvmemul_ctxt->ctxt.addr_size != 64 ) >> *linear = (uint32_t)*linear; >> @@ -558,7 +558,7 @@ static int hvmemul_virtual_to_linear( >> { >> okay = hvm_virtual_to_linear_addr( >> seg, reg, offset, *reps * bytes_per_rep, access_type, >> - hvmemul_ctxt->ctxt.addr_size, linear); >> + hvmemul_get_seg_reg(x86_seg_cs, hvmemul_ctxt), linear); > Is there a particular reason why you use the function call in the > above two cases, but ... > >> @@ -2075,7 +2075,7 @@ void hvm_emulate_init_per_insn( >> hvmemul_ctxt->insn_buf_eip, >> sizeof(hvmemul_ctxt->insn_buf), >> hvm_access_insn_fetch, >> - hvmemul_ctxt->ctxt.addr_size, >> + &hvmemul_ctxt->seg_reg[x86_seg_cs], > ... the cheaper array reference here?
Consistency with the surrounding code. > > In any event > > Reviewed-by: Jan Beulich <jbeul...@suse.com> Thanks. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel