From 02c3291423413409b3b00244d24ed9e9489e99f8 Mon Sep 17 00:00:00 2001 From: Lily Zhu Date: Mon, 11 Sep 2017 10:43:16 +0800 Subject: [PATCH] Implementation of getting the iommu pci devices address Add the function of getting the pci devices addresses sharing the same iommuGroup. Signed-off-by: Lily Zhu --- virttest/libvirt_xml/nodedev_xml.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/virttest/libvirt_xml/nodedev_xml.py b/virttest/libvirt_xml/nodedev_xml.py index 20a5dc715f4..136378ce4bb 100644 --- a/virttest/libvirt_xml/nodedev_xml.py +++ b/virttest/libvirt_xml/nodedev_xml.py @@ -140,8 +140,27 @@ class for capability whose type is pci. # # + # or the Example of iommu: + # + #0 + #4 + #0 + #1 + #NetXtreme II BCM5709 Gigabit Ethernet + #Broadcom Limited + # + #
+ #
+ # + # + # + # + # + # + # + __slots__ = ('domain', 'bus', 'slot', 'function', 'product_id', - 'vendor_id', 'virt_functions', 'numa_node') + 'vendor_id', 'virt_functions', 'iommuGroup_number', 'numa_node') def __init__(self, virsh_instance=base.virsh): accessors.XMLElementInt('domain', self, parent_xpath='/', @@ -162,6 +181,10 @@ def __init__(self, virsh_instance=base.virsh): parent_xpath='/capability', marshal_from=self.marshal_from_address, marshal_to=self.marshal_to_address) + accessors.XMLElementList('iommuGroup_number', self, + parent_xpath='/iommuGroup', + marshal_from=self.marshal_from_address, + marshal_to=self.marshal_to_address) super(PCIXML, self).__init__(virsh_instance=virsh_instance) self.xml = (' ')