linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nirmal Patel <nirmal.patel@linux.intel.com>
To: nirmal.patel@linux.intel.com, <linux-pci@vger.kernel.org>
Subject: [PATCH v2] PCI: vmd: Do not change the Hotplug setting on VMD rootports
Date: Mon, 24 Jul 2023 23:54:05 -0400	[thread overview]
Message-ID: <20230725035405.932765-1-nirmal.patel@linux.intel.com> (raw)

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 <nirmal.patel@linux.intel.com>
---
 drivers/pci/controller/vmd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 769eedeb8802..52c2461b4761 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -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;
-- 
2.31.1


             reply	other threads:[~2023-07-25  4:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  3:54 Nirmal Patel [this message]
2023-08-17 21:30 ` [PATCH v2] PCI: vmd: Do not change the Hotplug setting on VMD rootports Patel, Nirmal
2023-08-21  9:38 ` Lorenzo Pieralisi
2023-08-21 15:16   ` Patel, Nirmal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230725035405.932765-1-nirmal.patel@linux.intel.com \
    --to=nirmal.patel@linux.intel.com \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).