Re: [PATCH] platform/x86/intel/vsec: reset state before re-enumerating
From: Michael Bottini
Date: Thu Aug 13 2026 - 16:10:24 EST
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:We'll do the test and let you know. Thanks.
+++ b/drivers/platform/x86/intel/vsec.cSeems fragile to selectively zero only portions of struct vsec_priv.
@@ -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;
+}
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
David