[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/4] Fix broken PCIe device after migration
|
From: |
Gerd Hoffmann |
|
Subject: |
Re: [PATCH 0/4] Fix broken PCIe device after migration |
|
Date: |
Mon, 28 Feb 2022 08:49:57 +0100 |
Hi,
> Well the control is present, isn't it? Can be used to e.g. reset the
> device behind the bridge.
Well, not right now b/c poweroff ejects the device. Would need a patch
like this ...
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -755,7 +755,8 @@ void pcie_cap_slot_write_config(PCIDevice *dev,
if ((sltsta & PCI_EXP_SLTSTA_PDS) && (val & PCI_EXP_SLTCTL_PCC) &&
(val & PCI_EXP_SLTCTL_PIC_OFF) == PCI_EXP_SLTCTL_PIC_OFF &&
(!(old_slt_ctl & PCI_EXP_SLTCTL_PCC) ||
- (old_slt_ctl & PCI_EXP_SLTCTL_PIC_OFF) != PCI_EXP_SLTCTL_PIC_OFF)) {
+ (old_slt_ctl & PCI_EXP_SLTCTL_PIC_OFF) != PCI_EXP_SLTCTL_PIC_OFF) &&
+ dev->pending_deleted_event) {
pcie_cap_slot_do_unplug(dev);
}
pcie_cap_update_power(dev);
... so pcie unplugs on poweroff only in case there is a pending unplug
request. But with that the guest wouldn't be able to unplug devices on
its own.
take care,
Gerd
- [PATCH 4/4] q35: compat: keep hotplugged PCIe device broken after migration for 6.2-older machine types, (continued)