From: Petre Ovidiu PIRCALABU <ppircalabu@bitdefender.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>
Cc: "kevin.tian@intel.com" <kevin.tian@intel.com>,
"sstabellini@kernel.org" <sstabellini@kernel.org>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
"rcojocaru@bitdefender.com" <rcojocaru@bitdefender.com>,
"George.Dunlap@eu.citrix.com" <George.Dunlap@eu.citrix.com>,
"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
"ian.jackson@eu.citrix.com" <ian.jackson@eu.citrix.com>,
"tim@xen.org" <tim@xen.org>,
"paul.durrant@citrix.com" <paul.durrant@citrix.com>,
"tamas@tklengyel.com" <tamas@tklengyel.com>,
"jun.nakajima@intel.com" <jun.nakajima@intel.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v11 3/5] x86emul: Add return code information to error messages
Date: Wed, 20 Sep 2017 12:54:11 +0000 [thread overview]
Message-ID: <1505912051.383.6.camel@bitdefender.com> (raw)
In-Reply-To: <59C15249020000780017CF3D@prv-mh.provo.novell.com>
On Ma, 2017-09-19 at 09:22 -0600, Jan Beulich wrote:
> >
> > >
> > > >
> > > > On 12.09.17 at 16:32, <ppircalabu@bitdefender.com> 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@suse.com>
>
> Jan
>
>
> ________________________
> This email was scanned by Bitdefender
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-20 12:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 14:32 [PATCH v11 0/5] Notify monitor when emulating an unimplemented instruction Petre Pircalabu
2017-09-12 14:32 ` [PATCH v11 1/5] gitignore: add local vimrc files Petre Pircalabu
2017-09-13 8:56 ` Wei Liu
2017-09-12 14:32 ` [PATCH v11 2/5] x86emul: New return code for unimplemented instruction Petre Pircalabu
2017-09-14 18:15 ` Kent R. Spillner
2017-09-19 15:19 ` Jan Beulich
2017-09-20 21:47 ` Petre Ovidiu PIRCALABU
2017-09-21 6:29 ` Jan Beulich
2017-09-12 14:32 ` [PATCH v11 3/5] x86emul: Add return code information to error messages Petre Pircalabu
2017-09-18 8:22 ` Tian, Kevin
2017-09-19 15:22 ` Jan Beulich
2017-09-20 12:54 ` Petre Ovidiu PIRCALABU [this message]
2017-09-20 15:52 ` Jan Beulich
2017-09-12 14:32 ` [PATCH v11 4/5] x86/monitor: Notify monitor if an emulation fails Petre Pircalabu
2017-09-12 14:32 ` [PATCH v11 5/5] x86emul: Raise #UD when emulating an unimplemented instruction Petre Pircalabu
2017-09-18 8:25 ` Tian, Kevin
2017-09-19 15:24 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1505912051.383.6.camel@bitdefender.com \
--to=ppircalabu@bitdefender.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=paul.durrant@citrix.com \
--cc=rcojocaru@bitdefender.com \
--cc=sstabellini@kernel.org \
--cc=tamas@tklengyel.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).