Skip to contentSkip to conversation

drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error

PATCH In review Andi Shyti 3 participants 3 messages Sep 26, 2025

Subsystems (3)
lore
Share & tools
lore

Andi Shyti

author
#0 lore raw

PATCH 1/1 drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error

From: Andi Shyti <[email protected]>

Return the actual error code from vfio_set_irqs_validate_and_prepare() instead of always collapsing to -EINVAL. While the helper currently returns -EINVAL in most cases, passing through the real error code is more future-proof.

While at it, drop the stray 'intel:' prefix from the error message.

---
 drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gvt/kvmgt.c +2 -2
index 69830a5c49d3..450a4673c542 100644
@@ -1367,8 +1367,8 @@ static long intel_vgpu_ioctl(struct vfio_device *vfio_dev, unsigned int cmd,
 			ret = vfio_set_irqs_validate_and_prepare(&hdr, max,
 						VFIO_PCI_NUM_IRQS, &data_size);
 			if (ret) {
-				gvt_vgpu_err("intel:vfio_set_irqs_validate_and_prepare failed\n");
-				return -EINVAL;
+				gvt_vgpu_err("vfio_set_irqs_validate_and_prepare failed\n");
+				return ret;
 			}
 			if (data_size) {
 				data = memdup_user((void __user *)(arg + minsz),
Signature · 1 line
2.51.0
#1 lore raw

✗ i915.CI.BAT: failure for drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error

== Series Details ==

== Series Details ==

Series: drm/i915/gvt: Propagate vfio_set_irqs_validate_and_prepare() error
URL : https://patchwork.freedesktop.org/series/155068/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_17271 -> Patchwork_155068v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_155068v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_155068v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_155068v1/index.html

Participating hosts (43 -> 42)
------------------------------

Missing (1): fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_155068v1:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@active:
- bat-dg2-14: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17271/bat-dg2-14/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_155068v1/bat-dg2-14/igt@i915_selftest@[email protected]

Known issues
------------

Here are the changes found in Patchwork_155068v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live:
- bat-dg2-14: [PASS][3] -> [INCOMPLETE][4] ([i915#14911])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17271/bat-dg2-14/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_155068v1/bat-dg2-14/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-6: [PASS][5] -> [DMESG-FAIL][6] ([i915#12061]) +1 other test dmesg-fail
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17271/bat-arls-6/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_155068v1/bat-arls-6/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@workarounds:
- bat-mtlp-9: [DMESG-FAIL][7] ([i915#12061]) -> [PASS][8] +1 other test pass
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17271/bat-mtlp-9/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_155068v1/bat-mtlp-9/igt@i915_selftest@[email protected]

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#14911]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14911

Build changes
-------------

* Linux: CI_DRM_17271 -> Patchwork_155068v1

CI-20190529: 20190529
CI_DRM_17271: 927b4d44359a2e2b1782f80bb5302950d8a7cb6d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8552: 8552
Patchwork_155068v1: 927b4d44359a2e2b1782f80bb5302950d8a7cb6d @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_155068v1/index.html

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Andi Shyti
Quoted 20 lines · Andi Shyti

From: Andi Shyti <[email protected]>

Return the actual error code from vfio_set_irqs_validate_and_prepare() instead of always collapsing to -EINVAL. While the helper currently returns -EINVAL in most cases, passing through the real error code is more future-proof.

While at it, drop the stray 'intel:' prefix from the error message.

---
 drivers/gpu/drm/i915/gvt/kvmgt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gvt/kvmgt.c +0 -0
index 69830a5c49d3..450a4673c542 100644

drivers/gpu/drm/i915/gvt/kvmgt.c static long intel_vgpu_ioctl(struct vfio_device *vfio_dev, unsigned int cmd, · line 1374

Quoted 10 lines
drivers/gpu/drm/i915/gvt/kvmgt.c +2 -2
@@ -1367,8 +1367,8 @@ static long intel_vgpu_ioctl(struct vfio_device *vfio_dev, unsigned int cmd,
 			ret = vfio_set_irqs_validate_and_prepare(&hdr, max,
 						VFIO_PCI_NUM_IRQS, &data_size);
 			if (ret) {
-				gvt_vgpu_err("intel:vfio_set_irqs_validate_and_prepare failed\n");
-				return -EINVAL;
+				gvt_vgpu_err("vfio_set_irqs_validate_and_prepare failed\n");
+				return ret;
 			}
 			if (data_size) {
 				data = memdup_user((void __user *)(arg + minsz),

No problem for that.