Received: from eggs.gnu.org ([2001:4830:134:3::10]:45204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9gC5-0004qV-Vi for qemu-devel@nongnu.org; Mon, 29 Jun 2015 17:02:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9gBz-0007wr-H6 for qemu-devel@nongnu.org; Mon, 29 Jun 2015 17:02:21 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:43587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9gBz-0007w7-Bm for qemu-devel@nongnu.org; Mon, 29 Jun 2015 17:02:15 -0400 From: Konrad Rzeszutek Wilk Date: Mon, 29 Jun 2015 17:02:01 -0400 Message-Id: <1435611725-15161-5-git-send-email-konrad.wilk@oracle.com> In-Reply-To: <1435611725-15161-1-git-send-email-konrad.wilk@oracle.com> References: <1435611725-15161-1-git-send-email-konrad.wilk@oracle.com> Subject: [Qemu-devel] [PATCH RFC 1 4/8] xen/pt: Log xen_host_pci_get in two init functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stefano.stabellini@eu.citrix.com, xen-devel@lists.xenproject.org, qemu-devel@nongnu.org Cc: Konrad Rzeszutek Wilk To help with troubleshooting in the field. Signed-off-by: Konrad Rzeszutek Wilk --- hw/xen/xen_pt_config_init.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index bc871c9..62b6a7b 100644 --- a/hw/xen/xen_pt_config_init.c +++ b/hw/xen/xen_pt_config_init.c @@ -1776,6 +1776,8 @@ static int xen_pt_ptr_reg_init(XenPCIPassthroughState *s, rc = xen_host_pci_get_byte(&s->real_device, reg_field + PCI_CAP_LIST_ID, &cap_id); if (rc) { + XEN_PT_ERR(&s->dev, "Failed to read capability @0x%x (rc:%d)\n", + reg_field + PCI_CAP_LIST_ID, rc); return rc; } if (xen_pt_emu_reg_grps[i].grp_id == cap_id) { @@ -1959,6 +1961,9 @@ int xen_pt_config_init(XenPCIPassthroughState *s) reg_grp_offset, ®_grp_entry->size); if (rc < 0) { + XEN_PT_LOG(&s->dev, "Failed to initialize %d/%ld, type=0x%x, rc:%d\n", + i, ARRAY_SIZE(xen_pt_emu_reg_grps), + xen_pt_emu_reg_grps[i].grp_type, rc); xen_pt_config_delete(s); return rc; } @@ -1973,6 +1978,10 @@ int xen_pt_config_init(XenPCIPassthroughState *s) /* initialize capability register */ rc = xen_pt_config_reg_init(s, reg_grp_entry, regs); if (rc < 0) { + XEN_PT_LOG(&s->dev, "Failed to initialize %d/%ld reg 0x%x in grp_type=0x%x (%d/%ld), rc=%d\n", + j, ARRAY_SIZE(xen_pt_emu_reg_grps[i].emu_regs), + regs->offset, xen_pt_emu_reg_grps[i].grp_type, + i, ARRAY_SIZE(xen_pt_emu_reg_grps), rc); xen_pt_config_delete(s); return rc; } -- 2.1.0