mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 00:33:58 -04:00
A driver bug was recently discovered where the security firmware was
receiving internal HW signals indicating that session key expirations
had occurred. Architecturally, the firmware was expecting a response
from the GuC to acknowledge the event with the firmware side.
However the OS was in a suspended state and GuC had been reset.
Internal specifications actually required the driver to ensure
that all active sessions be properly cleaned up in such cases where
the system is suspended and the GuC potentially unable to respond.
This patch adds the global teardown code in i915's suspend_prepare
code path.
v2 : Split __pxp_global_teardown_locked helper into two variants
for teardown-with-restart vs teardown-for-suspend/shutdown.
Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Reviewed-by: Juston Li <justonli@chromium.org>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230125082637.118970-6-alan.previn.teres.alexis@intel.com
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright(c) 2020, Intel Corporation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __INTEL_PXP_H__
|
|
#define __INTEL_PXP_H__
|
|
|
|
#include <linux/errno.h>
|
|
#include <linux/types.h>
|
|
|
|
struct drm_i915_gem_object;
|
|
struct drm_i915_private;
|
|
struct intel_pxp;
|
|
|
|
bool intel_pxp_is_supported(const struct intel_pxp *pxp);
|
|
bool intel_pxp_is_enabled(const struct intel_pxp *pxp);
|
|
bool intel_pxp_is_active(const struct intel_pxp *pxp);
|
|
|
|
int intel_pxp_init(struct drm_i915_private *i915);
|
|
void intel_pxp_fini(struct drm_i915_private *i915);
|
|
|
|
void intel_pxp_init_hw(struct intel_pxp *pxp);
|
|
void intel_pxp_fini_hw(struct intel_pxp *pxp);
|
|
|
|
void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp);
|
|
void intel_pxp_tee_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
|
|
|
|
int intel_pxp_start(struct intel_pxp *pxp);
|
|
void intel_pxp_end(struct intel_pxp *pxp);
|
|
|
|
int intel_pxp_key_check(struct intel_pxp *pxp,
|
|
struct drm_i915_gem_object *obj,
|
|
bool assign);
|
|
|
|
void intel_pxp_invalidate(struct intel_pxp *pxp);
|
|
|
|
#endif /* __INTEL_PXP_H__ */
|