From: Boris Fiuczynski Date: Fri, 4 Feb 2022 15:32:18 +0000 (+0100) Subject: nodedev: add parent_addr to mdev nodedev dumpxml X-Git-Tag: v8.1.0-rc1~181 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f087335034eb03e4ac8b1d93d18fbbca842467d3;p=thirdparty%2Flibvirt.git nodedev: add parent_addr to mdev nodedev dumpxml As the parent address is part of the mdev nodedev name lets expose the internally available parent address in the XML. Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik --- diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index e4733f0804..0d7d1168b6 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -644,6 +644,11 @@ + + + + + diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 0bac0fde8d..61c8715037 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -604,6 +604,8 @@ virNodeDeviceCapMdevDefFormat(virBuffer *buf, virBufferEscapeString(buf, "\n", data->mdev.type); virBufferEscapeString(buf, "%s\n", data->mdev.uuid); + virBufferEscapeString(buf, "%s\n", + data->mdev.parent_addr); virBufferAsprintf(buf, "\n", data->mdev.iommuGroupNumber); diff --git a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml b/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml index 4df5f4f43c..012c1a1596 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml +++ b/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml @@ -4,6 +4,7 @@ 200f228a-c80a-4d50-bfb7-f5a0e4e34045 + 0000:00:02.0 @@ -13,6 +14,7 @@ de807ffc-1923-4d5f-b6c9-b20ecebc6d4b + 0000:00:02.0 @@ -22,6 +24,7 @@ 435722ea-5f43-468a-874f-da34f1217f13 + 0000:00:02.0 @@ -32,6 +35,7 @@ 783e6dbb-ea0e-411f-94e2-717eaad438bf + matrix @@ -47,6 +51,7 @@ cc000052-9b13-9b13-9b13-cc23009b1326 + 0.0.0052