qemu-kvm/kvm-s390x-follow-qdev-tree-...

74 lines
2.9 KiB
Diff
Raw Normal View History

From 6c815e78cea7c26e9a3526cbb686f728eac31021 Mon Sep 17 00:00:00 2001
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
Date: Tue, 23 May 2023 12:34:33 +0200
Subject: [PATCH 12/22] s390x: follow qdev tree to detect SCSI device on a CCW
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
bus
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: Cédric Le Goater <clg@redhat.com>
RH-MergeRequest: 279: Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9
RH-Bugzilla: 2169308 2209605
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: David Hildenbrand <david@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Commit: [11/21] 97303bc9c356e8828d185868736b395bc0b70214
* Wed May 24 2023 Jon Maloy <jmaloy@redhat.com> - 6.2.0-35 - kvm-virtiofsd-Add-basic-support-for-FUSE_SYNCFS-request.patch [bz#2196880] - kvm-s390-kvm-adjust-diag318-resets-to-retain-data.patch [bz#2169308] - kvm-target-s390x-Fix-SLDA-sign-bit-index.patch [bz#2169308] - kvm-target-s390x-Fix-SRDA-CC-calculation.patch [bz#2169308] - kvm-target-s390x-Fix-cc_calc_sla_64-missing-overflows.patch [bz#2169308] - kvm-target-s390x-Fix-shifting-32-bit-values-for-more-tha.patch [bz#2169308] - kvm-s390x-sigp-Reorder-the-SIGP-STOP-code.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRASL-with-a-large-negative-offset.patch [bz#2169308] - kvm-s390x-tcg-Fix-BRCL-with-a-large-negative-offset.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-condition.patch [bz#2169308] - kvm-target-s390x-Fix-determination-of-overflow-conditioo.patch [bz#2169308] - kvm-s390x-follow-qdev-tree-to-detect-SCSI-device-on-a-CC.patch [bz#2169308] - kvm-target-s390x-Fix-the-accumulation-of-ccm-in-op_icm.patch [bz#2169308] - kvm-target-s390x-Fix-writeback-to-v1-in-helper_vstl.patch [bz#2169308] - kvm-target-s390x-fix-handling-of-zeroes-in-vfmin-vfmax.patch [bz#2169308] - kvm-target-s390x-Fix-CLFIT-and-CLGIT-immediate-size.patch [bz#2169308] - kvm-s390x-tcg-Fix-opcode-for-lzrf.patch [bz#2169308] - kvm-target-s390x-Fix-emulation-of-the-VISTR-instruction.patch [bz#2169308] - kvm-s390x-css-revert-SCSW-ctrl-flag-bits-on-error.patch [bz#2169308] - kvm-target-s390x-tcg-Fix-and-improve-the-SACF-instructio.patch [bz#2169308] - kvm-target-s390x-tcg-mem_helper-Test-the-right-bits-in-p.patch [bz#2169308] - Resolves: bz#2196880 ([virtiofs] Backport FUSE_SYNCFS support) - Resolves: bz#2169308 (Backport latest s390x-related fixes from upstream QEMU for qemu-kvm in RHEL 8.9)
2023-05-24 18:04:22 +00:00
Bugzilla: https://bugzilla.redhat.com/2169308
commit 7d2eb76d0407fc391b78df16d17f1e616ec3e228
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: Mon Mar 28 09:40:00 2022 +0200
s390x: follow qdev tree to detect SCSI device on a CCW bus
Do not make assumptions on the parent type of the SCSIDevice, instead
use object_dynamic_cast all the way up to the CcwDevice. This is cleaner
because there is no guarantee that the bus is on a virtio-scsi device;
that is only the case for the default configuration of QEMU's s390x
target.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
hw/s390x/ipl.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index eb7fc4c4ae..9051d8652d 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -376,14 +376,18 @@ static CcwDevice *s390_get_ccw_device(DeviceState *dev_st, int *devtype)
object_dynamic_cast(OBJECT(dev_st),
TYPE_SCSI_DEVICE);
if (sd) {
- SCSIBus *bus = scsi_bus_from_device(sd);
- VirtIOSCSI *vdev = container_of(bus, VirtIOSCSI, bus);
- VirtIOSCSICcw *scsi_ccw = container_of(vdev, VirtIOSCSICcw,
- vdev);
-
- ccw_dev = (CcwDevice *)object_dynamic_cast(OBJECT(scsi_ccw),
- TYPE_CCW_DEVICE);
- tmp_dt = CCW_DEVTYPE_SCSI;
+ SCSIBus *sbus = scsi_bus_from_device(sd);
+ VirtIODevice *vdev = (VirtIODevice *)
+ object_dynamic_cast(OBJECT(sbus->qbus.parent),
+ TYPE_VIRTIO_DEVICE);
+ if (vdev) {
+ ccw_dev = (CcwDevice *)
+ object_dynamic_cast(OBJECT(qdev_get_parent_bus(DEVICE(vdev))->parent),
+ TYPE_CCW_DEVICE);
+ if (ccw_dev) {
+ tmp_dt = CCW_DEVTYPE_SCSI;
+ }
+ }
}
}
}
--
2.37.3