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: <68dc74a6b7348_1fa210058@dwillia2-mobl4.notmuch>
Date: Tue, 30 Sep 2025 17:24:06 -0700
From: <dan.j.williams@...el.com>
To: Xu Yilun <yilun.xu@...ux.intel.com>, <linux-coco@...ts.linux.dev>,
	<linux-pci@...r.kernel.org>, <dan.j.williams@...el.com>
CC: <yilun.xu@...el.com>, <yilun.xu@...ux.intel.com>,
	<baolu.lu@...ux.intel.com>, <zhenzhong.duan@...el.com>,
	<aneesh.kumar@...nel.org>, <bhelgaas@...gle.com>, <aik@....com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] PCI/IDE: Add/export mini helpers for platform TSM
 drivers

Xu Yilun wrote:
> These mini helpers are mainly for platform TSM drivers to setup root
> port side configuration. Root port side IDE settings may require
> platform specific firmware calls (e.g. TDX Connect [1]) so could not use
> pci_ide_stream_setup(), but may still share these mini helpers cause
> they also refer to definitions in IDE specification.
> 
> [1]: https://lore.kernel.org/linux-coco/20250919142237.418648-28-dan.j.williams@intel.com/
> 
> Signed-off-by: Xu Yilun <yilun.xu@...ux.intel.com>
> ---
>  include/linux/pci-ide.h | 6 ++++++
>  drivers/pci/ide.c       | 8 +++-----
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/pci-ide.h b/include/linux/pci-ide.h
> index a30f9460b04a..5adbd8b81f65 100644
> --- a/include/linux/pci-ide.h
> +++ b/include/linux/pci-ide.h
> @@ -6,6 +6,11 @@
>  #ifndef __PCI_IDE_H__
>  #define __PCI_IDE_H__
>  
> +#define PREP_PCI_IDE_SEL_RID_2(base, domain)               \
> +	(FIELD_PREP(PCI_IDE_SEL_RID_2_VALID, 1) |          \
> +	 FIELD_PREP(PCI_IDE_SEL_RID_2_BASE, (base)) | \
> +	 FIELD_PREP(PCI_IDE_SEL_RID_2_SEG, (domain)))
> +
>  enum pci_ide_partner_select {
>  	PCI_IDE_EP,
>  	PCI_IDE_RP,
> @@ -61,6 +66,7 @@ struct pci_ide {
>  	struct tsm_dev *tsm_dev;
>  };
>  
> +int pci_ide_domain(struct pci_dev *pdev);
>  struct pci_ide_partner *pci_ide_to_settings(struct pci_dev *pdev, struct pci_ide *ide);
>  struct pci_ide *pci_ide_stream_alloc(struct pci_dev *pdev);
>  void pci_ide_stream_free(struct pci_ide *ide);

So I do not think we need to export these as much as let TSM drivers
reuse more of the common register setup logic.

I will flesh out more of the proposal on the next patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