[libvirt PATCH v2 05/16] nodedev: add ability to list and parse defined mdevs

Bjoern Walk bwalk at linux.ibm.com
Thu Oct 15 19:41:21 UTC 2020

Jonathon Jongsma <jjongsma at redhat.com> [2020-08-18, 09:47AM -0500]:
> diff --git a/tests/nodedevmdevctldata/mdevctl-list-single.out.xml b/tests/nodedevmdevctldata/mdevctl-list-single.out.xml
> new file mode 100644
> index 0000000000..cb443346ef
> --- /dev/null
> +++ b/tests/nodedevmdevctldata/mdevctl-list-single.out.xml
> @@ -0,0 +1,14 @@
> +<device>
> +  <name>mdev_783e6dbb_ea0e_411f_94e2_717eaad438bf</name>
> +  <parent>matrix</parent>
> +  <capability type='mdev'>
> +    <type id='vfio_ap-passthrough'/>
> +    <iommuGroup number='0'/>
> +    <attr name='assign_adapter' value='5'/>
> +    <attr name='assign_adapter' value='6'/>
> +    <attr name='assign_domain' value='0xab'/>
> +    <attr name='assign_control_domain' value='0xab'/>
> +    <attr name='assign_domain' value='4'/>
> +    <attr name='assign_control_domain' value='4'/>
> +  </capability>
> +</device>

I find this XML design for the an AP mdev rather unfortunate. First of
all, it is really noisy and requires a lot of boiler-plate for the end

Secondly, which I think it more important, it introduces a completely
new and different nomenclature compared to what we currently already
have for AP-related devices, i.e. cards

	virsh # nodedev-dumpxml ap_card05
	  <capability type='ap_card'>

and queues

	virsh # nodedev-dumpxml ap_05_002a
	  <capability type='ap_queue'>

This is really inconsistent and can be confusing for the end user.

Can we instead propose something along the lines

	  <capability type='mdev'>
		<type id='vfio_ap-passthrough'/>
		<iommuGroup number='0'/>

plus any number of enclosing elements that we like for better readability?


PS: I haven't read the whole patch series, we just have an internal
discussion about AP support and the XML design came up. I know that we'd
like to generically treat all mdevs as the same but we also should allow
for vendor-specific attributes to be represented individually to what
makes sense.

IBM Systems
Linux on Z & Virtualization Development
IBM Deutschland Research & Development GmbH
Schönaicher Str. 220, 71032 Böblingen
Phone: +49 7031 16 1819
Vorsitzende des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 902 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201015/6ec63591/attachment-0001.sig>

More information about the libvir-list mailing list