| Summary: | invalid pci addr in info qtree when starting with -S | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Lukáš Doktor <ldoktor> |
| Component: | qemu | Assignee: | Fedora Virtualization Maintainers <virt-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 19 | CC: | amit.shah, berrange, cfergeau, dwmw2, itamar, pbonzini, rjones, scottt.tw, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-11-27 12:35:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Lukáš Doktor
2013-11-15 09:38:21 UTC
PCI bridges are set up by the firmware.
Look here:
(qemu) info pci
...
Bus 0, device 4, function 0:
PCI bridge: PCI device 8086:244e
BUS 0.
secondary bus 0.
subordinate bus 0.
IO range [0x0000, 0x0fff]
memory range [0x00000000, 0x000fffff]
prefetchable memory range [0x00000000, 0x000fffff]
id "pci_bridge1"
(qemu) cont
(qemu) stop
(qemu) info pci
...
Bus 0, device 4, function 0:
PCI bridge: PCI device 8086:244e
BUS 0.
secondary bus 1.
subordinate bus 1.
IO range [0xc000, 0xbfff]
memory range [0xfea00000, 0xfeafffff]
prefetchable memory range [0xfe000000, 0xfdffffff]
Bus 1, device 1, function 0:
USB controller: PCI device 1033:0194
IRQ 10.
BAR0: 64 bit memory at 0xfea00000 [0xfea03fff].
id "test_xhci1"
After the bridge is set up, the USB controller device gets the right bus and appears in "info pci". Until then, the data in "info qtree" is bogus. If you're writing a testcase, I suggest you poll the QMP "query-pci" command until the USB controller appears. It will be a sub-dictionary within the PCI bridge, like this:
{
"bus": 0,
"slot": 4,
"qdev_id": "pci_bridge1",
"class_info": { "class": 1540, "desc": "PCI bridge" },
"id": { "device": 9294, "vendor": 32902 },
"function": 0, "regions": [],
"pci_bridge": {
"bus": {
"prefetchable_range": { "limit": 4261412863, "base": 4261412864 },
"memory_range": { "limit": 4272947199, "base": 4271898624 },
"io_range": { "limit": 49151, "base": 49152 },
"number": 0,
"secondary": 1,
"subordinate": 1
},
"devices": [
{
"bus": 1,
"slot": 1,
"qdev_id": "test_xhci1",
"class_info": { "class": 3075, "desc": "USB controller" },
"id": { "device": 404, "vendor": 4147 },
"function": 0,
"irq": 10,
"regions": [
{
"prefetch": false,
"mem_type_64": true,
"bar": 0,
"size": 16384,
"address": 4271898624,
"type": "memory"
}
]
}
]
}
}
OK, thank you, Paolo. I'm writing a test and this really confused me. |