[libvirt PATCH 0/2] Revert mdev autostart support

As Daniel Berrange mentioned, the method of supporting autostart for node devices was not consistent with other libvirt objects. This patch series reverts this feature before it gets into a release. I will submit a follow-up patch soon which adds the feature back with a consistent API. Jonathon Jongsma (2): Partial Revert of "tests: nodedevxml2xmltest: test more mdev files" nodedev: Revert auto-start property for mdevs docs/formatnode.html.in | 10 --------- docs/schemas/nodedev.rng | 11 ---------- src/conf/node_device_conf.c | 21 +------------------ 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 ---- tests/nodedevschemadata/mdev_autostart.xml | 10 --------- tests/nodedevschemadata/mdev_manual.xml | 10 --------- ...v_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 10 +-------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ---------- ...v_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - ...v_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 11 +--------- ...v_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ---------- tests/nodedevxml2xmltest.c | 2 -- 17 files changed, 4 insertions(+), 131 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml -- 2.31.1

This reverts parts of commit bb8c3b61208ed0f29dcbeca857529600f04b3146 that added tests for autostart functionality (which will be reverted in the following commit) --- tests/nodedevschemadata/mdev_autostart.xml | 10 ---------- tests/nodedevschemadata/mdev_manual.xml | 10 ---------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ----------- .../mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - .../mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - .../mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ----------- tests/nodedevxml2xmltest.c | 2 -- 8 files changed, 47 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml diff --git a/tests/nodedevschemadata/mdev_autostart.xml b/tests/nodedevschemadata/mdev_autostart.xml deleted file mode 100644 index 7f2f341648..0000000000 --- a/tests/nodedevschemadata/mdev_autostart.xml +++ /dev/null @@ -1,10 +0,0 @@ -<device> - <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name> - <parent>pci_0000_00_02_0</parent> - <capability type='mdev'> - <type id='i915-GVTg_V5_8'/> - <attr name='example-attribute' value='attribute-value'/> - <start type='auto'/> - <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid> - </capability> -</device> diff --git a/tests/nodedevschemadata/mdev_manual.xml b/tests/nodedevschemadata/mdev_manual.xml deleted file mode 100644 index 9001588c24..0000000000 --- a/tests/nodedevschemadata/mdev_manual.xml +++ /dev/null @@ -1,10 +0,0 @@ -<device> - <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name> - <parent>pci_0000_00_02_0</parent> - <capability type='mdev'> - <type id='i915-GVTg_V5_8'/> - <attr name='example-attribute' value='attribute-value'/> - <start type='manual'/> - <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid> - </capability> -</device> diff --git a/tests/nodedevxml2xmlout/mdev_autostart.xml b/tests/nodedevxml2xmlout/mdev_autostart.xml deleted file mode 100644 index 4313c4a145..0000000000 --- a/tests/nodedevxml2xmlout/mdev_autostart.xml +++ /dev/null @@ -1,11 +0,0 @@ -<device> - <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name> - <parent>pci_0000_00_02_0</parent> - <capability type='mdev'> - <type id='i915-GVTg_V5_8'/> - <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid> - <start type='auto'/> - <iommuGroup number='0'/> - <attr name='example-attribute' value='attribute-value'/> - </capability> -</device> diff --git a/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml b/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml index bff95b015b..4f9d491981 100644 --- a/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml +++ b/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml @@ -4,7 +4,6 @@ <capability type='mdev'> <type id='i915-GVTg_V5_8'/> <uuid>d069d019-36ea-4111-8f0a-8c9a70e21366</uuid> - <start type='manual'/> <iommuGroup number='0'/> </capability> </device> diff --git a/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml b/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml index beb25b1989..1aa0afe085 100644 --- a/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml +++ b/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml @@ -3,7 +3,6 @@ <parent>pci_0000_00_02_0</parent> <capability type='mdev'> <type id='i915-GVTg_V5_8'/> - <start type='manual'/> <iommuGroup number='0'/> <attr name='example-attribute-1' value='attribute-value-1'/> <attr name='example-attribute-2' value='attribute-value-2'/> diff --git a/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml b/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml index 1d6dbb6118..da2a702304 100644 --- a/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml +++ b/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml @@ -3,7 +3,6 @@ <parent>pci_0000_00_02_0</parent> <capability type='mdev'> <type id='i915-GVTg_V5_8'/> - <start type='manual'/> <iommuGroup number='0'/> <attr name='example-attribute' value='attribute-value'/> </capability> diff --git a/tests/nodedevxml2xmlout/mdev_manual.xml b/tests/nodedevxml2xmlout/mdev_manual.xml deleted file mode 100644 index 0735f29e1e..0000000000 --- a/tests/nodedevxml2xmlout/mdev_manual.xml +++ /dev/null @@ -1,11 +0,0 @@ -<device> - <name>mdev_9c4954d2_fa39_4973_9d66_d61c6c4d0100</name> - <parent>pci_0000_00_02_0</parent> - <capability type='mdev'> - <type id='i915-GVTg_V5_8'/> - <uuid>9c4954d2-fa39-4973-9d66-d61c6c4d0100</uuid> - <start type='manual'/> - <iommuGroup number='0'/> - <attr name='example-attribute' value='attribute-value'/> - </capability> -</device> diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c index 7bd508f750..e9716726d7 100644 --- a/tests/nodedevxml2xmltest.c +++ b/tests/nodedevxml2xmltest.c @@ -135,8 +135,6 @@ mymain(void) DO_TEST("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366"); DO_TEST("mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9"); DO_TEST("mdev_fedc4916_1ca8_49ac_b176_871d16c13076"); - DO_TEST("mdev_autostart"); - DO_TEST("mdev_manual"); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -- 2.31.1

