Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176488890
D60605.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60605.diff
View Options
diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c
--- a/sys/amd64/vmm/io/ppt.c
+++ b/sys/amd64/vmm/io/ppt.c
@@ -482,9 +482,9 @@
if (error != 0)
goto out;
+ /* Mask INTx before MSI teardown (PCI_QUIRK_MSI_INTX_BUG leaves it clear). */
cmd = pci_read_config(ppt->dev, PCIR_COMMAND, 2);
cmd |= PCIM_CMD_INTxDIS;
- cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2);
ppt->resetting = true;
@@ -493,6 +493,9 @@
ppt_unmap_all_mmio(vm, ppt);
ppt_teardown_msi(ppt);
ppt_teardown_msix(ppt);
+ /* Gate decode and DMA after MSI-X teardown, which writes the table BAR. */
+ cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
+ pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2);
pci_save_state(ppt->dev);
ppt_pci_reset(ppt->dev);
pci_restore_state(ppt->dev);
@@ -540,13 +543,15 @@
/*
* Disable physical INTx before releasing its handler. This also makes
* an asserted Function send Deassert_INTx before FLR, as required by
- * PCIe. Gate decoding and DMA before tearing down MSI or MSI-X.
+ * PCIe.
*/
cmd = original_cmd | PCIM_CMD_INTxDIS;
- cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2);
ppt_teardown_msi(ppt);
ppt_teardown_msix(ppt);
+ /* Gate decode and DMA after MSI-X teardown, which writes the table BAR. */
+ cmd &= ~(PCIM_CMD_PORTEN | PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
+ pci_write_config(ppt->dev, PCIR_COMMAND, cmd, 2);
/*
* Save the host-owned state after interrupt teardown, then restore BARs
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 20, 6:39 AM (5 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40639853
Default Alt Text
D60605.diff (1 KB)
Attached To
Mode
D60605: vmm: keep memory decode enabled through MSI-X teardown
Attached
Detach File
Event Timeline
Log In to Comment