virtinst: add support for controller target subelement

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2020-11-21 00:59:54 +03:00 committed by Cole Robinson
parent 7541065d09
commit ac9316cce1
4 changed files with 32 additions and 0 deletions

View File

@ -262,6 +262,20 @@
<driver queues="4" iothread="2"/> <driver queues="4" iothread="2"/>
</controller> </controller>
<controller type="xenbus" maxGrantFrames="64"/> <controller type="xenbus" maxGrantFrames="64"/>
<controller type="pci" index="0" model="pcie-root-port">
<target chassis="1" port="1" hotplug="off"/>
</controller>
<controller type="pci" index="1" model="pci-root">
<target index="1"/>
</controller>
<controller type="pci" index="2" model="pci-bridge">
<target chassisNr="1"/>
</controller>
<controller type="pci" index="3" model="pci-expander-bus">
<target busNr="252">
<node>1</node>
</target>
</controller>
<filesystem type="mount" accessmode="mapped"> <filesystem type="mount" accessmode="mapped">
<driver ats="on" iommu="off" packed="on"/> <driver ats="on" iommu="off" packed="on"/>
<alias name="testfsalias"/> <alias name="testfsalias"/>

View File

@ -645,6 +645,10 @@ source.reservations.managed=no,source.reservations.source.type=unix,source.reser
--controller usb,model=ich9-uhci3,address=0:0:4.2,index=0,master=4 --controller usb,model=ich9-uhci3,address=0:0:4.2,index=0,master=4
--controller scsi,,model=virtio-scsi,driver_queues=4,driver.queues=4,driver.iothread=2,vectors=15 --controller scsi,,model=virtio-scsi,driver_queues=4,driver.queues=4,driver.iothread=2,vectors=15
--controller xenbus,maxGrantFrames=64 --controller xenbus,maxGrantFrames=64
--controller pci,index=0,model=pcie-root-port,target.chassis=1,target.port=1,target.hotplug=off
--controller pci,index=1,model=pci-root,target.index=1
--controller pci,index=2,model=pci-bridge,target.chassisNr=1
--controller pci,index=3,model=pci-expander-bus,target.busNr=252,target.node=1
--input type=keyboard,bus=usb --input type=keyboard,bus=usb
--input tablet --input tablet

View File

@ -3758,6 +3758,13 @@ class ParserController(VirtCLIParser):
cls.add_arg("master.startport", "master_startport") cls.add_arg("master.startport", "master_startport")
cls.add_arg("driver.iothread", "driver_iothread") cls.add_arg("driver.iothread", "driver_iothread")
cls.add_arg("driver.queues", "driver_queues") cls.add_arg("driver.queues", "driver_queues")
cls.add_arg("target.chassisNr", "target_chassisNr")
cls.add_arg("target.chassis", "target_chassis")
cls.add_arg("target.port", "target_port")
cls.add_arg("target.hotplug", "target_hotplug")
cls.add_arg("target.busNr", "target_busNr")
cls.add_arg("target.index", "target_index")
cls.add_arg("target.node", "target_node")
cls.add_arg("address", None, lookup_cb=None, cb=cls.set_address_cb) cls.add_arg("address", None, lookup_cb=None, cb=cls.set_address_cb)

View File

@ -78,6 +78,13 @@ class DeviceController(Device):
master_startport = XMLProperty("./master/@startport", is_int=True) master_startport = XMLProperty("./master/@startport", is_int=True)
target_chassisNr = XMLProperty("./target/@chassisNr", is_int=True)
target_chassis = XMLProperty("./target/@chassis", is_int=True)
target_port = XMLProperty("./target/@port", is_int=True)
target_hotplug = XMLProperty("./target/@hotplug", is_onoff=True)
target_busNr = XMLProperty("./target/@busNr", is_int=True)
target_index = XMLProperty("./target/@index", is_int=True)
target_node = XMLProperty("./target/node", is_int=True)
def _get_attached_disk_devices(self, guest): def _get_attached_disk_devices(self, guest):
ret = [] ret = []