|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] 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 <jbeulich@xxxxxxxx>
> Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> @@ -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.)
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |