lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9911d37b-eff6-2562-2e52-7bcd656186c0@linux.intel.com>
Date: Mon, 30 Jun 2025 14:55:41 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: "David E. Box" <david.e.box@...ux.intel.com>
cc: LKML <linux-kernel@...r.kernel.org>, platform-driver-x86@...r.kernel.org, 
    srinivas.pandruvada@...ux.intel.com, 
    Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, tony.luck@...el.com, 
    xi.pardee@...ux.intel.com, Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH V2 11/15] platform/x86/intel/vsec: Set OOBMSM to CPU
 mapping

On Mon, 16 Jun 2025, David E. Box wrote:

> Add functions, intel_vsec_set/get_mapping(), to set and retrieve the
> OOBMSM-to-CPU mapping data in the private data of the parent Intel VSEC
> driver. With this mapping information available, other Intel VSEC features
> on the same OOBMSM device can easily access and use the mapping data,
> allowing each of the OOBMSM features to map to the CPUs they provides data
> for.
> 
> Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
> ---
> 
> Changes in v2:
>   - No changes
> 
>  drivers/platform/x86/intel/vsec.c | 31 +++++++++++++++++++++++++++++++
>  include/linux/intel_vsec.h        | 14 ++++++++++++++
>  2 files changed, 45 insertions(+)
> 
> diff --git a/drivers/platform/x86/intel/vsec.c b/drivers/platform/x86/intel/vsec.c
> index 98f570a389c6..8c330b57e4d4 100644
> --- a/drivers/platform/x86/intel/vsec.c
> +++ b/drivers/platform/x86/intel/vsec.c
> @@ -43,6 +43,7 @@ enum vsec_device_state {
>  struct vsec_priv {
>  	struct intel_vsec_platform_info *info;
>  	struct device *suppliers[VSEC_FEATURE_COUNT];
> +	struct oobmsm_plat_info plat_info;
>  	enum vsec_device_state state[VSEC_FEATURE_COUNT];
>  	unsigned long found_caps;
>  };
> @@ -660,6 +661,36 @@ static int intel_vsec_pci_probe(struct pci_dev *pdev, const struct pci_device_id
>  	return 0;
>  }
>  
> +int intel_vsec_set_mapping(struct oobmsm_plat_info *plat_info,
> +			   struct intel_vsec_device *vsec_dev)
> +{
> +	struct vsec_priv *priv;
> +
> +	priv = pci_get_drvdata(vsec_dev->pcidev);
> +	if (!priv)
> +		return -EINVAL;
> +
> +	priv->plat_info = *plat_info;
> +
> +	return 0;
> +}
> +EXPORT_SYMBOL_NS_GPL(intel_vsec_set_mapping, "INTEL_VSEC");
> +
> +struct oobmsm_plat_info *intel_vsec_get_mapping(struct pci_dev *pdev)
> +{
> +	struct vsec_priv *priv;
> +
> +	if (!pci_match_id(intel_vsec_pci_ids, pdev))
> +		return ERR_PTR(-EINVAL);
> +
> +	priv = pci_get_drvdata(pdev);
> +	if (!priv)
> +		return ERR_PTR(-EINVAL);
> +
> +	return &priv->plat_info;
> +}
> +EXPORT_SYMBOL_NS_GPL(intel_vsec_get_mapping, "INTEL_VSEC");
> +
>  /* DG1 info */
>  static struct intel_vsec_header dg1_header = {
>  	.length = 0x10,
> diff --git a/include/linux/intel_vsec.h b/include/linux/intel_vsec.h
> index cd78d0b2e623..b15155ff1154 100644
> --- a/include/linux/intel_vsec.h
> +++ b/include/linux/intel_vsec.h
> @@ -170,6 +170,8 @@ int intel_vsec_add_aux(struct pci_dev *pdev, struct device *parent,
>  		       struct intel_vsec_device *intel_vsec_dev,
>  		       const char *name);
>  
> +int intel_vsec_suppliers_ready(struct intel_vsec_device *vsec_dev,
> +			       unsigned long needs);

There's no code for this anywhere in the series??

>  static inline struct intel_vsec_device *dev_to_ivdev(struct device *dev)
>  {
>  	return container_of(dev, struct intel_vsec_device, auxdev.dev);
> @@ -183,11 +185,23 @@ static inline struct intel_vsec_device *auxdev_to_ivdev(struct auxiliary_device
>  #if IS_ENABLED(CONFIG_INTEL_VSEC)
>  int intel_vsec_register(struct pci_dev *pdev,
>  			 struct intel_vsec_platform_info *info);
> +int intel_vsec_set_mapping(struct oobmsm_plat_info *plat_info,
> +			   struct intel_vsec_device *vsec_dev);
> +struct oobmsm_plat_info *intel_vsec_get_mapping(struct pci_dev *pdev);
>  #else
>  static inline int intel_vsec_register(struct pci_dev *pdev,
>  				       struct intel_vsec_platform_info *info)
>  {
>  	return -ENODEV;
>  }
> +static inline int intel_vsec_set_mapping(struct oobmsm_plat_info *plat_info,
> +					 struct intel_vsec_device *vsec_dev)
> +{
> +	return -ENODEV;
> +}
> +static inline struct oobmsm_plat_info *intel_vsec_get_mapping(struct pci_dev *pdev)
> +{
> +	return ERR_PTR(-ENODEV);
> +}
>  #endif
>  #endif
> 

-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