[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 20.09.17 at 14:54, <ppircalabu@xxxxxxxxxxxxxxx> wrote:
> On Ma, 2017-09-19 at 09:22 -0600, Jan Beulich wrote:
>> > > > On 12.09.17 at 16:32, <ppircalabu@xxxxxxxxxxxxxxx> wrote:
>> > @@ -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."

You don't need to print "rc=%d" to meet that requirement, just
"%d" will do.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.