X86 platform drivers
 help / color / mirror / Atom feed
From: Michael Bottini <michael.a.bottini@intel.com>
To: David Box <david.e.box@linux.intel.com>, Lukas Wunner <lukas@wunner.de>
Cc: "Guangshuo Li" <lgs201920130244@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] platform/x86/intel/vsec: reset state before re-enumerating
Date: Thu, 13 Aug 2026 13:10:00 -0700	[thread overview]
Message-ID: <6d27a65c-3834-4f75-a356-a003bc3557f1@intel.com> (raw)
In-Reply-To: <6m7fuh2na53vrylsnq52qyxzcwnnoszxtl5kvza55ayoxsojyt@g65savkjqb4e>

Hi Lukas,

I've performed a reset recovery test on an Intel Ponte Vecchio machine 
with an OOBMSM PCIe function that vsec binds to.
I injected the following unrecoverable error into the bus with `aer-inject`:

   # fatal.aer
   AER
   DOMAIN 0x0
   BUS 0x84
   DEV 0x0
   FN 0
   UNCOR_STATUS MALF_TLP
   HEADER_LOG 0 0 0 0

Running in Bash:

gta@DUT10580PVC:~$ sudo ./aer-inject/aer-inject -s 0000:82:02.0 fatal.aer

Without the patch, the associated PMT telemetry endpoints don't come back.

   gta@DUT10580PVC:~$ ls -l /sys/class/intel_pmt/ | grep -E 'telem[456]'
   gta@DUT10580PVC:~$ # no output

With the patch that adds a `intel_vsec_reset_state` call, they do come 
back after injecting the error:

   gta@DUT10580PVC:~$ ls -l /sys/class/intel_pmt/ | grep -E 'telem[456]'
   lrwxrwxrwx 1 root root 0 Aug  3 21:32 telem4 -> 
../../devices/pci0000:80/0000:80:05.0/0000:81:00.0/0000:82:02.0/0000:84:00.1/intel_vsec.telemetry.1/intel_pmt/telem4

   lrwxrwxrwx 1 root root 0 Aug  3 21:32 telem5 -> 
../../devices/pci0000:80/0000:80:05.0/0000:81:00.0/0000:82:02.0/0000:84:00.1/intel_vsec.telemetry.1/intel_pmt/telem5

   lrwxrwxrwx 1 root root 0 Aug  3 21:32 telem6 -> 
../../devices/pci0000:80/0000:80:05.0/0000:81:00.0/0000:82:02.0/0000:84:00.1/intel_vsec.telemetry.1/intel_pmt/telem6

Best,
Mike Bottini

On 7/9/26 10:57, David Box wrote:
> On Wed, Jul 08, 2026 at 11:33:07AM +0200, Lukas Wunner wrote:
>> On Wed, Jul 08, 2026 at 11:26:47AM +0800, Guangshuo Li wrote:
>>> +++ b/drivers/platform/x86/intel/vsec.c
>>> @@ -51,6 +51,13 @@ struct vsec_priv {
>>>   	unsigned long found_caps;
>>>   };
>>>   
>>> +static void intel_vsec_reset_state(struct vsec_priv *priv)
>>> +{
>>> +	memset(priv->suppliers, 0, sizeof(priv->suppliers));
>>> +	memset(priv->state, 0, sizeof(priv->state));
>>> +	priv->found_caps = 0;
>>> +}
>> Seems fragile to selectively zero only portions of struct vsec_priv.
>> If the struct is amended later on with additional fields, it's quite
>> possible that nobody thinks about zeroing them here.
>>
>> It's probably more robust to zero the entire struct and re-populate
>> the info field.
>>
>> I also don't think a separate function to reset the struct is necessary
>> as I don't expect additional callers down the road.  So I suggest
>> zeroing the struct inline in intel_vsec_pci_slot_reset().
>>
>> @David Box:  I've asked off-list for reset recovery to be tested,
>> I'm hereby renewing that request.  See section "Software error injection"
>> in: Documentation/PCI/pcieaer-howto.rst
> We'll do the test and let you know. Thanks.
>
> David

      reply	other threads:[~2026-08-13 20:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08  3:26 [PATCH] platform/x86/intel/vsec: reset state before re-enumerating Guangshuo Li
2026-07-08  9:33 ` Lukas Wunner
2026-07-09 17:57   ` David Box
2026-08-13 20:10     ` Michael Bottini [this message]

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=6d27a65c-3834-4f75-a356-a003bc3557f1@intel.com \
    --to=michael.a.bottini@intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=lgs201920130244@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=platform-driver-x86@vger.kernel.org \
    /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