Skip to contentSkip to conversation

Print error when failing to load PCI config data

PATCH Applied Dr. David Alan Gilbert (git) 2 participants 2 messages Jun 3, 2015 – Jun 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Print error when failing to load PCI config data

From: "Dr. David Alan Gilbert" <[email protected]>

When loading migration fails due to a disagreement about PCI config data we don't currently get any errors explaining that was the cause of the problem or which byte in the config data was at fault.

---
 hw/pci/pci.c | 4 ++++
 1 file changed, 4 insertions(+)
hw/pci/pci.c +4 -0
index 48f19a3..3afab6b 100644
@@ -398,6 +398,10 @@ static int get_pci_config_device(QEMUFile *f, void *pv, size_t size)
     for (i = 0; i < size; ++i) {
         if ((config[i] ^ s->config[i]) &
             s->cmask[i] & ~s->wmask[i] & ~s->w1cmask[i]) {
+            error_report("%s: Bad config data: i=0x%x read: %x device: %x "
+                         "cmask: %x wmask: %x w1cmask:%x", __func__,
+                         i, config[i], s->config[i],
+                         s->cmask[i], s->wmask[i], s->w1cmask[i]);
             g_free(config);
             return -EINVAL;
         }
Signature · 1 line
2.4.2