mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
hw/pci: fix pci_update_mappings() trace events
The current trace prototypes and (matching) trace calls lead to
"unorthodox" PCI BDF notation in at least the stderr trace backend. For
example, the four BARs of a QXL video card at 00:01.0 (bus 0, slot 1,
function 0) are traced like this (PID and timestamps removed):
pci_update_mappings_add d=0x7f14a73bf890 00:00.1 0,0x84000000+0x4000000
pci_update_mappings_add d=0x7f14a73bf890 00:00.1 1,0x80000000+0x4000000
pci_update_mappings_add d=0x7f14a73bf890 00:00.1 2,0x88200000+0x2000
pci_update_mappings_add d=0x7f14a73bf890 00:00.1 3,0xd060+0x20
The slot and function values are in reverse order.
Stick with the conventional BDF notation.
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Don Koch <dkoch@verizon.com>
Cc: qemu-trivial@nongnu.org
Fixes: 7828d75045
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
2f8b50083b
commit
0f288f854b
2 changed files with 4 additions and 4 deletions
|
@ -1154,16 +1154,16 @@ 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),
|
||||
PCI_FUNC(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),
|
||||
PCI_FUNC(d->devfn),
|
||||
i, r->addr, r->size);
|
||||
memory_region_add_subregion_overlap(r->address_space,
|
||||
r->addr, r->memory, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue