Accepting request 879686 from home:bfrogers:branches:Virtualization
- Fix s390x "mediated device is in use" error condition (bsc#1183634) update-linux-headers-Include-const.h.patch Update-linux-headers-to-5.11-rc2.patch vfio-ccw-Connect-the-device-request-noti.patch OBS-URL: https://build.opensuse.org/request/show/879686 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=630
This commit is contained in:
parent
2746ce73b5
commit
0cf745d181
1017
Update-linux-headers-to-5.11-rc2.patch
Normal file
1017
Update-linux-headers-to-5.11-rc2.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b7ff5cf2fc82b361e7b07710e20758d230d543d7d1c967bdf131b5793573207e
|
||||
size 68660
|
||||
oid sha256:5eea7b1721613d6f843d6e94469431d4382e88e106bff9ac121acfcab88df9fc
|
||||
size 79240
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 17 13:07:33 UTC 2021 - Bruce Rogers <brogers@suse.com>
|
||||
|
||||
- Fix s390x "mediated device is in use" error condition
|
||||
(bsc#1183634)
|
||||
update-linux-headers-Include-const.h.patch
|
||||
Update-linux-headers-to-5.11-rc2.patch
|
||||
vfio-ccw-Connect-the-device-request-noti.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 16 22:33:26 UTC 2021 - Bruce Rogers <brogers@suse.com>
|
||||
|
||||
|
142
qemu.spec
142
qemu.spec
@ -150,68 +150,71 @@ Patch00014: target-arm-Introduce-PREDDESC-field-defi.patch
|
||||
Patch00015: target-arm-Update-PFIRST-PNEXT-for-pred_.patch
|
||||
Patch00016: target-arm-Update-ZIP-UZP-TRN-for-pred_d.patch
|
||||
Patch00017: target-arm-Update-REV-PUNPK-for-pred_des.patch
|
||||
Patch00018: net-Fix-handling-of-id-in-netdev_add-and.patch
|
||||
Patch00019: block-Separate-blk_is_writable-and-blk_s.patch
|
||||
Patch00020: hw-intc-arm_gic-Fix-interrupt-ID-in-GICD.patch
|
||||
Patch00021: virtio-move-use-disabled-flag-property-t.patch
|
||||
Patch00022: qemu-nbd-Use-SOMAXCONN-for-socket-listen.patch
|
||||
Patch00023: qemu-storage-daemon-Enable-object-add.patch
|
||||
Patch00024: blockjob-Fix-crash-with-IOthread-when-bl.patch
|
||||
Patch00025: monitor-Fix-assertion-failure-on-shutdow.patch
|
||||
Patch00026: spice-app-avoid-crash-when-core-spice-mo.patch
|
||||
Patch00027: i386-acpi-restore-device-paths-for-pre-5.patch
|
||||
Patch00028: hw-s390x-fix-build-for-virtio-9p-ccw.patch
|
||||
Patch00029: s390x-pci-restore-missing-Query-PCI-Func.patch
|
||||
Patch00030: lsilogic-Use-PCIDevice-exit-instead-of-D.patch
|
||||
Patch00031: vhost-user-blk-fix-blkcfg-num_queues-end.patch
|
||||
Patch00032: e1000-fail-early-for-evil-descriptor.patch
|
||||
Patch00033: hw-s390x-modularize-virtio-gpu-ccw.patch
|
||||
Patch00034: net-vmxnet3-validate-configuration-value.patch
|
||||
Patch00035: XXX-dont-dump-core-on-sigabort.patch
|
||||
Patch00036: qemu-binfmt-conf-Modify-default-path.patch
|
||||
Patch00037: qemu-cvs-gettimeofday.patch
|
||||
Patch00038: qemu-cvs-ioctl_debug.patch
|
||||
Patch00039: qemu-cvs-ioctl_nodirection.patch
|
||||
Patch00040: linux-user-add-binfmt-wrapper-for-argv-0.patch
|
||||
Patch00041: PPC-KVM-Disable-mmu-notifier-check.patch
|
||||
Patch00042: linux-user-binfmt-support-host-binaries.patch
|
||||
Patch00043: linux-user-Fake-proc-cpuinfo.patch
|
||||
Patch00044: linux-user-use-target_ulong.patch
|
||||
Patch00045: Make-char-muxer-more-robust-wrt-small-FI.patch
|
||||
Patch00046: linux-user-lseek-explicitly-cast-non-set.patch
|
||||
Patch00047: AIO-Reduce-number-of-threads-for-32bit-h.patch
|
||||
Patch00048: xen_disk-Add-suse-specific-flush-disable.patch
|
||||
Patch00049: qemu-bridge-helper-reduce-security-profi.patch
|
||||
Patch00050: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch
|
||||
Patch00051: roms-Makefile-pass-a-packaging-timestamp.patch
|
||||
Patch00052: Raise-soft-address-space-limit-to-hard-l.patch
|
||||
Patch00053: increase-x86_64-physical-bits-to-42.patch
|
||||
Patch00054: i8254-Fix-migration-from-SLE11-SP2.patch
|
||||
Patch00055: acpi_piix4-Fix-migration-from-SLE11-SP2.patch
|
||||
Patch00056: Make-installed-scripts-explicitly-python.patch
|
||||
Patch00057: hw-smbios-handle-both-file-formats-regar.patch
|
||||
Patch00058: xen-add-block-resize-support-for-xen-dis.patch
|
||||
Patch00059: tests-qemu-iotests-Triple-timeout-of-i-o.patch
|
||||
Patch00060: tests-Fix-block-tests-to-be-compatible-w.patch
|
||||
Patch00061: xen-ignore-live-parameter-from-xen-save-.patch
|
||||
Patch00062: tests-change-error-message-in-test-162.patch
|
||||
Patch00063: hw-intc-exynos4210_gic-provide-more-room.patch
|
||||
Patch00064: configure-only-populate-roms-if-softmmu.patch
|
||||
Patch00065: pc-bios-s390-ccw-net-avoid-warning-about.patch
|
||||
Patch00066: roms-change-cross-compiler-naming-to-be-.patch
|
||||
Patch00067: test-add-mapping-from-arch-of-i686-to-qe.patch
|
||||
Patch00068: configure-remove-pkgversion-from-CONFIG_.patch
|
||||
Patch00069: docs-add-SUSE-support-statements-to-html.patch
|
||||
Patch00070: s390x-Fix-stringop-truncation-issue-repo.patch
|
||||
Patch00071: Revert-qht-constify-qht_statistics_init.patch
|
||||
Patch00072: qht-Revert-some-constification-in-qht.c.patch
|
||||
Patch00073: meson-install-ivshmem-client-and-ivshmem.patch
|
||||
Patch00074: Revert-roms-efirom-tests-uefi-test-tools.patch
|
||||
Patch00075: Makefile-Don-t-check-pc-bios-as-pre-requ.patch
|
||||
Patch00076: roms-Makefile-add-cross-file-to-qboot-me.patch
|
||||
Patch00077: usb-Help-compiler-out-to-avoid-a-warning.patch
|
||||
Patch00078: module-for-virtio-gpu-pre-load-module-to.patch
|
||||
Patch00079: qom-handle-case-of-chardev-spice-module-.patch
|
||||
Patch00018: update-linux-headers-Include-const.h.patch
|
||||
Patch00019: Update-linux-headers-to-5.11-rc2.patch
|
||||
Patch00020: vfio-ccw-Connect-the-device-request-noti.patch
|
||||
Patch00021: net-Fix-handling-of-id-in-netdev_add-and.patch
|
||||
Patch00022: block-Separate-blk_is_writable-and-blk_s.patch
|
||||
Patch00023: hw-intc-arm_gic-Fix-interrupt-ID-in-GICD.patch
|
||||
Patch00024: virtio-move-use-disabled-flag-property-t.patch
|
||||
Patch00025: qemu-nbd-Use-SOMAXCONN-for-socket-listen.patch
|
||||
Patch00026: qemu-storage-daemon-Enable-object-add.patch
|
||||
Patch00027: blockjob-Fix-crash-with-IOthread-when-bl.patch
|
||||
Patch00028: monitor-Fix-assertion-failure-on-shutdow.patch
|
||||
Patch00029: spice-app-avoid-crash-when-core-spice-mo.patch
|
||||
Patch00030: i386-acpi-restore-device-paths-for-pre-5.patch
|
||||
Patch00031: hw-s390x-fix-build-for-virtio-9p-ccw.patch
|
||||
Patch00032: s390x-pci-restore-missing-Query-PCI-Func.patch
|
||||
Patch00033: lsilogic-Use-PCIDevice-exit-instead-of-D.patch
|
||||
Patch00034: vhost-user-blk-fix-blkcfg-num_queues-end.patch
|
||||
Patch00035: e1000-fail-early-for-evil-descriptor.patch
|
||||
Patch00036: hw-s390x-modularize-virtio-gpu-ccw.patch
|
||||
Patch00037: net-vmxnet3-validate-configuration-value.patch
|
||||
Patch00038: XXX-dont-dump-core-on-sigabort.patch
|
||||
Patch00039: qemu-binfmt-conf-Modify-default-path.patch
|
||||
Patch00040: qemu-cvs-gettimeofday.patch
|
||||
Patch00041: qemu-cvs-ioctl_debug.patch
|
||||
Patch00042: qemu-cvs-ioctl_nodirection.patch
|
||||
Patch00043: linux-user-add-binfmt-wrapper-for-argv-0.patch
|
||||
Patch00044: PPC-KVM-Disable-mmu-notifier-check.patch
|
||||
Patch00045: linux-user-binfmt-support-host-binaries.patch
|
||||
Patch00046: linux-user-Fake-proc-cpuinfo.patch
|
||||
Patch00047: linux-user-use-target_ulong.patch
|
||||
Patch00048: Make-char-muxer-more-robust-wrt-small-FI.patch
|
||||
Patch00049: linux-user-lseek-explicitly-cast-non-set.patch
|
||||
Patch00050: AIO-Reduce-number-of-threads-for-32bit-h.patch
|
||||
Patch00051: xen_disk-Add-suse-specific-flush-disable.patch
|
||||
Patch00052: qemu-bridge-helper-reduce-security-profi.patch
|
||||
Patch00053: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch
|
||||
Patch00054: roms-Makefile-pass-a-packaging-timestamp.patch
|
||||
Patch00055: Raise-soft-address-space-limit-to-hard-l.patch
|
||||
Patch00056: increase-x86_64-physical-bits-to-42.patch
|
||||
Patch00057: i8254-Fix-migration-from-SLE11-SP2.patch
|
||||
Patch00058: acpi_piix4-Fix-migration-from-SLE11-SP2.patch
|
||||
Patch00059: Make-installed-scripts-explicitly-python.patch
|
||||
Patch00060: hw-smbios-handle-both-file-formats-regar.patch
|
||||
Patch00061: xen-add-block-resize-support-for-xen-dis.patch
|
||||
Patch00062: tests-qemu-iotests-Triple-timeout-of-i-o.patch
|
||||
Patch00063: tests-Fix-block-tests-to-be-compatible-w.patch
|
||||
Patch00064: xen-ignore-live-parameter-from-xen-save-.patch
|
||||
Patch00065: tests-change-error-message-in-test-162.patch
|
||||
Patch00066: hw-intc-exynos4210_gic-provide-more-room.patch
|
||||
Patch00067: configure-only-populate-roms-if-softmmu.patch
|
||||
Patch00068: pc-bios-s390-ccw-net-avoid-warning-about.patch
|
||||
Patch00069: roms-change-cross-compiler-naming-to-be-.patch
|
||||
Patch00070: test-add-mapping-from-arch-of-i686-to-qe.patch
|
||||
Patch00071: configure-remove-pkgversion-from-CONFIG_.patch
|
||||
Patch00072: docs-add-SUSE-support-statements-to-html.patch
|
||||
Patch00073: s390x-Fix-stringop-truncation-issue-repo.patch
|
||||
Patch00074: Revert-qht-constify-qht_statistics_init.patch
|
||||
Patch00075: qht-Revert-some-constification-in-qht.c.patch
|
||||
Patch00076: meson-install-ivshmem-client-and-ivshmem.patch
|
||||
Patch00077: Revert-roms-efirom-tests-uefi-test-tools.patch
|
||||
Patch00078: Makefile-Don-t-check-pc-bios-as-pre-requ.patch
|
||||
Patch00079: roms-Makefile-add-cross-file-to-qboot-me.patch
|
||||
Patch00080: usb-Help-compiler-out-to-avoid-a-warning.patch
|
||||
Patch00081: module-for-virtio-gpu-pre-load-module-to.patch
|
||||
Patch00082: qom-handle-case-of-chardev-spice-module-.patch
|
||||
# Patches applied in roms/seabios/:
|
||||
Patch01000: seabios-use-python2-explicitly-as-needed.patch
|
||||
Patch01001: seabios-switch-to-python3-as-needed.patch
|
||||
@ -1109,23 +1112,26 @@ This package records qemu testsuite results and represents successful testing.
|
||||
%patch00066 -p1
|
||||
%patch00067 -p1
|
||||
%patch00068 -p1
|
||||
%if %{legacy_qemu_kvm}
|
||||
%patch00069 -p1
|
||||
%endif
|
||||
%patch00070 -p1
|
||||
%patch00071 -p1
|
||||
%if %{legacy_qemu_kvm}
|
||||
%patch00072 -p1
|
||||
%endif
|
||||
%patch00073 -p1
|
||||
%patch00074 -p1
|
||||
%patch00075 -p1
|
||||
%ifarch aarch64
|
||||
%patch00076 -p1
|
||||
%patch00077 -p1
|
||||
%patch00078 -p1
|
||||
%ifarch aarch64
|
||||
%patch00079 -p1
|
||||
%endif
|
||||
%ifarch %arm %ix86 ppc
|
||||
%patch00077 -p1
|
||||
%patch00080 -p1
|
||||
%endif
|
||||
%patch00078 -p1
|
||||
%patch00079 -p1
|
||||
%patch00081 -p1
|
||||
%patch00082 -p1
|
||||
%patch01000 -p1
|
||||
%patch01001 -p1
|
||||
%patch01002 -p1
|
||||
|
48
update-linux-headers-Include-const.h.patch
Normal file
48
update-linux-headers-Include-const.h.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From: Eric Farman <farman@linux.ibm.com>
|
||||
Date: Mon, 4 Jan 2021 21:20:55 +0100
|
||||
Subject: update-linux-headers: Include const.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Git-commit: ab5ec23f9cc25215c1281d575c07c0f35e8e9e26
|
||||
References: bsc#1183634
|
||||
|
||||
Kernel commit a85cbe6159ff ("uapi: move constants from
|
||||
<linux/kernel.h> to <linux/const.h>") breaks our script
|
||||
because of the unrecognized include. Let's add that to
|
||||
our processing.
|
||||
|
||||
Signed-off-by: Eric Farman <farman@linux.ibm.com>
|
||||
Reviewed-by: Peter Xu <peterx@redhat.com>
|
||||
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
||||
Message-Id: <20210104202057.48048-2-farman@linux.ibm.com>
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||||
---
|
||||
scripts/update-linux-headers.sh | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
|
||||
index 9efbaf2f84b38bee183517934b84..fa6f2b6272b78223d28f4c823858 100755
|
||||
--- a/scripts/update-linux-headers.sh
|
||||
+++ b/scripts/update-linux-headers.sh
|
||||
@@ -41,6 +41,7 @@ cp_portable() {
|
||||
-e 'pvrdma_verbs' \
|
||||
-e 'drm.h' \
|
||||
-e 'limits' \
|
||||
+ -e 'linux/const' \
|
||||
-e 'linux/kernel' \
|
||||
-e 'linux/sysinfo' \
|
||||
-e 'asm-generic/kvm_para' \
|
||||
@@ -190,7 +191,9 @@ for i in "$tmpdir"/include/linux/*virtio*.h \
|
||||
"$tmpdir/include/linux/input.h" \
|
||||
"$tmpdir/include/linux/input-event-codes.h" \
|
||||
"$tmpdir/include/linux/pci_regs.h" \
|
||||
- "$tmpdir/include/linux/ethtool.h" "$tmpdir/include/linux/kernel.h" \
|
||||
+ "$tmpdir/include/linux/ethtool.h" \
|
||||
+ "$tmpdir/include/linux/const.h" \
|
||||
+ "$tmpdir/include/linux/kernel.h" \
|
||||
"$tmpdir/include/linux/vhost_types.h" \
|
||||
"$tmpdir/include/linux/sysinfo.h"; do
|
||||
cp_portable "$i" "$output/include/standard-headers/linux"
|
115
vfio-ccw-Connect-the-device-request-noti.patch
Normal file
115
vfio-ccw-Connect-the-device-request-noti.patch
Normal file
@ -0,0 +1,115 @@
|
||||
From: Eric Farman <farman@linux.ibm.com>
|
||||
Date: Mon, 4 Jan 2021 21:20:57 +0100
|
||||
Subject: vfio-ccw: Connect the device request notifier
|
||||
|
||||
Git-commit: b2f96f9e4f5fbc8f2770a436191cb328da4d5350
|
||||
References: 1183634
|
||||
|
||||
Now that the vfio-ccw code has a notifier interface to request that
|
||||
a device be unplugged, let's wire that together.
|
||||
|
||||
Signed-off-by: Eric Farman <farman@linux.ibm.com>
|
||||
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Message-Id: <20210104202057.48048-4-farman@linux.ibm.com>
|
||||
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
||||
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||||
---
|
||||
hw/vfio/ccw.c | 40 ++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 36 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
|
||||
index d2755d7fc5cace038ca7e4f87822..bc78a0ad7638c329bbc06a69a432 100644
|
||||
--- a/hw/vfio/ccw.c
|
||||
+++ b/hw/vfio/ccw.c
|
||||
@@ -49,6 +49,7 @@ struct VFIOCCWDevice {
|
||||
struct ccw_crw_region *crw_region;
|
||||
EventNotifier io_notifier;
|
||||
EventNotifier crw_notifier;
|
||||
+ EventNotifier req_notifier;
|
||||
bool force_orb_pfch;
|
||||
bool warned_orb_pfch;
|
||||
};
|
||||
@@ -287,6 +288,21 @@ static void vfio_ccw_crw_read(VFIOCCWDevice *vcdev)
|
||||
} while (1);
|
||||
}
|
||||
|
||||
+static void vfio_ccw_req_notifier_handler(void *opaque)
|
||||
+{
|
||||
+ VFIOCCWDevice *vcdev = opaque;
|
||||
+ Error *err = NULL;
|
||||
+
|
||||
+ if (!event_notifier_test_and_clear(&vcdev->req_notifier)) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ qdev_unplug(DEVICE(vcdev), &err);
|
||||
+ if (err) {
|
||||
+ warn_reportf_err(err, VFIO_MSG_PREFIX, vcdev->vdev.name);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void vfio_ccw_crw_notifier_handler(void *opaque)
|
||||
{
|
||||
VFIOCCWDevice *vcdev = opaque;
|
||||
@@ -386,6 +402,10 @@ static void vfio_ccw_register_irq_notifier(VFIOCCWDevice *vcdev,
|
||||
notifier = &vcdev->crw_notifier;
|
||||
fd_read = vfio_ccw_crw_notifier_handler;
|
||||
break;
|
||||
+ case VFIO_CCW_REQ_IRQ_INDEX:
|
||||
+ notifier = &vcdev->req_notifier;
|
||||
+ fd_read = vfio_ccw_req_notifier_handler;
|
||||
+ break;
|
||||
default:
|
||||
error_setg(errp, "vfio: Unsupported device irq(%d)", irq);
|
||||
return;
|
||||
@@ -440,6 +460,9 @@ static void vfio_ccw_unregister_irq_notifier(VFIOCCWDevice *vcdev,
|
||||
case VFIO_CCW_CRW_IRQ_INDEX:
|
||||
notifier = &vcdev->crw_notifier;
|
||||
break;
|
||||
+ case VFIO_CCW_REQ_IRQ_INDEX:
|
||||
+ notifier = &vcdev->req_notifier;
|
||||
+ break;
|
||||
default:
|
||||
error_report("vfio: Unsupported device irq(%d)", irq);
|
||||
return;
|
||||
@@ -661,20 +684,28 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
|
||||
|
||||
vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, &err);
|
||||
if (err) {
|
||||
- goto out_notifier_err;
|
||||
+ goto out_io_notifier_err;
|
||||
}
|
||||
|
||||
if (vcdev->crw_region) {
|
||||
vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX, &err);
|
||||
if (err) {
|
||||
- vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX);
|
||||
- goto out_notifier_err;
|
||||
+ goto out_crw_notifier_err;
|
||||
}
|
||||
}
|
||||
|
||||
+ vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_REQ_IRQ_INDEX, &err);
|
||||
+ if (err) {
|
||||
+ goto out_req_notifier_err;
|
||||
+ }
|
||||
+
|
||||
return;
|
||||
|
||||
-out_notifier_err:
|
||||
+out_req_notifier_err:
|
||||
+ vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX);
|
||||
+out_crw_notifier_err:
|
||||
+ vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX);
|
||||
+out_io_notifier_err:
|
||||
vfio_ccw_put_region(vcdev);
|
||||
out_region_err:
|
||||
vfio_ccw_put_device(vcdev);
|
||||
@@ -696,6 +727,7 @@ static void vfio_ccw_unrealize(DeviceState *dev)
|
||||
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
||||
VFIOGroup *group = vcdev->vdev.group;
|
||||
|
||||
+ vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_REQ_IRQ_INDEX);
|
||||
vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX);
|
||||
vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX);
|
||||
vfio_ccw_put_region(vcdev);
|
Loading…
Reference in New Issue
Block a user