- kvm-pci-ensure-valid-link-status-bits-for-downstream-por.patch [RHEL-65618] - kvm-pc-bios-s390-ccw-Abort-IPL-on-invalid-loadparm.patch [RHEL-72717] - kvm-pc-bios-s390-ccw-virtio-Add-a-function-to-reset-a-vi.patch [RHEL-72717] - kvm-pc-bios-s390-ccw-Fix-boot-problem-with-virtio-net-de.patch [RHEL-72717] - kvm-pc-bios-s390-ccw-netmain-Fix-error-messages-with-reg.patch [RHEL-72717] - kvm-arm-disable-pauth-for-virt-rhel9-in-RHEL10.patch [RHEL-71761] - Resolves: RHEL-65618 ([RHEL10] Failed to hot add PCIe device behind xio3130 downstream) - Resolves: RHEL-72717 (Boot fall back to cdrom from network not always working) - Resolves: RHEL-71761 ([Nvidia "Grace"] Lack of "PAuth" CPU feature results in live migration failure from RHEL 9.6 to 10)
71 lines
2.5 KiB
Diff
71 lines
2.5 KiB
Diff
From 75a9cc1fb986e96ad5ee9df22daf93afb4624bd3 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Huth <thuth@redhat.com>
|
|
Date: Thu, 16 Jan 2025 12:58:24 +0100
|
|
Subject: [PATCH 3/6] pc-bios/s390-ccw/virtio: Add a function to reset a virtio
|
|
device
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
RH-Author: Thomas Huth <thuth@redhat.com>
|
|
RH-MergeRequest: 331: Fix boot problems when falling back from network to another boot device on s390x [RHEL10]
|
|
RH-Jira: RHEL-72717
|
|
RH-Acked-by: Cédric Le Goater <clg@redhat.com>
|
|
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
RH-Commit: [2/4] 96435852a2dc8955f9deef6d82c7fac90ce90e96 (thuth/qemu-kvm-cs)
|
|
|
|
To be able to properly silence a virtio device after using it,
|
|
we need a global function to reset the device.
|
|
|
|
Reviewed-by: Jared Rossi <jrossi@linux.ibm.com>
|
|
Reviewed-by: Eric Farman <farman@linux.ibm.com>
|
|
Tested-by: Jared Rossi <jrossi@linux.ibm.com>
|
|
Message-ID: <20250116115826.192047-2-thuth@redhat.com>
|
|
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
|
(cherry picked from commit 3936d0556383829b8db9518aed8badfed6513953)
|
|
---
|
|
pc-bios/s390-ccw/virtio.c | 7 ++++++-
|
|
pc-bios/s390-ccw/virtio.h | 1 +
|
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
|
|
index 8b5a370bb3..cd6c99c7e3 100644
|
|
--- a/pc-bios/s390-ccw/virtio.c
|
|
+++ b/pc-bios/s390-ccw/virtio.c
|
|
@@ -217,6 +217,11 @@ int virtio_run(VDev *vdev, int vqid, VirtioCmd *cmd)
|
|
return 0;
|
|
}
|
|
|
|
+int virtio_reset(VDev *vdev)
|
|
+{
|
|
+ return run_ccw(vdev, CCW_CMD_VDEV_RESET, NULL, 0, false);
|
|
+}
|
|
+
|
|
int virtio_setup_ccw(VDev *vdev)
|
|
{
|
|
int i, cfg_size = 0;
|
|
@@ -235,7 +240,7 @@ int virtio_setup_ccw(VDev *vdev)
|
|
vdev->config.blk.blk_size = 0; /* mark "illegal" - setup started... */
|
|
vdev->guessed_disk_nature = VIRTIO_GDN_NONE;
|
|
|
|
- run_ccw(vdev, CCW_CMD_VDEV_RESET, NULL, 0, false);
|
|
+ virtio_reset(vdev);
|
|
|
|
status = VIRTIO_CONFIG_S_ACKNOWLEDGE;
|
|
if (run_ccw(vdev, CCW_CMD_WRITE_STATUS, &status, sizeof(status), false)) {
|
|
diff --git a/pc-bios/s390-ccw/virtio.h b/pc-bios/s390-ccw/virtio.h
|
|
index 9faf3986b1..f13fa6f5fe 100644
|
|
--- a/pc-bios/s390-ccw/virtio.h
|
|
+++ b/pc-bios/s390-ccw/virtio.h
|
|
@@ -274,6 +274,7 @@ void vring_send_buf(VRing *vr, void *p, int len, int flags);
|
|
int vr_poll(VRing *vr);
|
|
int vring_wait_reply(void);
|
|
int virtio_run(VDev *vdev, int vqid, VirtioCmd *cmd);
|
|
+int virtio_reset(VDev *vdev);
|
|
int virtio_setup_ccw(VDev *vdev);
|
|
|
|
int virtio_net_init(void *mac_addr);
|
|
--
|
|
2.39.3
|
|
|