All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <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:23:36 +0100	[thread overview]
Message-ID: <54292518.9070609@citrix.com> (raw)
In-Reply-To: <542935B0020000780003A467@mail.emea.novell.com>

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).
>
> Jan
>

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.

Therefore, I opted for the other extreme to avoid having a mix of
information returned from guest_x86_mode_to_str().

~Andrew

  reply	other threads:[~2014-09-29  9:23 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 [this message]
2014-09-29  9:35       ` Jan Beulich
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=54292518.9070609@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.