All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Huang, Sean Z" <sean.z.huang@intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	"Intel-gfx@lists.freedesktop.org"
	<Intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [RFC-v1 06/16] drm/i915/pxp: Implement funcs to get/set PXP tag
Date: Wed, 9 Dec 2020 02:57:28 +0000	[thread overview]
Message-ID: <DM6PR11MB4531505FB0B7FA5595991D63D9CC0@DM6PR11MB4531.namprd11.prod.outlook.com> (raw)
In-Reply-To: <160734193807.9322.5386742605604912810@jlahtine-mobl.ger.corp.intel.com>

Hi Joonas,

Yes, I have removed this commit for single session patch series.

-----Original Message-----
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> 
Sent: Monday, December 7, 2020 3:52 AM
To: Huang, Sean Z <sean.z.huang@intel.com>; Intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [RFC-v1 06/16] drm/i915/pxp: Implement funcs to get/set PXP tag

Quoting Huang, Sean Z (2020-12-07 02:21:24)
> Implement the functions to get/set the PXP tag, which is 32-bit 
> bitwise value containing the hardware session info, such as its 
> session id, protection mode or whether it's enabled.
> 
> Signed-off-by: Huang, Sean Z <sean.z.huang@intel.com>

By my understanding, this patch should not be needed at all for singleton session? So I'm mostly skipping review here.

<SNIP>

> -/**
> - * check_if_protected_type0_sessions_are_attacked - To check if type0 active sessions are attacked.
> - * @i915: i915 device handle.
> - *
> - * Return: true if HW shows protected sessions are attacked, false otherwise.
> - */
> -static bool check_if_protected_type0_sessions_are_attacked(struct 
> drm_i915_private *i915) -{
> -       i915_reg_t kcr_status_reg = KCR_STATUS_1;
> -       u32 reg_value = 0;
> -       u32 mask = 0x80000000;
> -       int ret;
> -
> -       if (!i915)
> -               return false;
> -
> -       if (i915->pxp.ctx->global_state_attacked)
> -               return true;
> -
> -       ret = pxp_sm_reg_read(i915, kcr_status_reg.reg, &reg_value);
> -       if (ret) {
> -               drm_err(&i915->drm, "Failed to pxp_sm_reg_read\n");
> -               goto end;
> -       }
> -
> -       if (reg_value & mask)
> -               return true;
> -end:
> -       return false;
> -}

Removal of code added previously in the series?

>  int pxp_sm_set_kcr_init_reg(struct drm_i915_private *i915)  {
>         int ret;
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_sm.h 
> b/drivers/gpu/drm/i915/pxp/intel_pxp_sm.h
> index 222a879be96d..b5012948f971 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_sm.h
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_sm.h
> @@ -20,6 +20,9 @@
>  #define GEN12_KCR_TSIP_LOW  _MMIO(0x32264)   /* KCR type1 session in play 0-31 */
>  #define GEN12_KCR_TSIP_HIGH _MMIO(0x32268)   /* KCR type1 session in play 32-63 */
>  
> +#define SESSION_TYPE_MASK BIT(7)
> +#define SESSION_ID_MASK (BIT(7) - 1)
> +
>  enum pxp_session_types {
>         SESSION_TYPE_TYPE0 = 0,
>         SESSION_TYPE_TYPE1 = 1,
> @@ -36,6 +39,21 @@ enum pxp_protection_modes {
>         PROTECTION_MODE_ALL
>  };
>  
> +struct pxp_tag {
> +       union {
> +               u32 value;
> +               struct {
> +                       u32 session_id  : 8;
> +                       u32 instance_id : 8;
> +                       u32 enable      : 1;
> +                       u32 hm          : 1;
> +                       u32 reserved_1  : 1;
> +                       u32 sm          : 1;
> +                       u32 reserved_2  : 12;
> +               };

It is not obvious if this is a software-only field. If it's software only, we should just make these into normal variables. If it's hardware related, it should be documented as a bitfield, like other hardware writes. We avoid using this construct in i915.

Regards, Joonas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-09  2:57 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  0:21 [Intel-gfx] [RFC-v1 00/16] Introduce Intel PXP component - Mesa single session Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 01/16] drm/i915/pxp: Introduce Intel PXP component Huang, Sean Z
2020-12-07 10:01   ` Joonas Lahtinen
2020-12-07 18:25     ` Huang, Sean Z
2020-12-07 18:48       ` Huang, Sean Z
2020-12-10  9:02         ` Joonas Lahtinen
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 02/16] drm/i915/pxp: Enable PXP irq worker and callback stub Huang, Sean Z
2020-12-07 10:21   ` Joonas Lahtinen
2020-12-08  0:34     ` Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 03/16] drm/i915/pxp: Add PXP context for logical hardware states Huang, Sean Z
2020-12-07 10:50   ` Joonas Lahtinen
2020-12-08 20:11     ` Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 04/16] drm/i915/pxp: set KCR reg init during the boot time Huang, Sean Z
2020-12-07 11:10   ` Joonas Lahtinen
2020-12-09  4:01     ` Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 05/16] drm/i915/pxp: Read register to check hardware session state Huang, Sean Z
2020-12-07 11:44   ` Joonas Lahtinen
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 06/16] drm/i915/pxp: Implement funcs to get/set PXP tag Huang, Sean Z
2020-12-07  1:45   ` kernel test robot
2020-12-07 11:52   ` Joonas Lahtinen
2020-12-09  2:57     ` Huang, Sean Z [this message]
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 07/16] drm/i915/pxp: Implement funcs to create the TEE channel Huang, Sean Z
2020-12-07 11:55   ` Joonas Lahtinen
2020-12-09  5:10     ` Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 08/16] drm/i915/pxp: Create the arbitrary session after boot Huang, Sean Z
2020-12-07 12:00   ` Joonas Lahtinen
2020-12-09  5:11     ` Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 09/16] drm/i915/pxp: Func to send hardware session termination Huang, Sean Z
2020-12-07 12:21   ` Joonas Lahtinen
2020-12-09  5:16     ` Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 10/16] drm/i915/pxp: Destroy arb session upon teardown Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 11/16] drm/i915/pxp: Enable PXP power management Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 12/16] drm/i915/pxp: Expose session state for display protection flip Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 13/16] mei: pxp: export pavp client to me client bus Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 14/16] drm/i915/uapi: introduce drm_i915_gem_create_ext Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 15/16] drm/i915/pxp: User interface for Protected buffer Huang, Sean Z
2020-12-07  0:21 ` [Intel-gfx] [RFC-v1 16/16] drm/i915/pxp: Add plane decryption support Huang, Sean Z
2020-12-07  6:21   ` Anshuman Gupta
2020-12-07  0:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Introduce Intel PXP component - Mesa single session Patchwork
2020-12-07  1:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-12-07  4:01 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR11MB4531505FB0B7FA5595991D63D9CC0@DM6PR11MB4531.namprd11.prod.outlook.com \
    --to=sean.z.huang@intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.