On Wed, May 26, 2021 at 10:40:25AM -0500, Jonathon Jongsma wrote:
This reverts parts of commit bb8c3b61208ed0f29dcbeca857529600f04b3146 that added tests for autostart functionality (which will be reverted in the following commit) --- tests/nodedevschemadata/mdev_autostart.xml | 10 ---------- tests/nodedevschemadata/mdev_manual.xml | 10 ---------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ----------- .../mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - .../mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - .../mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ----------- tests/nodedevxml2xmltest.c | 2 -- 8 files changed, 47 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On 5/26/21 5:40 PM, Jonathon Jongsma wrote:
This reverts parts of commit bb8c3b61208ed0f29dcbeca857529600f04b3146 that added tests for autostart functionality (which will be reverted in the following commit) --- tests/nodedevschemadata/mdev_autostart.xml | 10 ---------- tests/nodedevschemadata/mdev_manual.xml | 10 ---------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ----------- .../mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - .../mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - .../mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ----------- tests/nodedevxml2xmltest.c | 2 -- 8 files changed, 47 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml
diff --git a/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml b/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml index bff95b015b..4f9d491981 100644 --- a/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml +++ b/tests/nodedevxml2xmlout/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366.xml @@ -4,7 +4,6 @@ <capability type='mdev'> <type id='i915-GVTg_V5_8'/> <uuid>d069d019-36ea-4111-8f0a-8c9a70e21366</uuid> - <start type='manual'/>
This ..
<iommuGroup number='0'/> </capability> </device> diff --git a/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml b/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml index beb25b1989..1aa0afe085 100644 --- a/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml +++ b/tests/nodedevxml2xmlout/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml @@ -3,7 +3,6 @@ <parent>pci_0000_00_02_0</parent> <capability type='mdev'> <type id='i915-GVTg_V5_8'/> - <start type='manual'/>
and this ...
<iommuGroup number='0'/> <attr name='example-attribute-1' value='attribute-value-1'/> <attr name='example-attribute-2' value='attribute-value-2'/> diff --git a/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml b/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml index 1d6dbb6118..da2a702304 100644 --- a/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml +++ b/tests/nodedevxml2xmlout/mdev_fedc4916_1ca8_49ac_b176_871d16c13076.xml @@ -3,7 +3,6 @@ <parent>pci_0000_00_02_0</parent> <capability type='mdev'> <type id='i915-GVTg_V5_8'/> - <start type='manual'/>
.. and this needs to stay and should be removed in the next commit, because otherwise xml2xml test fails. Rightfully, as the input XMLs still have them. I'll fix that before pushing.
<iommuGroup number='0'/> <attr name='example-attribute' value='attribute-value'/> </capability>
Michal

