<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/controller/vmd.c, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-07-19T14:36:17Z</updated>
<entry>
<title>PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain()</title>
<updated>2023-07-19T14:36:17Z</updated>
<author>
<name>Xinghui Li</name>
</author>
<published>2023-04-20T09:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1a21644254a66edb8ffceab7dcf7a68b1226ce7'/>
<id>urn:sha1:d1a21644254a66edb8ffceab7dcf7a68b1226ce7</id>
<content type='text'>
[ Upstream commit 0c0206dc4f5ba2d18b15e24d2047487d6f73916b ]

The ret variable in the vmd_enable_domain() function was used
uninitialized when printing a warning message upon failure of
the pci_reset_bus() function.

Thus, fix the issue by assigning ret with the value returned from
pci_reset_bus() before referencing it in the warning message.

This was detected by Smatch:

  drivers/pci/controller/vmd.c:931 vmd_enable_domain() error: uninitialized symbol 'ret'.

[kwilczynski: drop the second patch from the series, add missing reported
by tag, commit log]
Fixes: 0a584655ef89 ("PCI: vmd: Fix secondary bus reset for Intel bridges")
Link: https://lore.kernel.org/all/202305270219.B96IiIfv-lkp@intel.com
Link: https://lore.kernel.org/linux-pci/20230420094332.1507900-2-korantwork@gmail.com
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Xinghui Li &lt;korantli@tencent.com&gt;
Signed-off-by: Krzysztof Wilczyński &lt;kwilczynski@kernel.org&gt;
Reviewed-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Reset VMD config register between soft reboots</title>
<updated>2023-07-19T14:36:09Z</updated>
<author>
<name>Nirmal Patel</name>
</author>
<published>2023-02-24T20:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c1e48042e327cbe9ca83a06aec42a7367bb92c4'/>
<id>urn:sha1:1c1e48042e327cbe9ca83a06aec42a7367bb92c4</id>
<content type='text'>
[ Upstream commit b61cf04c49c3dfa70a0d6725d3eb40bf9b35cf71 ]

VMD driver can disable or enable MSI remapping by changing
VMCONFIG_MSI_REMAP register. This register needs to be set to the
default value during soft reboots. Drives failed to enumerate
when Windows boots after performing a soft reboot from Linux.
Windows doesn't support MSI remapping disable feature and stale
register value hinders Windows VMD driver initialization process.
Adding vmd_shutdown function to make sure to set the VMCONFIG
register to the default value.

Link: https://lore.kernel.org/r/20230224202811.644370-1-nirmal.patel@linux.intel.com
Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
Signed-off-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Jon Derrick &lt;jonathan.derrick@linux.dev&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Add quirk to configure PCIe ASPM and LTR</title>
<updated>2023-02-02T15:02:40Z</updated>
<author>
<name>David E. Box</name>
</author>
<published>2023-01-20T03:15:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f492edb40b54862cbd65e6aa5eb39fa40f9949bf'/>
<id>urn:sha1:f492edb40b54862cbd65e6aa5eb39fa40f9949bf</id>
<content type='text'>
PCIe ports reserved for VMD use are not visible to BIOS and therefore not
configured to enable PCIe ASPM or LTR values (which BIOS will configure if
they are not set). Lack of this programming results in high power
consumption on laptops as reported in bugzilla.  For affected products use
pci_enable_link_state to set the allowed link states for devices on the
root ports. Also set the LTR value to the maximum value needed for the SoC.

This is a workaround for products from Rocket Lake through Alder Lake.
Raptor Lake, the latest product at this time, has already implemented LTR
configuring in BIOS. Future products will move ASPM configuration back to
BIOS as well.  As this solution is intended for laptops, support is not
added for hotplug or for devices downstream of a switch on the root port.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=212355
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215063
Link: https://bugzilla.kernel.org/show_bug.cgi?id=213717

Link: https://lore.kernel.org/r/20230120031522.2304439-5-david.e.box@linux.intel.com
Signed-off-by: Michael Bottini &lt;michael.a.bottini@linux.intel.com&gt;
Signed-off-by: David E. Box &lt;david.e.box@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Jon Derrick &lt;jonathan.derrick@linux.dev&gt;
Reviewed-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Create feature grouping for client products</title>
<updated>2023-02-02T15:02:34Z</updated>
<author>
<name>David E. Box</name>
</author>
<published>2023-01-20T03:15:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14d2079af64835494fe5c59ed63222d91a38a624'/>
<id>urn:sha1:14d2079af64835494fe5c59ed63222d91a38a624</id>
<content type='text'>
Simplify the device ID list by creating a grouping of features shared by
client products.

Suggested-by: Jon Derrick &lt;jonathan.derrick@linux.dev&gt;
Link: https://lore.kernel.org/r/20230120031522.2304439-4-david.e.box@linux.intel.com
Signed-off-by: David E. Box &lt;david.e.box@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Use PCI_VDEVICE in device list</title>
<updated>2023-02-02T15:01:57Z</updated>
<author>
<name>David E. Box</name>
</author>
<published>2023-01-20T03:15:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cca0dfecdba3f37c08b7ae99ce07197be84b9281'/>
<id>urn:sha1:cca0dfecdba3f37c08b7ae99ce07197be84b9281</id>
<content type='text'>
Use PCI_VDEVICE to simplify the device table.

