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

Re: [Xen-devel] [PATCH v6 5/5] x86/vm_event: Add HVM debug exception vm_events



>>> On 24.06.16 at 18:29, <tamas@xxxxxxxxxxxxx> wrote:
> On Fri, Jun 24, 2016 at 5:24 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>> On 24.06.16 at 13:20, <kevin.tian@xxxxxxxxx> wrote:
>>>>  From: Tamas K Lengyel [mailto:tamas@xxxxxxxxxxxxx]
>>>> +                 * rc < error, fall-through to exit_and_crash
>>>> +                 */
>>>> +                if ( !rc )
>>>> +                {
>>>> +                    vmx_propagate_intr(intr_info);
>>>> +                    break;
>>>> +                }
>>>> +                if ( rc > 0 )
>>>> +                    break;
>>>> +            }
>>>>              else
>>>> +            {
>>>>                  domain_pause_for_debugger();
>>>> -            break;
>>>> +                break;
>>>> +            }
>>>> +
>>>> +            goto exit_and_crash;
>>>
>>> Putting goto as the last line within a 'case' looks a bit strange. What
>>> about putting goto directly under a "if ( rc < 0 )" check earlier?
>>>
>>>               if ( !rc )
>>>                       ...
>>>               if ( rc < 0 )
>>>                       goto exit_and_crash;
>>>       }
>>>       else
>>>               domain_pause_for_debugger();
>>>       break;
>>
>> Thanks, Kevin - indeed that's exactly what I had asked for already
>> on the previous iteration.
>>
> 
> I'm OK with adding the rc < 0 case, it's just that the fall-through
> style is already used for handling the int3 events for example. Should
> I fix that too while I'm at it so the code is consistent?

Especially if you did it in a separate patch, I for one would
appreciate that.

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®.