summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorDr. David Alan Gilbert2015-06-03 18:58:01 +0200
committerMichael Tokarev2015-06-23 18:57:27 +0200
commit7c59364d0329d36a7759033962a469ca714f884d (patch)
treefa7a50794dff0a6eb81c4dddc71e7653d09882f4 /hw
parentGrammar: 'as to'->'as for' (diff)
downloadqemu-7c59364d0329d36a7759033962a469ca714f884d.tar.gz
qemu-7c59364d0329d36a7759033962a469ca714f884d.tar.xz
qemu-7c59364d0329d36a7759033962a469ca714f884d.zip
Print error when failing to load PCI config data
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. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci/pci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 45394cfe32..442f822f42 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -428,6 +428,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;
}