Link: https://lore.kernel.org/r/20230120031522.2304439-3-david.e.box@linux.intel.com
Signed-off-by: David E. Box &lt;david.e.box@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Jon Derrick &lt;jonathan.derrick@linux.dev&gt;
Reviewed-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Fix secondary bus reset for Intel bridges</title>
<updated>2022-12-06T10:45:25Z</updated>
<author>
<name>Francisco Munoz</name>
</author>
<published>2022-12-06T00:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a584655ef89541dae4d48d2c523b1480ae80284'/>
<id>urn:sha1:0a584655ef89541dae4d48d2c523b1480ae80284</id>
<content type='text'>
The reset was never applied in the current implementation because Intel
Bridges owned by VMD are parentless. Internally, pci_reset_bus() applies
a reset to the parent of the PCI device supplied as argument, but in this
case it failed because there wasn't a parent.

In more detail, this change allows the VMD driver to enumerate NVMe devices
in pass-through configurations when guest reboots are performed. There was
an attempted to fix this, but later we discovered that the code inside
pci_reset_bus() wasn’t triggering secondary bus resets. Therefore, we
updated the parameters passed to it, and now NVMe SSDs attached to VMD
bridges are properly enumerated in VT-d pass-through scenarios.

Link: https://lore.kernel.org/r/20221206001637.4744-1-francisco.munoz.ruiz@linux.intel.com
Fixes: 6aab5622296b ("PCI: vmd: Clean up domain before enumeration")
Signed-off-by: Francisco Munoz &lt;francisco.munoz.ruiz@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Reviewed-by: Jonathan Derrick &lt;jonathan.derrick@linux.dev&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Disable MSI remapping after suspend</title>
<updated>2022-11-11T11:00:26Z</updated>
<author>
<name>Nirmal Patel</name>
</author>
<published>2022-11-09T14:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d899aa668498c07ff217b666ae9712990306e682'/>
<id>urn:sha1:d899aa668498c07ff217b666ae9712990306e682</id>
<content type='text'>
MSI remapping is disabled by VMD driver for Intel's Icelake and
newer systems in order to improve performance by setting
VMCONFIG_MSI_REMAP. By design VMCONFIG_MSI_REMAP register is cleared
by firmware during boot. The same register gets cleared when system
is put in S3 power state. VMD driver needs to set this register again
in order to avoid interrupt issues with devices behind VMD if MSI
remapping was disabled before.

Link: https://lore.kernel.org/r/20221109142652.450998-1-nirmal.patel@linux.intel.com
Fixes: ee81ee84f873 ("PCI: vmd: Disable MSI-X remapping when possible")
Signed-off-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lpieralisi@kernel.org&gt;
Reviewed-by: Francisco Munoz &lt;francisco.munoz.ruiz@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Add DID 8086:7D0B and 8086:AD0B for Intel MTL SKUs</title>
<updated>2022-06-28T23:36:12Z</updated>
<author>
<name>Francisco Munoz</name>
</author>
<published>2022-06-28T22:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57a128acaba023048585233e7dada9972c2a6b4c'/>
<id>urn:sha1:57a128acaba023048585233e7dada9972c2a6b4c</id>
<content type='text'>
Add support for VMD devices in MTL-H/P/U/S/M with bus restriction mode and
vector 0 disabled for MSI-X remapping.

Link: https://lore.kernel.org/r/20220628221023.190547-1-francisco.munoz.ruiz@linux.intel.com
Signed-off-by: Francisco Munoz &lt;francisco.munoz.ruiz@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Use devm_kasprintf() instead of simple kasprintf()</title>
<updated>2022-06-10T14:46:14Z</updated>
<author>
<name>Subramanian Mohan</name>
</author>
<published>2022-05-31T13:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46d2398c3bc0afaf736c38ccc87cb0e93aa9f29a'/>
<id>urn:sha1:46d2398c3bc0afaf736c38ccc87cb0e93aa9f29a</id>
<content type='text'>
Use devm_kasprintf() instead of simple kasprintf() to free allocated memory
automatically when the device is freed.

Suggested-by: Srikanth Thokala &lt;srikanth.thokala@intel.com&gt;
Link: https://lore.kernel.org/r/20220531132617.20517-1-subramanian.mohan@intel.com
Signed-off-by: Subramanian Mohan &lt;subramanian.mohan@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: vmd: Revert 2565e5b69c44 ("PCI: vmd: Do not disable MSI-X remapping if interrupt remapping is enabled by IOMMU.")</title>
<updated>2022-05-12T14:54:14Z</updated>
<author>
<name>Nirmal Patel</name>
</author>
<published>2022-05-11T09:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c94f732e8001a860b42aa740b0a178a29907463c'/>
<id>urn:sha1:c94f732e8001a860b42aa740b0a178a29907463c</id>
<content type='text'>
Revert 2565e5b69c44 ("PCI: vmd: Do not disable MSI-X remapping if
interrupt remapping is enabled by IOMMU.")

The commit 2565e5b69c44 was added as a workaround to keep MSI-X
remapping enabled if IOMMU enables interrupt remapping. VMD would keep
running in low performance mode. There is no dependency between MSI-X
remapping by VMD and interrupt remapping by IOMMU.

Link: https://lore.kernel.org/r/20220511095707.25403-3-nirmal.patel@linux.intel.com
Signed-off-by: Nirmal Patel &lt;nirmal.patel@linux.intel.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
</content>
</entry>
</feed>
