mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
nodedev: Implement virNodeDeviceUpdate
Implement the API functions in the node device driver by using mdevctl modify with the options defined and live. Instead of increasing the minimum mdevctl version to 1.3.0 in the spec file to ensure support exists in mdevctl the support is dynamically checked before using mdevctl. Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
committed by
Michal Privoznik
parent
69f9e7dbc2
commit
582f27ff15
@@ -0,0 +1,16 @@
|
||||
<device>
|
||||
<name>mdev_c60cc60c_c60c_c60c_c60c_c60cc60cc60c_0_0_0052</name>
|
||||
<path>/sys/devices/css0/0.0.0052/c60cc60c-c60c-c60c-c60c-c60cc60cc60c</path>
|
||||
<parent>css_0_0_0052</parent>
|
||||
<driver>
|
||||
<name>vfio_ccw_mdev</name>
|
||||
</driver>
|
||||
<capability type='mdev'>
|
||||
<type id='vfio_ccw-io'/>
|
||||
<uuid>c60cc60c-c60c-c60c-c60c-c60cc60cc60c</uuid>
|
||||
<parent_addr>0.0.0052</parent_addr>
|
||||
<attr name='add_attr_1' value='val1'/>
|
||||
<attr name='add_attr_2' value='val2'/>
|
||||
<iommuGroup number='4'/>
|
||||
</capability>
|
||||
</device>
|
||||
25
tests/nodedevmdevctldata/mdevctl-modify.argv
Normal file
25
tests/nodedevmdevctldata/mdevctl-modify.argv
Normal file
@@ -0,0 +1,25 @@
|
||||
mdevctl \
|
||||
modify \
|
||||
--parent=0.0.0052 \
|
||||
--jsonfile=/dev/stdin \
|
||||
--uuid=c60cc60c-c60c-c60c-c60c-c60cc60cc60c \
|
||||
--defined
|
||||
mdevctl \
|
||||
modify \
|
||||
--parent=0.0.0052 \
|
||||
--jsonfile=/dev/stdin \
|
||||
--uuid=c60cc60c-c60c-c60c-c60c-c60cc60cc60c \
|
||||
--live
|
||||
mdevctl \
|
||||
modify \
|
||||
--parent=0.0.0052 \
|
||||
--jsonfile=/dev/stdin \
|
||||
--uuid=c60cc60c-c60c-c60c-c60c-c60cc60cc60c \
|
||||
--live
|
||||
mdevctl \
|
||||
modify \
|
||||
--parent=0.0.0052 \
|
||||
--jsonfile=/dev/stdin \
|
||||
--uuid=c60cc60c-c60c-c60c-c60c-c60cc60cc60c \
|
||||
--defined \
|
||||
--live
|
||||
4
tests/nodedevmdevctldata/mdevctl-modify.json
Normal file
4
tests/nodedevmdevctldata/mdevctl-modify.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{"mdev_type":"vfio_ccw-io","start":"manual"}
|
||||
{"mdev_type":"vfio_ccw-io","start":"manual","attrs":[{"add_attr_1":"val1"},{"add_attr_2":"val2"}]}
|
||||
{"mdev_type":"vfio_ccw-io","start":"manual"}
|
||||
{"mdev_type":"vfio_ccw-io","start":"manual","attrs":[{"add_attr_1":"val1"},{"add_attr_2":"val2"}]}
|
||||
Reference in New Issue
Block a user