* [PATCH 0/2] hw/pci: Trace IRQ routing on PCI topology and fix a typo
@ 2023-02-11 15:22 Philippe Mathieu-Daudé
2023-02-11 15:22 ` [PATCH 1/2] hw/pci: Fix " Philippe Mathieu-Daudé
2023-02-11 15:22 ` [PATCH 2/2] hw/pci: Trace IRQ routing on PCI topology Philippe Mathieu-Daudé
0 siblings, 2 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-11 15:22 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Michael S. Tsirkin, Marcel Apfelbaum,
Philippe Mathieu-Daudé
Add trace event to follow how IRQ are rooted from PCI EP to RC.
Philippe Mathieu-Daudé (2):
hw/pci: Fix a typo
hw/pci: Trace IRQ routing on PCI topology
hw/pci/pci.c | 10 +++++++++-
hw/pci/trace-events | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
--
2.38.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] hw/pci: Fix a typo
2023-02-11 15:22 [PATCH 0/2] hw/pci: Trace IRQ routing on PCI topology and fix a typo Philippe Mathieu-Daudé
@ 2023-02-11 15:22 ` Philippe Mathieu-Daudé
2023-02-12 0:08 ` Richard Henderson
2023-02-11 15:22 ` [PATCH 2/2] hw/pci: Trace IRQ routing on PCI topology Philippe Mathieu-Daudé
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-11 15:22 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Michael S. Tsirkin, Marcel Apfelbaum,
Philippe Mathieu-Daudé
Fix 'interrutp' typo.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 208c16f450..805e4b0c68 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1648,7 +1648,7 @@ void pci_device_set_intx_routing_notifier(PCIDevice *dev,
* 9.1: Interrupt routing. Table 9-1
*
* the PCI Express Base Specification, Revision 2.1
- * 2.2.8.1: INTx interrutp signaling - Rules
+ * 2.2.8.1: INTx interrupt signaling - Rules
* the Implementation Note
* Table 2-20
*/
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] hw/pci: Trace IRQ routing on PCI topology
2023-02-11 15:22 [PATCH 0/2] hw/pci: Trace IRQ routing on PCI topology and fix a typo Philippe Mathieu-Daudé
2023-02-11 15:22 ` [PATCH 1/2] hw/pci: Fix " Philippe Mathieu-Daudé
@ 2023-02-11 15:22 ` Philippe Mathieu-Daudé
2023-02-28 13:37 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-11 15:22 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Michael S. Tsirkin, Marcel Apfelbaum,
Philippe Mathieu-Daudé
Trace how IRQ are rooted from EP to RC.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci/pci.c | 8 ++++++++
hw/pci/trace-events | 1 +
2 files changed, 9 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 805e4b0c68..2e785e3aef 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -279,9 +279,13 @@ static void pci_change_irq_level(PCIDevice *pci_dev, int irq_num, int change)
{
PCIBus *bus;
for (;;) {
+ int dev_irq = irq_num;
bus = pci_get_bus(pci_dev);
assert(bus->map_irq);
irq_num = bus->map_irq(pci_dev, irq_num);
+ trace_pci_route_irq(dev_irq, DEVICE(pci_dev)->canonical_path, irq_num,
+ pci_bus_is_root(bus) ? "root-complex"
+ : DEVICE(bus->parent_dev)->canonical_path);
if (bus->set_irq)
break;
pci_dev = bus->parent_dev;
@@ -1600,8 +1604,12 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin)
PCIBus *bus;
do {
+ int dev_irq = pin;
bus = pci_get_bus(dev);
pin = bus->map_irq(dev, pin);
+ trace_pci_route_irq(dev_irq, DEVICE(dev)->canonical_path, pin,
+ pci_bus_is_root(bus) ? "root-complex"
+ : DEVICE(bus->parent_dev)->canonical_path);
dev = bus->parent_dev;
} while (dev);
diff --git a/hw/pci/trace-events b/hw/pci/trace-events
index aaf46bc92d..42430869ce 100644
--- a/hw/pci/trace-events
+++ b/hw/pci/trace-events
@@ -3,6 +3,7 @@
# pci.c
pci_update_mappings_del(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "%s %02x:%02x.%x %d,0x%"PRIx64"+0x%"PRIx64
pci_update_mappings_add(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "%s %02x:%02x.%x %d,0x%"PRIx64"+0x%"PRIx64
+pci_route_irq(int dev_irq, const char *dev_path, int parent_irq, const char *parent_path) "IRQ %d @%s -> IRQ %d @%s"
# pci_host.c
pci_cfg_read(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, unsigned offs, unsigned val) "%s %02x:%02x.%x @0x%x -> 0x%x"
--
2.38.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] hw/pci: Fix a typo
2023-02-11 15:22 ` [PATCH 1/2] hw/pci: Fix " Philippe Mathieu-Daudé
@ 2023-02-12 0:08 ` Richard Henderson
0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2023-02-12 0:08 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: qemu-trivial, Michael S. Tsirkin, Marcel Apfelbaum
On 2/11/23 05:22, Philippe Mathieu-Daudé wrote:
> Fix 'interrutp' typo.
>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
> hw/pci/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] hw/pci: Trace IRQ routing on PCI topology
2023-02-11 15:22 ` [PATCH 2/2] hw/pci: Trace IRQ routing on PCI topology Philippe Mathieu-Daudé
@ 2023-02-28 13:37 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-28 13:37 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Michael S. Tsirkin, Marcel Apfelbaum,
Bernhard Beschow, BALATON Zoltan
ping
On 11/2/23 16:22, Philippe Mathieu-Daudé wrote:
> Trace how IRQ are rooted from EP to RC.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/pci/pci.c | 8 ++++++++
> hw/pci/trace-events | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 805e4b0c68..2e785e3aef 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -279,9 +279,13 @@ static void pci_change_irq_level(PCIDevice *pci_dev, int irq_num, int change)
> {
> PCIBus *bus;
> for (;;) {
> + int dev_irq = irq_num;
> bus = pci_get_bus(pci_dev);
> assert(bus->map_irq);
> irq_num = bus->map_irq(pci_dev, irq_num);
> + trace_pci_route_irq(dev_irq, DEVICE(pci_dev)->canonical_path, irq_num,
> + pci_bus_is_root(bus) ? "root-complex"
> + : DEVICE(bus->parent_dev)->canonical_path);
> if (bus->set_irq)
> break;
> pci_dev = bus->parent_dev;
> @@ -1600,8 +1604,12 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin)
> PCIBus *bus;
>
> do {
> + int dev_irq = pin;
> bus = pci_get_bus(dev);
> pin = bus->map_irq(dev, pin);
> + trace_pci_route_irq(dev_irq, DEVICE(dev)->canonical_path, pin,
> + pci_bus_is_root(bus) ? "root-complex"
> + : DEVICE(bus->parent_dev)->canonical_path);
> dev = bus->parent_dev;
> } while (dev);
>
> diff --git a/hw/pci/trace-events b/hw/pci/trace-events
> index aaf46bc92d..42430869ce 100644
> --- a/hw/pci/trace-events
> +++ b/hw/pci/trace-events
> @@ -3,6 +3,7 @@
> # pci.c
> pci_update_mappings_del(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "%s %02x:%02x.%x %d,0x%"PRIx64"+0x%"PRIx64
> pci_update_mappings_add(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "%s %02x:%02x.%x %d,0x%"PRIx64"+0x%"PRIx64
> +pci_route_irq(int dev_irq, const char *dev_path, int parent_irq, const char *parent_path) "IRQ %d @%s -> IRQ %d @%s"
>
> # pci_host.c
> pci_cfg_read(const char *dev, uint32_t bus, uint32_t slot, uint32_t func, unsigned offs, unsigned val) "%s %02x:%02x.%x @0x%x -> 0x%x"
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-28 13:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-11 15:22 [PATCH 0/2] hw/pci: Trace IRQ routing on PCI topology and fix a typo Philippe Mathieu-Daudé
2023-02-11 15:22 ` [PATCH 1/2] hw/pci: Fix " Philippe Mathieu-Daudé
2023-02-12 0:08 ` Richard Henderson
2023-02-11 15:22 ` [PATCH 2/2] hw/pci: Trace IRQ routing on PCI topology Philippe Mathieu-Daudé
2023-02-28 13:37 ` Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.