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

Re: [Xen-devel] [PATCH v5 1/9] vm_event: clear up return value of vm_event_monitor_traps



On Fri, Jun 3, 2016 at 9:54 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>> On 03.06.16 at 00:52, <tamas@xxxxxxxxxxxxx> wrote:
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -3392,11 +3392,11 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>>                  break;
>>              }
>>              else {
>> -                int handled =
>> +                int rc =
>>                          hvm_event_breakpoint(regs->eip,
>>                                               HVM_EVENT_SOFTWARE_BREAKPOINT);
>>
>> -                if ( handled < 0 )
>> +                if ( !rc )
>>                  {
>>                      struct hvm_trap trap = {
>>                          .vector = TRAP_int3,
>> @@ -3410,7 +3410,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>>                      hvm_inject_trap(&trap);
>>                      break;
>>                  }
>> -                else if ( handled )
>> +                else if ( rc > 0 )
>>                      break;
>>              }
>>
>
> Ah, I guess that's what you were referring to on the other thread.
> There's indeed quite a bit of cleanup potential here. The minimal
> thing I'd like to ask for is to drop the pointless "else", as you're
> touching that line anyway.

Sounds good.

>
> With that (also doable upon commit of course)
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> Jan

Thanks,
Tamas

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