From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0C3I-0003EE-To for qemu-devel@nongnu.org; Wed, 03 Jun 2015 13:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0C3D-0003LZ-3K for qemu-devel@nongnu.org; Wed, 03 Jun 2015 13:02:04 -0400 From: "Dr. David Alan Gilbert (git)" Date: Wed, 3 Jun 2015 17:58:01 +0100 Message-Id: <1433350681-11504-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH] Print error when failing to load PCI config data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, mst@redhat.com From: "Dr. David Alan Gilbert" 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 --- hw/pci/pci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 48f19a3..3afab6b 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -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; } -- 2.4.2