From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG5xw-0003qn-28 for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:14:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YG5xu-00088Y-Vx for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:14:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YG5xu-00088K-OE for qemu-devel@nongnu.org; Tue, 27 Jan 2015 08:13:58 -0500 Date: Tue, 27 Jan 2015 15:13:53 +0200 From: "Michael S. Tsirkin" Message-ID: <1422364369-8667-3-git-send-email-mst@redhat.com> References: <1422364369-8667-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422364369-8667-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 02/16] Add some trace calls to pci.c. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , dgilbert@redhat.com, Don Koch , Juan Quintela From: Don Koch Signed-off-by: Don Koch Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pci.c | 9 +++++++++ trace-events | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 371699c..d5e0e41 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -32,6 +32,7 @@ #include "hw/loader.h" #include "qemu/range.h" #include "qmp-commands.h" +#include "trace.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" #include "exec/address-spaces.h" @@ -1106,10 +1107,18 @@ static void pci_update_mappings(PCIDevice *d) /* now do the real mapping */ if (r->addr != PCI_BAR_UNMAPPED) { + trace_pci_update_mappings_del(d, pci_bus_num(d->bus), + PCI_FUNC(d->devfn), + PCI_SLOT(d->devfn), + i, r->addr, r->size); memory_region_del_subregion(r->address_space, r->memory); } r->addr = new_addr; if (r->addr != PCI_BAR_UNMAPPED) { + trace_pci_update_mappings_add(d, pci_bus_num(d->bus), + PCI_FUNC(d->devfn), + PCI_SLOT(d->devfn), + i, r->addr, r->size); memory_region_add_subregion_overlap(r->address_space, r->addr, r->memory, 1); } diff --git a/trace-events b/trace-events index 8acbcce..3db2f0c 100644 --- a/trace-events +++ b/trace-events @@ -1238,6 +1238,10 @@ spapr_pci_msi_write(uint64_t addr, uint64_t data, uint32_t dt_irq) "@%"PRIx64"<= spapr_pci_lsi_set(const char *busname, int pin, uint32_t irq) "%s PIN%d IRQ %u" spapr_pci_msi_retry(unsigned config_addr, unsigned req_num, unsigned max_irqs) "Guest device at %x asked %u, have only %u" +# hw/pci/pci.c +pci_update_mappings_del(void *d, uint32_t bus, uint32_t func, uint32_t slot, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64 +pci_update_mappings_add(void *d, uint32_t bus, uint32_t func, uint32_t slot, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64 + # hw/intc/xics.c xics_icp_check_ipi(int server, uint8_t mfrr) "CPU %d can take IPI mfrr=%#x" xics_icp_accept(uint32_t old_xirr, uint32_t new_xirr) "icp_accept: XIRR %#"PRIx32"->%#"PRIx32 -- MST