From: Xu Yilun <yilun.xu@linux.intel.com>
To: dan.j.williams@intel.com
Cc: linux-coco@lists.linux.dev, linux-pci@vger.kernel.org,
yilun.xu@intel.com, baolu.lu@linux.intel.com,
zhenzhong.duan@intel.com, aneesh.kumar@kernel.org,
bhelgaas@google.com, aik@amd.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI/IDE: Add/export mini helpers for platform TSM drivers
Date: Fri, 3 Oct 2025 09:59:44 +0800 [thread overview]
Message-ID: <aN8uEHZzd2cCOYoK@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <68dc74a6b7348_1fa210058@dwillia2-mobl4.notmuch>
On Tue, Sep 30, 2025 at 05:24:06PM -0700, dan.j.williams@intel.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@linux.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.
next prev parent reply other threads:[~2025-10-03 2:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 6:27 [PATCH 0/3] Address Association Register setup for RP Xu Yilun
2025-09-28 6:27 ` [PATCH 1/3] PCI/IDE: Add/export mini helpers for platform TSM drivers Xu Yilun
2025-10-01 0:24 ` dan.j.williams
2025-10-03 1:59 ` Xu Yilun [this message]
2025-10-03 2:26 ` dan.j.williams
2025-09-28 6:27 ` [PATCH 2/3] PCI/IDE: Add Address Association Register setup for RP Xu Yilun
2025-09-30 12:29 ` Ilpo Järvinen
2025-10-01 0:52 ` dan.j.williams
2025-10-01 10:55 ` Ilpo Järvinen
2025-10-01 19:58 ` dan.j.williams
2025-10-01 20:20 ` dan.j.williams
2025-10-02 13:30 ` Ilpo Järvinen
2025-10-02 15:58 ` dan.j.williams
2025-10-03 5:42 ` Xu Yilun
2025-10-03 18:18 ` dan.j.williams
2025-10-06 3:05 ` Xu Yilun
2025-09-28 6:27 ` [PATCH 3/3] coco/tdx-host: Illustrate IDE Address Association Register setup Xu Yilun
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=aN8uEHZzd2cCOYoK@yilunxu-OptiPlex-7050 \
--to=yilun.xu@linux.intel.com \
--cc=aik@amd.com \
--cc=aneesh.kumar@kernel.org \
--cc=baolu.lu@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=yilun.xu@intel.com \
--cc=zhenzhong.duan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox