From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: KeirFraser <keir@xen.org>, Kevin Tian <kevin.tian@intel.com>,
EddieDong <eddie.dong@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH for 4.5 v2 2/2] x86/hvm: Improve "Emulation failed @" error messages
Date: Mon, 29 Sep 2014 10:35:07 +0100 [thread overview]
Message-ID: <542943EB020000780003A54E@mail.emea.novell.com> (raw)
In-Reply-To: <54292518.9070609@citrix.com>
>>> On 29.09.14 at 11:23, <andrew.cooper3@citrix.com> wrote:
> On 29/09/14 09:34, Jan Beulich wrote:
>>>>> On 26.09.14 at 18:24, <andrew.cooper3@citrix.com> wrote:
>>> @@ -1449,6 +1441,30 @@ struct segment_register *hvmemul_get_seg_reg(
>>> return &hvmemul_ctxt->seg_reg[seg];
>>> }
>>>
>>> +static const char *guest_x86_mode_to_str(int mode)
>>> +{
>>> + switch ( mode )
>>> + {
>>> + case 0 ... 2: return "16bit";
>> I don't really follow why you dropped the real and vm86 mode
>> special casing here (nor do I think ???_guest_x86_mode() is
>> producing insufficient detail for the purposes here or elsewhere).
>
> I specifically want to avoid having specifics like "Real" and "v86"
> along side more generic terms such as "16bit", because I can see even
> myself as the author getting confused in the future.
>
> One option would be to borrow the terminology from
> http://sandpile.org/x86/mode.htm which is unambiguous, and provides
> rather more information than just how to decode the instructions.
> Unfortunately, ???_guest_x86_mode() is insufficiently expressive to
> express this complete set.
The distinction there clearly goes too far for the purposes here.
Knowing whether the code was executing in protected or real/vm86
modes may be useful though for assigning proper meaning to the
printed code selector value. And implying protected mode from
"NNbit" being printed isn't that hard a task.
Jan
next prev parent reply other threads:[~2014-09-29 9:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 16:24 [PATCH for 4.5 v2 0/2] Improve "Emulation failed" error message Andrew Cooper
2014-09-26 16:24 ` [PATCH for 4.5 v2 1/2] xen/vsprintf: Introduce %*ph extended format specifier for hex buffers Andrew Cooper
2014-10-01 7:21 ` [PATCH v3 1/2] vsprintf: introduce " Jan Beulich
2014-10-01 8:25 ` Andrew Cooper
2014-09-26 16:24 ` [PATCH for 4.5 v2 2/2] x86/hvm: Improve "Emulation failed @" error messages Andrew Cooper
2014-09-29 8:34 ` Jan Beulich
2014-09-29 9:23 ` Andrew Cooper
2014-09-29 9:35 ` Jan Beulich [this message]
2014-09-29 9:46 ` [PATCH for 4.5 v3 " Andrew Cooper
2014-10-01 0:55 ` Tian, Kevin
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=542943EB020000780003A54E@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=eddie.dong@intel.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xen.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).