From 1edeeda88156f552a7de482f3e1a04fcb9866332 Mon Sep 17 00:00:00 2001 From: Matthew Poremba Date: Mon, 14 Oct 2024 08:51:05 -0700 Subject: [PATCH] dev: Make unknown PCI device writes a warning (#1657) This pops up in kernel 6.8.0. The device it is trying to write is currently unknown but does not cause problems ignoring the device, therefore change the panic to a warning and responding to the request with the default PCI latency. Change-Id: I4c1229753a75a94a255d8cfd411ac7311283366b --- src/dev/pci/host.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/dev/pci/host.cc b/src/dev/pci/host.cc index e7dea6c359..80cd9b5a5d 100644 --- a/src/dev/pci/host.cc +++ b/src/dev/pci/host.cc @@ -168,9 +168,14 @@ GenericPciHost::write(PacketPtr pkt) pkt->getSize()); PciDevice *const pci_dev(getDevice(dev_addr.first)); - panic_if(!pci_dev, - "%02x:%02x.%i: Write to config space on non-existent PCI device\n", - dev_addr.first.bus, dev_addr.first.dev, dev_addr.first.func); + warn_if(!pci_dev, + "%02x:%02x.%i: Write to config space on non-existent PCI device\n", + dev_addr.first.bus, dev_addr.first.dev, dev_addr.first.func); + + if (!pci_dev) { + pkt->makeAtomicResponse(); + return 20000; // 20ns default from PciDevice.py + } // @todo Remove this after testing pkt->headerDelay = pkt->payloadDelay = 0;