mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
Move capability formatting together
All sub-PCI capabilities should be next to each other for clarity. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
c36b1f7b6a
commit
88c8be67d4
@ -148,6 +148,17 @@
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>pci-bridge</value>
|
||||
<value>cardbus-bridge</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='iommuGroup'>
|
||||
<attribute name='number'>
|
||||
@ -169,17 +180,6 @@
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='capability'>
|
||||
<attribute name='type'>
|
||||
<choice>
|
||||
<value>pci-bridge</value>
|
||||
<value>cardbus-bridge</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
|
||||
<optional>
|
||||
<element name='pci-express'>
|
||||
<zeroOrMore>
|
||||
|
@ -383,6 +383,10 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDef *def)
|
||||
virBufferAddLit(&buf, "</capability>\n");
|
||||
}
|
||||
}
|
||||
if (data->pci_dev.hdrType) {
|
||||
virBufferAsprintf(&buf, "<capability type='%s'/>\n",
|
||||
virPCIHeaderTypeToString(data->pci_dev.hdrType));
|
||||
}
|
||||
if (data->pci_dev.nIommuGroupDevices) {
|
||||
virBufferAsprintf(&buf, "<iommuGroup number='%d'>\n",
|
||||
data->pci_dev.iommuGroupNumber);
|
||||
@ -403,11 +407,6 @@ char *virNodeDeviceDefFormat(const virNodeDeviceDef *def)
|
||||
virBufferAsprintf(&buf, "<numa node='%d'/>\n",
|
||||
data->pci_dev.numa_node);
|
||||
|
||||
if (data->pci_dev.hdrType) {
|
||||
virBufferAsprintf(&buf, "<capability type='%s'/>\n",
|
||||
virPCIHeaderTypeToString(data->pci_dev.hdrType));
|
||||
}
|
||||
|
||||
if (data->pci_dev.flags & VIR_NODE_DEV_CAP_FLAG_PCIE)
|
||||
virPCIEDeviceInfoFormat(&buf, data->pci_dev.pci_express);
|
||||
break;
|
||||
|
@ -8,10 +8,10 @@
|
||||
<function>0</function>
|
||||
<product id='0x8c10'>8 Series/C220 Series Chipset Family PCI Express Root Port #1</product>
|
||||
<vendor id='0x8086'>Intel Corporation</vendor>
|
||||
<capability type='pci-bridge'/>
|
||||
<iommuGroup number='8'>
|
||||
<address domain='0x0000' bus='0x00' slot='0x1c' function='0x0'/>
|
||||
</iommuGroup>
|
||||
<capability type='pci-bridge'/>
|
||||
<pci-express>
|
||||
<link validity='cap' port='1' speed='5' width='1'/>
|
||||
<link validity='sta' speed='2.5' width='1'/>
|
||||
|
Loading…
Reference in New Issue
Block a user