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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aN8uEHZzd2cCOYoK@yilunxu-OptiPlex-7050>
Date: Fri, 3 Oct 2025 09:59:44 +0800
From: Xu Yilun <yilun.xu@...ux.intel.com>
To: dan.j.williams@...el.com
Cc: linux-coco@...ts.linux.dev, linux-pci@...r.kernel.org,
	yilun.xu@...el.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

On Tue, Sep 30, 2025 at 05:24:06PM -0700, dan.j.williams@...el.com wrote:
> 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.

Do you mean PCI IDE should provide the collapsed raw RID/Address
Association Register values for platform TSM drivers? TDX needs these
raw values for SEAMCALLs.

> 
> 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