PCI: vmd: Do not change the Hotplug setting on VMD rootports
Subsystems (3)
Nirmal Patel
maintainerPATCH v2 1/1 PCI: vmd: Do not change the 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.
When BIOS boots, all root ports under VMD is inaccessible by BIOS and they maintain their power on default states. The VMD UEFI driver loads and configure all devices under VMD. This is how AER, power management, DPC and hotplug gets enabled in UEFI, since the BIOS pci driver cannot access the root ports. With the absence of VMD UEFI driver in Guest, Hotplug stays Disabled.
This change will cause the hot plug to start working again in guest, as the settings implemented by the UEFI VMD DXE driver will remain in effect in the Guest OS.
--- 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
Patel, Nirmal
maintainerQuoted 30 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.
When BIOS boots, all root ports under VMD is inaccessible by BIOS and they maintain their power on default states. The VMD UEFI driver loads and configure all devices under VMD. This is how AER, power management, DPC and hotplug gets enabled in UEFI, since the BIOS pci driver cannot access the root ports. With the absence of VMD UEFI driver in Guest, Hotplug stays Disabled.
This change will cause the hot plug to start working again in guest, as the settings implemented by the UEFI VMD DXE driver will remain in effect in the Guest OS.
Signed-off-by Nirmal Patel <[email protected]>--- drivers/pci/controller/vmd.c | 2 -- 1 file changed, 2 deletions(-)drivers/pci/controller/vmd.c +0
-0
drivers/pci/controller/vmd.c static int vmd_alloc_irqs(struct vmd_dev *vmd) · line 706
Quoted 8 lines
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;
Gentle ping!
Thanks.
Lorenzo Pieralisi
maintainerQuoted 2 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.
What about the configurations that are actually working ?
Will this patch change anything on that front ?
Quoted 13 lines
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.
When BIOS boots, all root ports under VMD is inaccessible by BIOS and they maintain their power on default states. The VMD UEFI driver loads and configure all devices under VMD. This is how AER, power management, DPC and hotplug gets enabled in UEFI, since the BIOS pci driver cannot access the root ports. With the absence of VMD UEFI driver in Guest, Hotplug stays Disabled.
Quoted 3 lines
This change will cause the hot plug to start working again in guest, as the settings implemented by the UEFI VMD DXE driver will remain in effect in the Guest OS.
This explanation is unclear to me - in particular the link between code changes and the commit log. Please write a commit log that explains and justifies the changes you are making below.
Thanks,
Lorenzo
Quoted 21 lines
Signed-off-by Nirmal Patel <[email protected]>--- 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
Patel, Nirmal
maintainerQuoted 6 lines · Lorenzo Pieralisi
Quoted 2 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.
What about the configurations that are actually working ?
Will this patch change anything on that front ?
None of the Guest - Host combinations are working. This change with fix all the scenarios.
Quoted 17 lines
Quoted 14 lines
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.
When BIOS boots, all root ports under VMD is inaccessible by BIOS and they maintain their power on default states. The VMD UEFI driver loads and configure all devices under VMD. This is how AER, power management, DPC and hotplug gets enabled in UEFI, since the BIOS pci driver cannot access the root ports. With the absence of VMD UEFI driver in Guest, Hotplug stays Disabled.
Quoted 3 lines
This change will cause the hot plug to start working again in guest, as the settings implemented by the UEFI VMD DXE driver will remain in effect in the Guest OS.
Quoted 6 lines
This explanation is unclear to me - in particular the link between code changes and the commit log. Please write a commit log that explains and justifies the changes you are making below.
Thanks,
Lorenzo
will do.
Quoted 22 lines
Quoted 22 lines
Signed-off-by Nirmal Patel <[email protected]>--- 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