On Fri, May 14, 2021 at 16:28:59 -0500, Jonathon Jongsma wrote:
From: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
This adds a new element to the mdev capabilities xml schema that
represents the start policy for a defined mediated device. The actual
auto-start functionality is handled behind the scenes by mdevctl, but it
wasn't yet hooked up in libvirt.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
docs/formatnode.html.in | 10 ++++++++++
docs/schemas/nodedev.rng | 11 ++++++++++
src/conf/node_device_conf.c | 20 ++++++++++++++++++-
src/conf/node_device_conf.h | 12 +++++++++++
src/libvirt_private.syms | 2 ++
src/node_device/node_device_driver.c | 7 ++++++-
.../mdevctl-list-multiple.out.xml | 4 ++++
...v_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 1 +
...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 1 +
9 files changed, 66 insertions(+), 2 deletions(-)
[...]
@@ -1944,6 +1952,16 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr
ctxt,
virUUIDFormat(uuidbuf, mdev->uuid);
}
+ if ((starttype = virXPathString("string(./start[1]/@type)", ctxt))) {
+ if ((mdev->start = virNodeDevMdevStartTypeFromString(starttype)) < 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown mdev start type '%s' for
'%s'"), starttype, def->name);
+ return -1;
This broke the build:
https://listman.redhat.com/archives/libvir-list/2021-May/msg00593.html
Please make sure to compile your tree also with clang.
+ }
+ } else {
+ mdev->start = VIR_NODE_DEV_MDEV_START_MANUAL;
+ }
+