Re: [PATCH v4 03/15] pc-bios/s390-ccw: Always reset virtio device on failed boot attempt

2026-03-04 Thread Eric Farman
On Tue, 2026-03-03 at 21:59 -0500, [email protected] wrote:
> From: Jared Rossi 
> 
> The virtio spec necessitates that live virtqueues must not be altered.  Reset
> the failed device so that the queues are not live before we attempt to boot 
> any
> fallback devices.
> 
> Signed-off-by: Jared Rossi 
> ---
>  pc-bios/s390-ccw/main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Eric Farman 

> 
> diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
> index 76bf743900..8e2c99bee1 100644
> --- a/pc-bios/s390-ccw/main.c
> +++ b/pc-bios/s390-ccw/main.c
> @@ -277,7 +277,8 @@ static void ipl_boot_device(void)
>  break;
>  case CU_TYPE_VIRTIO:
>  if (virtio_setup() == 0) {
> -zipl_load();
> +zipl_load(); /* only return on error */
> +virtio_reset(virtio_get_device());
>  }
>  break;
>  default:



Re: [PATCH v4 03/15] pc-bios/s390-ccw: Always reset virtio device on failed boot attempt

2026-03-04 Thread Thomas Huth

On 04/03/2026 03.59, [email protected] wrote:

From: Jared Rossi 

The virtio spec necessitates that live virtqueues must not be altered.  Reset
the failed device so that the queues are not live before we attempt to boot any
fallback devices.

Signed-off-by: Jared Rossi 
---
  pc-bios/s390-ccw/main.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
index 76bf743900..8e2c99bee1 100644
--- a/pc-bios/s390-ccw/main.c
+++ b/pc-bios/s390-ccw/main.c
@@ -277,7 +277,8 @@ static void ipl_boot_device(void)
  break;
  case CU_TYPE_VIRTIO:
  if (virtio_setup() == 0) {
-zipl_load();
+zipl_load(); /* only return on error */
+virtio_reset(virtio_get_device());
  }
  break;
  default:


Good idea! (Reminds me of 68c95ed1db070f7545e487e742715f01a545aab0 where we 
had to do something similar for virtio-net already).


Reviewed-by: Thomas Huth