mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Ruhl, Michael J" <michael.j.ruhl@intel.com>,
	 David Box <david.e.box@linux.intel.com>
Cc: "Brost, Matthew" <matthew.brost@intel.com>,
	 "thomas.hellstrom@linux.intel.com"
	<thomas.hellstrom@linux.intel.com>,
	 "intel-xe@lists.freedesktop.org"
	<intel-xe@lists.freedesktop.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	 "platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>
Subject: RE: [PATCH] platform/x86/intel/vsec: Restore BAR fallback for header walk
Date: Tue, 9 Jun 2026 13:19:39 +0300 (EEST)	[thread overview]
Message-ID: <93ccf8d4-3091-2339-ab1e-7689776d893b@linux.intel.com> (raw)
In-Reply-To: <IA1PR11MB64182D9946206FC3E4A430C4C11C2@IA1PR11MB6418.namprd11.prod.outlook.com>

On Mon, 8 Jun 2026, Ruhl, Michael J wrote:

> >-----Original Message-----
> >From: David Box <david.e.box@linux.intel.com>
> >Sent: Sunday, June 7, 2026 3:39 PM
> >To: Ruhl, Michael J <michael.j.ruhl@intel.com>
> >Cc: ilpo.jarvinen@linux.intel.com; Brost, Matthew
> ><matthew.brost@intel.com>; thomas.hellstrom@linux.intel.com; intel-
> >xe@lists.freedesktop.org; linux-kernel@vger.kernel.org; platform-driver-
> >x86@vger.kernel.org
> >Subject: Re: [PATCH] platform/x86/intel/vsec: Restore BAR fallback for header
> >walk
> >
> >On Wed, Jun 03, 2026 at 06:32:32PM +0000, Ruhl, Michael J wrote:
> >> >-----Original Message-----
> >> >From: David E. Box <david.e.box@linux.intel.com>
> >> >Sent: Friday, May 29, 2026 2:32 PM
> >> >To: ilpo.jarvinen@linux.intel.com; Ruhl, Michael J
> ><michael.j.ruhl@intel.com>;
> >> >david.e.box@linux.intel.com
> >> >Cc: Brost, Matthew <matthew.brost@intel.com>;
> >> >thomas.hellstrom@linux.intel.com; intel-xe@lists.freedesktop.org; linux-
> >> >kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org
> >> >Subject: [PATCH] platform/x86/intel/vsec: Restore BAR fallback for header
> >walk
> >> >
> >> >The base_addr refactor changed intel_vsec_walk_header() to pass
> >> >info->base_addr as the discovery-table base address. For the PCI VSEC
> >> >driver this info comes from driver_data, but exported callers may provide
> >> >their own static headers and leave base_addr unset.
> >> >
> >> >For xe, this made the discovery-table base address zero instead of the BAR
> >> >selected by header->tbir, preventing PMT endpoints from being created.
> >> >
> >> >Restore the previous behavior for the header-walk path by falling back to
> >> >pci_resource_start(pdev, header->tbir) when base_addr is not specified.
> >> >Keep explicit base_addr override behavior unchanged.
> >> >
> >> >This preserves the refactor structure while fixing the functional
> >> >regression in manual-header users.
> >> >
> >> >Fixes: 904b333fc51c ("platform/x86/intel/vsec: Refactor base_addr
> >handling")
> >> >Assisted-by: Claude:claude-sonnet-4-6
> >> >Signed-off-by: David E. Box <david.e.box@linux.intel.com>
> >> >---
> >> > drivers/platform/x86/intel/vsec.c | 17 ++++++++++++++++-
> >> > 1 file changed, 16 insertions(+), 1 deletion(-)
> >> >
> >> >diff --git a/drivers/platform/x86/intel/vsec.c
> >> >b/drivers/platform/x86/intel/vsec.c
> >> >index 1657834fd275..3c6d8a1928c0 100644
> >> >--- a/drivers/platform/x86/intel/vsec.c
> >> >+++ b/drivers/platform/x86/intel/vsec.c
> >> >@@ -482,10 +482,25 @@ static int intel_vsec_walk_header(struct device
> >> >*dev,
> >> > 				  const struct intel_vsec_platform_info *info)
> >> > {
> >> > 	struct intel_vsec_header **header = info->headers;
> >> >+	u64 base_addr;
> >> > 	int ret;
> >> >
> >> > 	for ( ; *header; header++) {
> >> >-		ret = intel_vsec_register_device(dev, *header, info, info-
> >>base_addr);
> >> >+		if (info->base_addr) {
> >> >+			base_addr = info->base_addr;
> >> >+		} else {
> >> >+			struct pci_dev *pdev;
> >> >+
> >> >+			if (!dev_is_pci(dev)) {
> >> >+				dev_err(dev, "non-PCI device without a base
> >address\n");
> >> >+				return -EINVAL;
> >> >+			}
> >> >+
> >> >+			pdev = to_pci_dev(dev);
> >> >+			base_addr = pci_resource_start(pdev, (*header)->tbir);
> >>
> >> Alternate:
> >>
> >> if (!info->base_addr) {
> >> 	struct pci_dev *pdev;
> >>
> >> 	if (!dev_is_pci(dev)) {
> >> 		dev_err(dev, "non-PCI device without a base address\n");
> >> 		return -EINVAL;
> >> 	}
> >>
> >> 	pdev = to_pci_dev(dev);
> >> 	info->base_addr = pci_resource_start(pdev, (*header)->tbir);}
> >> }
> >
> >Thanks. I'll do this in the next patch.
> 
> Looking at one of your follow-on patches, I see that you are setting the info to const...
> 
> So setting the base_addr here, might not be "correct"?
> 
> M
> 
> >>
> >> Would it make sense to require the caller to fill this in?
> >>
> >> i.e. if (!info->base_addr) return EINVAL?
> >>
> >> Change of behavior, but forcing the caller to provide the right info seems
> >reasonable.
> >
> >Agreed. But that would be separate from this fixup patch.
> >
> >>
> >> Either way, this looks reasonable to me.
> >>
> >> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

Hi David,

Could you please enlighten me if I should expect an update to this patch 
or not?

While understanding it doesn't look critical for this patch, I'm unsure 
what follow-up patches you folks are talking about?

-- 
 i.


  reply	other threads:[~2026-06-09 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 18:31 David E. Box
2026-06-03 18:32 ` Ruhl, Michael J
2026-06-07 19:38   ` David Box
2026-06-08 14:05     ` Ruhl, Michael J
2026-06-09 10:19       ` Ilpo Järvinen [this message]
2026-06-09 12:43         ` Ruhl, Michael J
2026-06-09 16:31           ` David Box
2026-06-10 13:29 ` Ilpo Järvinen

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=93ccf8d4-3091-2339-ab1e-7689776d893b@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.brost@intel.com \
    --cc=michael.j.ruhl@intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=thomas.hellstrom@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome