PCI: vmd: Do not change the BIOS Hotplug setting on VMD rootports
Subsystems (3)
Nirmal Patel
maintainerPATCH v3 1/1 PCI: vmd: Do not change the BIOS Hotplug setting on VMD rootports
The hotplug functionality is broken in various combinations of guest OSes i.e. RHEL, SLES and hypervisors i.e. KVM and ESXI.
During the VMD rootport creation, VMD honors ACPI settings and assigns respective values to Hotplug, AER, DPC, PM etc which works in case of Host OS. But these have been restored back to the power on default state in Guest OSes, which puts the root port hot plug enable to default OFF.
The VMD UEFI driver loads and configure all devices under VMD in Host. This is how AER, power management, DPC and Hotplug gets enabled. Since the Guest BIOS doesn't have VMD UEFI driver, Hotplug along with DPC, AER, PM are Disabled.
This change will make the VMD Host and Guest Driver to keep the settings implemented by the UEFI VMD DXE driver and thus honoring the user selections for Hotplug in the BIOS.
---v2->v3: Update commit log.v1->v2: Update commit log.
--- drivers/pci/controller/vmd.c | 2 -- 1 file changed, 2 deletions(-)
drivers/pci/controller/vmd.c +0 -2
@@ -701,8 +701,6 @@ static int vmd_alloc_irqs(struct vmd_dev *vmd)static void vmd_copy_host_bridge_flags (struct pci_host_bridge *root_bridge,struct pci_host_bridge *vmd_bridge) { - vmd_bridge->native_pcie_hotplug = root_bridge->native_pcie_hotplug; - vmd_bridge->native_shpc_hotplug = root_bridge->native_shpc_hotplug; vmd_bridge->native_aer = root_bridge->native_aer; vmd_bridge->native_pme = root_bridge->native_pme; vmd_bridge->native_ltr = root_bridge->native_ltr;
Signature · 1 line
2.31.1
Lorenzo Pieralisi
maintainerQuoted 9 lines · Nirmal Patel
The hotplug functionality is broken in various combinations of guest OSes i.e. RHEL, SLES and hypervisors i.e. KVM and ESXI.
During the VMD rootport creation, VMD honors ACPI settings and assigns respective values to Hotplug, AER, DPC, PM etc which works in case of Host OS. But these have been restored back to the power on default state in Guest OSes, which puts the root port hot plug enable to default OFF.
Quoted 8 lines
The VMD UEFI driver loads and configure all devices under VMD in Host. This is how AER, power management, DPC and Hotplug gets enabled. Since the Guest BIOS doesn't have VMD UEFI driver, Hotplug along with DPC, AER, PM are Disabled.
This change will make the VMD Host and Guest Driver to keep the settings implemented by the UEFI VMD DXE driver and thus honoring the user selections for Hotplug in the BIOS.
It is still unclear, sorry. AFAICS this patch disables native PCI hotplug and by doing that it allows the guest kernel to keep the hotplug functionality as programmed by the UEFI driver (in the BIOS).
Is that what it does ? If so write it in the commit log please.
Describe:
(1) Current Host boot
(1.1) what UEFI/BIOS does
(1.2) Resulting VMD PCI hotplug configuration
(2) Current Guest boot
(2.1) Resulting VMD PCI hotplug configuration
(3) Problem to solve
(4) How you are solving it
Please write it to the commit log and then I will merge it.
Thanks,
Lorenzo
Quoted 24 lines
Signed-off-by Nirmal Patel <[email protected]>---
v2->v3: Update commit log.v1->v2: Update commit log.--- drivers/pci/controller/vmd.c | 2 -- 1 file changed, 2 deletions(-)drivers/pci/controller/vmd.c +0
-2@@ -701,8 +701,6 @@ static int vmd_alloc_irqs(struct vmd_dev *vmd)static void vmd_copy_host_bridge_flags (struct pci_host_bridge *root_bridge,struct pci_host_bridge *vmd_bridge) { - vmd_bridge->native_pcie_hotplug = root_bridge->native_pcie_hotplug; - vmd_bridge->native_shpc_hotplug = root_bridge->native_shpc_hotplug; vmd_bridge->native_aer = root_bridge->native_aer; vmd_bridge->native_pme = root_bridge->native_pme; vmd_bridge->native_ltr = root_bridge->native_ltr;Signature · 1 line
2.31.1