Re: [kvm-unit-tests PATCH v3 11/11] s390x: Restore registers in diag308_load_reset() error path

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

 



On Thu, 21 Apr 2022 10:11:30 +0000
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> In case of an error we'll currently return with the wrong values in
> gr0 and gr1. Let's fix that by restoring the registers before setting
> the return value and branching to the return address.
> 
> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>

Reviewed-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

> ---
>  s390x/cpu.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/s390x/cpu.S b/s390x/cpu.S
> index 82b5e25d..0bd8c0e3 100644
> --- a/s390x/cpu.S
> +++ b/s390x/cpu.S
> @@ -34,6 +34,7 @@ diag308_load_reset:
>  	stg     %r15, GEN_LC_SW_INT_GRS + 15 * 8
>  	/* Do the reset */
>  	diag    %r0,%r2,0x308
> +	RESTORE_REGS_STACK
>  	/* Failure path */
>  	xgr	%r2, %r2
>  	br	%r14




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux