[Public]

> -----Original Message-----
> From: Jan Beulich <[email protected]>
> Sent: Thursday, November 13, 2025 4:56 PM
> To: Penny, Zheng <[email protected]>
> Cc: Andrew Cooper <[email protected]>; Roger Pau MonnĂ©
> <[email protected]>; Andryuk, Jason <[email protected]>; xen-
> [email protected]
> Subject: Re: [PATCH v1 1/7] xen/svm: limit the scope of "rc"
>
> On 13.11.2025 04:16, Penny Zheng wrote:
> > To make codes less fragile, we limit the scope of "rc" through adding
> > several instances in relatively narrow scopes. We also fixes wrong 
> > indentation.
> >
> > Suggested-by: Jan Beulich <[email protected]>
> > Signed-off-by: Penny Zheng <[email protected]>
>
> Reviewed-by: Jan Beulich <[email protected]>
>

Thx

> > @@ -2748,16 +2749,18 @@ void asmlinkage svm_vmexit_handler(void)
> >          }
> >          else
> >          {
> > -           rc = hvm_monitor_debug(regs->rip,
> > -                                  HVM_MONITOR_SOFTWARE_BREAKPOINT,
> > -                                  X86_ET_SW_EXC,
> > -                                  insn_len, 0);
> > -           if ( rc < 0 )
> > -               goto unexpected_exit_type;
> > -           if ( !rc )
> > -               hvm_inject_exception(X86_EXC_BP,
> > -                                    X86_ET_SW_EXC,
> > -                                    insn_len, X86_EVENT_NO_EC);
> > +            int rc;
> > +
> > +            rc = hvm_monitor_debug(regs->rip,
> > +                                   HVM_MONITOR_SOFTWARE_BREAKPOINT,
> > +                                   X86_ET_SW_EXC,
> > +                                   insn_len, 0);
>
> As you touch the code anyway, make this the initializer of rc? And at the 
> same time
> join the latter two lines? (I may take the liberty of making these 
> adjustments while
> committing.)
>

Thx, plz

> Jan

Reply via email to