drm/i915/huc: Mark firmware as failed on auth failure
Subsystems (2)
PATCH v2 1/2 drm/i915/huc: Mark firmware as failed on auth failure
If we fail to authenticate HuC firmware, we should change its load status to FAIL. While around, print HUC_STATUS on firmware verification failure.
v2: keep the variables sorted by length (Chris)
--- drivers/gpu/drm/i915/intel_huc.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/intel_huc.c +18 -10
@@ -48,6 +48,7 @@ int intel_huc_auth(struct intel_huc *huc)struct drm_i915_private *i915 =huc_to_i915 (huc);struct intel_guc *guc = &i915->guc;struct i915_vma *vma; +u32 status;int ret;if (huc->fw.load_status !=INTEL_UC_FIRMWARE_SUCCESS )
@@ -58,28 +59,35 @@ int intel_huc_auth(struct intel_huc *huc)if (IS_ERR (vma)) { ret =PTR_ERR (vma);DRM_ERROR ("HuC: Failed to pin huc fw object %d\n" , ret); -return ret; + goto fail; } ret =intel_guc_auth_huc (guc,guc_ggtt_offset (vma) + huc->fw.rsa_offset);if (ret) {DRM_ERROR ("HuC: GuC did not ack Auth request %d\n" , ret); - goto out; + goto fail_unpin; }/* Check authentication status, it should be done by now */ - ret =intel_wait_for_register (i915, -HUC_STATUS2 , -HUC_FW_VERIFIED , -HUC_FW_VERIFIED , -50 ); + ret =__intel_wait_for_register (i915, +HUC_STATUS2 , +HUC_FW_VERIFIED , +HUC_FW_VERIFIED , +2 ,50 , &status);if (ret) { -DRM_ERROR ("HuC: Authentication failed %d\n" , ret); - goto out; +DRM_ERROR ("HuC: Firmware not verified %#x\n" , status); + goto fail_unpin; } -out:i915_vma_unpin (vma); +return 0 ; + +fail_unpin: +i915_vma_unpin (vma); +fail: + huc->fw.load_status =INTEL_UC_FIRMWARE_FAIL ; + +DRM_ERROR ("HuC: Authentication failed %d\n" , ret);return ret; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 2/2 HAX: Enable GuC for CI
v2: except running with HYPERVISOR
--- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/intel_uc.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_params.h +1 -1
@@ -47,7 +47,7 @@ param(int, disable_power_well, -1) \ param(int, enable_ips, 1) \ param(int, invert_brightness, 0) \ - param(int, enable_guc, 0) \ + param(int, enable_guc, -1) \ param(int, guc_log_level, 0) \ param(char *, guc_firmware_path, NULL) \param (char *, huc_firmware_path, NULL) \
drivers/gpu/drm/i915/intel_uc.c +2 -0
@@ -63,6 +63,8 @@ static int __get_platform_enable_guc(struct drm_i915_private *dev_priv) enable_guc |=ENABLE_GUC_LOAD_HUC ;/* Any platform specific fine-tuning can be done here */ +if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) + enable_guc =0 ;return enable_guc; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915/huc: Mark firmware as failed on auth failure
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915/huc: Mark firmware as failed on auth failure
URL : https://patchwork.freedesktop.org/series/39280/
State : success
== Summary ==
Series 39280v1 series starting with [v2,1/2] drm/i915/huc: Mark firmware as failed on auth failure
https://patchwork.freedesktop.org/api/1.0/series/39280/revisions/1/mbox/
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:413s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:424s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:373s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:482s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:278s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:480s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:483s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:467s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:455s fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:390s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:564s fi-cfl-u total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:492s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:413s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:288s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:504s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:386s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:410s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:452s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:416s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:447s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:488s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:445s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:490s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:589s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:424s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:500s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:519s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:486s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:467s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:409s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:430s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:526s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:390s
fi-cnl-y3 failed to collect. IGT log at Patchwork_8215/fi-cnl-y3/run0.log
7075ab436b3bb8b97dfde3eb16b2545398938f83 drm-tip: 2018y-03m-02d-13h-04m-00s UTC integration manifest 7d0df29c1a92 HAX: Enable GuC for CIad2c01a37e79 drm/i915/huc: Mark firmware as failed on auth failure
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8215/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: failure for series starting with [v2,1/2] drm/i915/huc: Mark firmware as failed on auth failure
In reply to Michal Wajdeczko== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915/huc: Mark firmware as failed on auth failure
URL : https://patchwork.freedesktop.org/series/39280/
State : failure
== Summary ==
---- Possible new issues:
Test drv_missed_irq:
pass -> SKIP (shard-apl)
Test drv_selftest:
Subgroup live_guc:
pass -> DMESG-WARN (shard-apl)
Test kms_cursor_crc:
Subgroup cursor-128x128-suspend:
pass -> SKIP (shard-snb)
Test perf:
Subgroup gen8-unprivileged-single-ctx-counters:
pass -> FAIL (shard-apl)---- Known issues:
Test gem_eio:
Subgroup in-flight-contexts:
pass -> INCOMPLETE (shard-apl) fdo#104945
Test kms_chv_cursor_fail:
Subgroup pipe-b-64x64-right-edge:
pass -> DMESG-WARN (shard-snb) fdo#105185 +1
Test kms_cursor_crc:
Subgroup cursor-256x256-suspend:
pass -> SKIP (shard-snb) fdo#103375fdo#104945 https://bugs.freedesktop.org/show_bug.cgi?id=104945
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
shard-apl total:3442 pass:1802 dwarn:2 dfail:0 fail:13 skip:1624 time:12396s shard-hsw total:3463 pass:1770 dwarn:1 dfail:0 fail:1 skip:1690 time:12247s shard-snb total:3463 pass:1359 dwarn:2 dfail:0 fail:1 skip:2101 time:6918s
Blacklisted hosts:
shard-kbl total:3297 pass:1821 dwarn:2 dfail:1 fail:11 skip:1460 time:9388s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8215/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Michal Wajdeczko (2018-03-02 13:37:17)
Quoted 10 lines
If we fail to authenticate HuC firmware, we should change its load status to FAIL. While around, print
HUC_STATUSon firmware verification failure.v2: keep the variables sorted by length (Chris)
Signed-off-by Michal Wajdeczko <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Anusha Srivatsa <[email protected]>Reviewed-by Chris Wilson <[email protected]>
Pushed, thanks for the patch.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx