qemu-kvm/kvm-pc-bios-s390-ccw-Re-initialize-receive-queue-index-b.patch
Miroslav Rezanina 71aed0d95c * Thu Dec 05 2024 Miroslav Rezanina <mrezanin@redhat.com> - 9.1.0-6
- kvm-virtio-net-Add-queues-before-loading-them.patch [RHEL-69477]
- kvm-docs-system-s390x-bootdevices-Update-loadparm-docume.patch [RHEL-68440]
- kvm-docs-system-bootindex-Make-it-clear-that-s390x-can-a.patch [RHEL-68440]
- kvm-hw-s390x-Restrict-loadparm-property-to-devices-that-.patch [RHEL-68440]
- kvm-hw-Add-loadparm-property-to-scsi-disk-devices-for-bo.patch [RHEL-68440]
- kvm-scsi-fix-allocation-for-s390x-loadparm.patch [RHEL-68440]
- kvm-pc-bios-s390x-Initialize-cdrom-type-to-false-for-eac.patch [RHEL-68440]
- kvm-pc-bios-s390x-Initialize-machine-loadparm-before-pro.patch [RHEL-68440]
- kvm-pc-bios-s390-ccw-Re-initialize-receive-queue-index-b.patch [RHEL-68440]
- kvm-vnc-fix-crash-when-no-console-attached.patch [RHEL-61633]
- Resolves: RHEL-69477
  (qemu crashed when migrate vm with multiqueue from rhel9.4 to rhel9.6)
- Resolves: RHEL-68440
  (The new "boot order" feature is sometimes not working as expected [RHEL 9])
- Resolves: RHEL-61633
  (Qemu-kvm  crashed  if  no display device setting and switching display by remote-viewer [rhel-9])
2024-12-05 00:54:47 -05:00

46 lines
1.6 KiB
Diff

From 7e73d3ad9a7e3f047f8ef79131065e4386e1bc00 Mon Sep 17 00:00:00 2001
From: Thomas Huth <thuth@redhat.com>
Date: Mon, 11 Nov 2024 14:11:20 +0100
Subject: [PATCH 09/10] pc-bios/s390-ccw: Re-initialize receive queue index
before each boot attempt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Thomas Huth <thuth@redhat.com>
RH-MergeRequest: 298: [c9s] Fixes for the new s390x "boot order" feature
RH-Jira: RHEL-68440
RH-Acked-by: Cédric Le Goater <clg@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
RH-Commit: [8/8] 3337c7737fa2eb33f1a27230ae1d6e0f2580a539 (thuth/qemu-kvm-cs9)
Now that we can boot from multiple boot devices, we have to make sure
to reinitialize static variables like rx_last_idx to avoid that they
contain garbage data during the second boot attempt (which can lead to
crashes when the code tries to access the wrong ring data).
Message-ID: <20241111131120.317796-1-thuth@redhat.com>
Reviewed-by: Jared Rossi <jrossi@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6ba1f714c00f8839a8df9f643e0058f00da3fd25)
---
pc-bios/s390-ccw/virtio-net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pc-bios/s390-ccw/virtio-net.c b/pc-bios/s390-ccw/virtio-net.c
index f9854a22c3..578c89d0c5 100644
--- a/pc-bios/s390-ccw/virtio-net.c
+++ b/pc-bios/s390-ccw/virtio-net.c
@@ -51,6 +51,8 @@ int virtio_net_init(void *mac_addr)
void *buf;
int i;
+ rx_last_idx = 0;
+
vdev->guest_features[0] = VIRTIO_NET_F_MAC_BIT;
virtio_setup_ccw(vdev);
--
2.39.3