[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH for 4.5 v2 2/2] x86/hvm: Improve "Emulation failed @" error messages



>>> On 29.09.14 at 11:23, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 29/09/14 09:34, Jan Beulich wrote:
>>>>> On 26.09.14 at 18:24, <andrew.cooper3@xxxxxxxxxx> 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


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


 


Rackspace

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