We supported autostart of node devices via an xml element, but this is not consistent with other libvirt objects which use an explicit API for setting autostart status. So revert this and implement it as an official API in a future commit. The initial support was refactored after merging, so this commit reverts both of those previous commits. Revert "virNodeDevCapMdevParseXML: Use virXMLPropEnum() for ./start/@type" This reverts commit 9d4cd1d1cda84aa15b77a506f2ad6362a74edf1a. Revert "nodedev: support auto-start property for mdevs" This reverts commit 42a558549935336cbdb7cbfe8b239ffb0e3442e3. --- docs/formatnode.html.in | 10 --------- docs/schemas/nodedev.rng | 11 ---------- src/conf/node_device_conf.c | 21 +------------------ 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 | 10 +-------- ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 11 +--------- 9 files changed, 4 insertions(+), 84 deletions(-) mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml diff --git a/docs/formatnode.html.in b/docs/formatnode.html.in index 9a505f0fe9..3b3c3105d4 100644 --- a/docs/formatnode.html.in +++ b/docs/formatnode.html.in @@ -388,16 +388,6 @@ <dd> This element represents the UUID of the mediated device. </dd> - <dt><code>start</code></dt> - <dd> - This element represents the start policy for the device. It - has a required attribute <code>type</code>, which can have a - value of <code>auto</code> or <code>manual</code>. Mediated - devices with an <code>auto</code> start type will be started - automatically by the host when the parent device becomes - available (either on boot, or when the parent device is - attached). Otherwise the device must be started manually. - </dd> </dl> </dd> <dt><code>ccw</code></dt> diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index 660cbda3be..777227c38a 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -622,17 +622,6 @@ </attribute> </element> </optional> - <optional> - <element name="start"> - <attribute name="type"> - <choice> - <value>manual</value> - <value>auto</value> - </choice> - </attribute> - <empty/> - </element> - </optional> <optional> <element name="uuid"> <ref name="UUID"/> diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index af72e160a5..332b12f997 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -85,12 +85,6 @@ VIR_ENUM_IMPL(virNodeDevDRM, "render", ); -VIR_ENUM_IMPL(virNodeDevMdevStart, - VIR_NODE_DEV_MDEV_START_LAST, - "manual", - "auto", -); - static int virNodeDevCapsDefParseString(const char *xpath, xmlXPathContextPtr ctxt, @@ -534,8 +528,6 @@ virNodeDeviceCapMdevDefFormat(virBuffer *buf, virBufferEscapeString(buf, "<type id='%s'/>\n", data->mdev.type); virBufferEscapeString(buf, "<uuid>%s</uuid>\n", data->mdev.uuid); - virBufferEscapeString(buf, "<start type='%s'/>\n", - virNodeDevMdevStartTypeToString(data->mdev.start)); virBufferAsprintf(buf, "<iommuGroup number='%u'/>\n", data->mdev.iommuGroupNumber); @@ -1157,6 +1149,7 @@ virNodeDevCapStorageParseXML(xmlXPathContextPtr ctxt, return -1; } storage->removable_media_size = val; + ctxt->node = orignode2; } else { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1919,7 +1912,6 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt, g_autofree xmlNodePtr *attrs = NULL; size_t i; g_autofree char *uuidstr = NULL; - xmlNodePtr startNode = NULL; ctxt->node = node; @@ -1941,17 +1933,6 @@ virNodeDevCapMdevParseXML(xmlXPathContextPtr ctxt, virUUIDFormat(uuidbuf, mdev->uuid); } - mdev->start = VIR_NODE_DEV_MDEV_START_MANUAL; - - startNode = virXPathNode("./start[1]", ctxt); - if (startNode && - virXMLPropEnumDefault(startNode, "type", - virNodeDevMdevStartTypeFromString, - VIR_XML_PROP_NONE, &mdev->start, - VIR_NODE_DEV_MDEV_START_MANUAL) < 0) { - return -1; - } - /* 'iommuGroup' is optional, only report an error if the supplied value is * invalid (-2), not if it's missing (-1) */ if (virXPathUInt("number(./iommuGroup[1]/@number)", diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index 1a31133c4c..a60562e4fe 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -124,17 +124,6 @@ typedef enum { VIR_ENUM_DECL(virNodeDevDRM); -typedef enum { - /* Keep in sync with VIR_ENUM_IMPL in node_device_conf.c */ - VIR_NODE_DEV_MDEV_START_MANUAL, - VIR_NODE_DEV_MDEV_START_AUTO, - - VIR_NODE_DEV_MDEV_START_LAST -} virNodeDevMdevStartType; - -VIR_ENUM_DECL(virNodeDevMdevStart); - - typedef struct _virNodeDevCapSystemHardware virNodeDevCapSystemHardware; struct _virNodeDevCapSystemHardware { char *vendor_name; @@ -162,7 +151,6 @@ struct _virNodeDevCapMdev { char *type; unsigned int iommuGroupNumber; char *uuid; - virNodeDevMdevStartType start; virMediatedDeviceAttr **attributes; size_t nattributes; }; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 333cca0b41..0ced2a7990 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -848,8 +848,6 @@ virNodeDeviceGetSCSIHostCaps; virNodeDeviceGetSCSITargetCaps; virNodeDeviceGetWWNs; virNodeDeviceUpdateCaps; -virNodeDevMdevStartTypeFromString; -virNodeDevMdevStartTypeToString; # conf/node_device_event.h diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index a9f605715b..8a0a2c3847 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -615,8 +615,7 @@ nodeDeviceDefToMdevctlConfig(virNodeDeviceDef *def, char **buf) if (virJSONValueObjectAppendString(json, "mdev_type", mdev->type) < 0) return -1; - if (virJSONValueObjectAppendString(json, "start", - virNodeDevMdevStartTypeToString(mdev->start)) < 0) + if (virJSONValueObjectAppendString(json, "start", "manual") < 0) return -1; if (mdev->attributes) { @@ -1015,8 +1014,6 @@ nodeDeviceParseMdevctlChildDevice(const char *parent, mdev->uuid = g_strdup(uuid); mdev->type = g_strdup(virJSONValueObjectGetString(props, "mdev_type")); - mdev->start = - virNodeDevMdevStartTypeFromString(virJSONValueObjectGetString(props, "start")); attrs = virJSONValueObjectGet(props, "attrs"); @@ -1686,8 +1683,6 @@ nodeDeviceDefCopyFromMdevctl(virNodeDeviceDef *dst, dstmdev->uuid = g_strdup(srcmdev->uuid); } - dstmdev->start = srcmdev->start; - if (virMediatedDeviceAttrsCopy(dstmdev, srcmdev)) ret = true; diff --git a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml b/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml index 83a3010455..cf7e966256 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml +++ b/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml @@ -4,7 +4,6 @@ <capability type='mdev'> <type id='i915-GVTg_V5_4'/> <uuid>200f228a-c80a-4d50-bfb7-f5a0e4e34045</uuid> - <start type='manual'/> <iommuGroup number='0'/> </capability> </device> @@ -14,7 +13,6 @@ <capability type='mdev'> <type id='i915-GVTg_V5_4'/> <uuid>de807ffc-1923-4d5f-b6c9-b20ecebc6d4b</uuid> - <start type='auto'/> <iommuGroup number='0'/> </capability> </device> @@ -24,7 +22,6 @@ <capability type='mdev'> <type id='i915-GVTg_V5_8'/> <uuid>435722ea-5f43-468a-874f-da34f1217f13</uuid> - <start type='manual'/> <iommuGroup number='0'/> <attr name='testattr' value='42'/> </capability> @@ -35,7 +32,6 @@ <capability type='mdev'> <type id='vfio_ap-passthrough'/> <uuid>783e6dbb-ea0e-411f-94e2-717eaad438bf</uuid> - <start type='manual'/> <iommuGroup number='0'/> <attr name='assign_adapter' value='5'/> <attr name='assign_adapter' value='6'/> diff --git a/tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml b/tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml deleted file mode 100644 index 30dda60e87..0000000000 --- a/tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml +++ /dev/null @@ -1,9 +0,0 @@ -<device> - <name>mdev_3627463d_b7f0_4fea_b468_f1da537d301b</name> - <parent>computer</parent> - <capability type='mdev'> - <type id='mtty-1'/> - <start type='manual'/> - <iommuGroup number='12'/> - </capability> -</device> diff --git a/tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml b/tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml new file mode 120000 index 0000000000..cbc883e48c --- /dev/null +++ b/tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml @@ -0,0 +1 @@ +../nodedevschemadata/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml \ No newline at end of file diff --git a/tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml b/tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml deleted file mode 100644 index 1988ffa679..0000000000 --- a/tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml +++ /dev/null @@ -1,10 +0,0 @@ -<device> - <name>mdev_ee0b88c4-f554-4dc1-809d-b2a01e8e48ad</name> - <path>/sys/devices/vfio_ap/matrix/mdev_ee0b88c4-f554-4dc1-809d-b2a01e8e48ad</path> - <parent>ap_matrix</parent> - <capability type='mdev'> - <type id='vfio_ap-passthrough'/> - <start type='manual'/> - <iommuGroup number='0'/> - </capability> -</device> diff --git a/tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml b/tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml new file mode 120000 index 0000000000..238bfb4dfd --- /dev/null +++ b/tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml @@ -0,0 +1 @@ +../nodedevschemadata/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml \ No newline at end of file -- 2.31.1

On Wed, May 26, 2021 at 10:40:26AM -0500, Jonathon Jongsma wrote:
We supported autostart of node devices via an xml element, but this is not consistent with other libvirt objects which use an explicit API for setting autostart status. So revert this and implement it as an official API in a future commit.
The initial support was refactored after merging, so this commit reverts both of those previous commits.
Revert "virNodeDevCapMdevParseXML: Use virXMLPropEnum() for ./start/@type" This reverts commit 9d4cd1d1cda84aa15b77a506f2ad6362a74edf1a.
Revert "nodedev: support auto-start property for mdevs" This reverts commit 42a558549935336cbdb7cbfe8b239ffb0e3442e3. --- docs/formatnode.html.in | 10 --------- docs/schemas/nodedev.rng | 11 ---------- src/conf/node_device_conf.c | 21 +------------------ 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 | 10 +-------- ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 11 +--------- 9 files changed, 4 insertions(+), 84 deletions(-) mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On 5/26/21 5:40 PM, Jonathon Jongsma wrote:
As Daniel Berrange mentioned, the method of supporting autostart for node devices was not consistent with other libvirt objects. This patch series reverts this feature before it gets into a release. I will submit a follow-up patch soon which adds the feature back with a consistent API.
Jonathon Jongsma (2): Partial Revert of "tests: nodedevxml2xmltest: test more mdev files" nodedev: Revert auto-start property for mdevs
docs/formatnode.html.in | 10 --------- docs/schemas/nodedev.rng | 11 ---------- src/conf/node_device_conf.c | 21 +------------------ 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 ---- tests/nodedevschemadata/mdev_autostart.xml | 10 --------- tests/nodedevschemadata/mdev_manual.xml | 10 --------- ...v_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 10 +-------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ---------- ...v_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - ...v_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 11 +--------- ...v_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ---------- tests/nodedevxml2xmltest.c | 2 -- 17 files changed, 4 insertions(+), 131 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml
Patches look good. But please reply with your signed-off-by line so that I can add it to the commits and push. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal

On Thu, 27 May 2021 14:04:08 +0200 Michal Prívozník <mprivozn@redhat.com> wrote:
On 5/26/21 5:40 PM, Jonathon Jongsma wrote:
As Daniel Berrange mentioned, the method of supporting autostart for node devices was not consistent with other libvirt objects. This patch series reverts this feature before it gets into a release. I will submit a follow-up patch soon which adds the feature back with a consistent API.
Jonathon Jongsma (2): Partial Revert of "tests: nodedevxml2xmltest: test more mdev files" nodedev: Revert auto-start property for mdevs
docs/formatnode.html.in | 10 --------- docs/schemas/nodedev.rng | 11 ---------- src/conf/node_device_conf.c | 21 +------------------ 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 ---- tests/nodedevschemadata/mdev_autostart.xml | 10 --------- tests/nodedevschemadata/mdev_manual.xml | 10 --------- ...v_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 10 +-------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ---------- ...v_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - ...v_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 11 +--------- ...v_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ---------- tests/nodedevxml2xmltest.c | 2 -- 17 files changed, 4 insertions(+), 131 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml
Patches look good. But please reply with your signed-off-by line so that I can add it to the commits and push.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Michal
Sorry, Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>

On 5/27/21 3:24 PM, Jonathon Jongsma wrote:
On Thu, 27 May 2021 14:04:08 +0200 Michal Prívozník <mprivozn@redhat.com> wrote:
On 5/26/21 5:40 PM, Jonathon Jongsma wrote:
As Daniel Berrange mentioned, the method of supporting autostart for node devices was not consistent with other libvirt objects. This patch series reverts this feature before it gets into a release. I will submit a follow-up patch soon which adds the feature back with a consistent API.
Jonathon Jongsma (2): Partial Revert of "tests: nodedevxml2xmltest: test more mdev files" nodedev: Revert auto-start property for mdevs
docs/formatnode.html.in | 10 --------- docs/schemas/nodedev.rng | 11 ---------- src/conf/node_device_conf.c | 21 +------------------ 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 ---- tests/nodedevschemadata/mdev_autostart.xml | 10 --------- tests/nodedevschemadata/mdev_manual.xml | 10 --------- ...v_3627463d_b7f0_4fea_b468_f1da537d301b.xml | 10 +-------- tests/nodedevxml2xmlout/mdev_autostart.xml | 11 ---------- ...v_d069d019_36ea_4111_8f0a_8c9a70e21366.xml | 1 - ...v_d2441d39_495e_4243_ad9f_beb3f14c23d9.xml | 1 - ...v_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml | 11 +--------- ...v_fedc4916_1ca8_49ac_b176_871d16c13076.xml | 1 - tests/nodedevxml2xmlout/mdev_manual.xml | 11 ---------- tests/nodedevxml2xmltest.c | 2 -- 17 files changed, 4 insertions(+), 131 deletions(-) delete mode 100644 tests/nodedevschemadata/mdev_autostart.xml delete mode 100644 tests/nodedevschemadata/mdev_manual.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_3627463d_b7f0_4fea_b468_f1da537d301b.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_autostart.xml mode change 100644 => 120000 tests/nodedevxml2xmlout/mdev_ee0b88c4_f554_4dc1_809d_b2a01e8e48ad.xml delete mode 100644 tests/nodedevxml2xmlout/mdev_manual.xml
Patches look good. But please reply with your signed-off-by line so that I can add it to the commits and push.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Michal
Sorry,
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Pushed now. Michal
participants (3)
-
Daniel P. Berrangé
-
Jonathon Jongsma
-
Michal Prívozník