[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 for-4.9 3/6] x86/hvm: Fix segmentation logic for system segments
On 06/04/17 09:56, Jan Beulich wrote: >>>> On 05.04.17 at 19:33, <andrew.cooper3@xxxxxxxxxx> 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 <jbeulich@xxxxxxxx> Thanks. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |