Re: [RFC PATCH v6 11/11] PCI/TSM: Add reference-counted contexts for vdevice providers

From: Sonang Patel

Date: Mon Sep 28 2026 - 14:52:34 EST


On Thu, 17 Sep 2026 19:31:59 +0530, Aneesh Kumar K.V (Arm) wrote:
> + if (is_pci_tsm_pf0(pdev)) {
> + if (pci_tsm_disconnect(pdev))
> + pci_warn(pdev, "TSM connection is still in use\n");
> + } else {
> + tsm_remove(pdev->tsm);
> + }

What happens if the PCI device is removed (e.g. sysfs remove, surprise
hot-unplug) while the vDEVICE/TDI still exists?
Since removal cannot be refused, should the remove path still force
the unbind/unlock?

Thanks,
Sonang Patel