[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v11 3/5] x86emul: Add return code information to error messages
On Ma, 2017-09-19 at 09:22 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 12.09.17 at 16:32, <ppircalabu@xxxxxxxxxxxxxxx> wrote: > > --- a/xen/arch/x86/hvm/emulate.c > > +++ b/xen/arch/x86/hvm/emulate.c > > @@ -2055,7 +2055,7 @@ int hvm_emulate_one_mmio(unsigned long mfn, > > unsigned long gla) > > { > > case X86EMUL_UNHANDLEABLE: > > case X86EMUL_UNIMPLEMENTED: > > - hvm_dump_emulation_state(XENLOG_G_WARNING, "MMCFG", > > &ctxt); > > + hvm_dump_emulation_state(XENLOG_G_WARNING, "MMCFG", &ctxt, > > rc); > > break; > At the example of this one I think it is pretty clear that the order > of patches would be the other way around. But I won't insist. > > > > > @@ -2242,16 +2242,17 @@ static const char > > *guest_x86_mode_to_str(int mode) > > } > > > > void hvm_dump_emulation_state(const char *loglvl, const char > > *prefix, > > - struct hvm_emulate_ctxt > > *hvmemul_ctxt) > > + struct hvm_emulate_ctxt > > *hvmemul_ctxt, int rc) > > { > > struct vcpu *curr = current; > > const char *mode_str = > > guest_x86_mode_to_str(hvm_guest_x86_mode(curr)); > > const struct segment_register *cs = > > hvmemul_get_seg_reg(x86_seg_cs, hvmemul_ctxt); > > > > - printk("%s%s emulation failed: %pv %s @ %04x:%08lx -> %*ph\n", > > - loglvl, prefix, curr, mode_str, cs->sel, hvmemul_ctxt- > > >insn_buf_eip, > > - hvmemul_ctxt->insn_buf_bytes, hvmemul_ctxt->insn_buf); > > + printk("%s%s emulation failed (rc=%d): %pv %s @ %04x:%08lx -> > > %*ph\n", > Please try to keep log messages short (but without losing relevant > information). In the case here the "rc=" is unnecessary. With it > dropped I added the "rc=" to mark the distinction between "unimplemented" and "unhandleable", as requested by Andrew Cooper for v10 "Please modify hvm_dump_emulation_state to pass rc in, and distinguish UNHANDLEABLE vs UNIMPLEMENTED in the printed message." > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> > > Jan > > > ________________________ > This email was scanned by Bitdefender _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |