aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/pcie_port.c
diff options
context:
space:
mode:
authorJulia Suvorova <jusual@redhat.com>2020-02-26 18:46:07 +0100
committerMichael S. Tsirkin <mst@redhat.com>2020-03-08 09:18:29 -0400
commit530a0963184e57e71a5b538e9161f115df533e96 (patch)
tree291cfc3dfecf070d1d928a2a25847e9e7dcc7ce6 /hw/pci/pcie_port.c
parent67f17e23baca5dd545fe98b01169cc351a70fe35 (diff)
pcie_root_port: Add hotplug disabling option
Make hot-plug/hot-unplug on PCIe Root Ports optional to allow libvirt manage it and restrict unplug for the whole machine. This is going to prevent user-initiated unplug in guests (Windows mostly). Hotplug is enabled by default. Usage: -device pcie-root-port,hotplug=off,... If you want to disable hot-unplug on some downstream ports of one switch, disable hot-unplug on PCIe Root Port connected to the upstream port as well as on the selected downstream ports. Discussion related: https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg00530.html Signed-off-by: Julia Suvorova <jusual@redhat.com> Message-Id: <20200226174607.205941-1-jusual@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
Diffstat (limited to 'hw/pci/pcie_port.c')
-rw-r--r--hw/pci/pcie_port.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci/pcie_port.c b/hw/pci/pcie_port.c
index f8263cb306..eb563ad435 100644
--- a/hw/pci/pcie_port.c
+++ b/hw/pci/pcie_port.c
@@ -147,6 +147,7 @@ static const TypeInfo pcie_port_type_info = {
static Property pcie_slot_props[] = {
DEFINE_PROP_UINT8("chassis", PCIESlot, chassis, 0),
DEFINE_PROP_UINT16("slot", PCIESlot, slot, 0),
+ DEFINE_PROP_BOOL("hotplug", PCIESlot, hotplug, true),
DEFINE_PROP_END_OF_LIST()
};