[PATCH virt-manager v2 0/4] Enable MDEV support
Shalini Chellathurai Saroja
shalini at linux.ibm.com
Mon May 31 19:54:25 UTC 2021
Enable support for mediated devices in virt-xml tool and virt-manager
GUI tool.
Example:
$ virt-xml vser --add-device --hostdev mdev_265920cf_4169_46ca_9d42_5844731f0bcd
Domain 'vser' defined successfully.
Domain XML:
[…]
<hostdev mode='subsystem' type='mdev' managed='no' model='vfio-ccw'>
<source>
<address uuid='265920cf-4169-46ca-9d42-5844731f0bcd'/>
</source>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0004'/>
</hostdev>
[…]
$ virt-xml vser --edit address.devno=0x0004 --hostdev address.devno=0x0008
Domain 'vser' defined successfully.
Domain XML:
[…]
<hostdev mode='subsystem' type='mdev' managed='no' model='vfio-ccw'>
<source>
<address uuid='265920cf-4169-46ca-9d42-5844731f0bcd'/>
</source>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0008'/>
</hostdev>
[…]
$ virt-xml vser --remove-device --hostdev mdev_265920cf_4169_46ca_9d42_5844731f0bcd
Domain 'vser' defined successfully.
$ virsh start vser
Domain 'vser' started
$ virsh list --all
Id Name State
---------------------------------
1 vser running
$ virt-xml vser --update --add-device --hostdev mdev_265920cf_4169_46ca_9d42_5844731f0bcd
Device hotplug successful.
Domain 'vser' defined successfully.
Domain XML:
[…]
<hostdev mode='subsystem' type='mdev' managed='no' model='vfio-ccw'>
<source>
<address uuid='265920cf-4169-46ca-9d42-5844731f0bcd'/>
</source>
<alias name='hostdev0'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0004'/>
</hostdev>
[…]
$ virt-xml vser --update --remove-device --hostdev mdev_265920cf_4169_46ca_9d42_5844731f0bcd
Device hotunplug successful.
Domain 'vser' defined successfully.
Shalini Chellathurai Saroja (4):
virt-xml: add support for mediated devices
hostdev: use method get_mdev_uuid()
tests: verify MDEV support
virt-manager: enable mdev support
.../virt-xml-add-hostdev-mdev-start.xml | 12 ++++++
.../cli/compare/virt-xml-add-hostdev-mdev.xml | 14 +++++++
tests/data/cli/compare/virt-xml-edit-all.xml | 7 ++++
.../compare/virt-xml-edit-hostdev-mdev.xml | 11 ++++++
.../compare/virt-xml-edit-simple-redirdev.xml | 2 +-
.../compare/virt-xml-remove-hostdev-mdev.xml | 15 +++++++
tests/data/testdriver/testdriver.xml | 39 +++++++++++++++++++
tests/data/testdriver/testsuite.xml | 32 +++++++++++++++
tests/test_cli.py | 4 ++
tests/uitests/test_addhardware.py | 6 +++
tests/utils.py | 2 +-
virtManager/addhardware.py | 18 ++++++++-
virtinst/devices/hostdev.py | 2 +-
virtinst/nodedev.py | 20 ++++++++++
14 files changed, 180 insertions(+), 4 deletions(-)
create mode 100644 tests/data/cli/compare/virt-xml-add-hostdev-mdev-start.xml
create mode 100644 tests/data/cli/compare/virt-xml-add-hostdev-mdev.xml
create mode 100644 tests/data/cli/compare/virt-xml-edit-hostdev-mdev.xml
create mode 100644 tests/data/cli/compare/virt-xml-remove-hostdev-mdev.xml
--
2.30.2
More information about the virt-tools-list
mailing list