let swtpm_entry = str_entry "swtpm_user"
| str_entry "swtpm_group"
+ let capability_filters_entry = str_array_entry "capability_filters"
+
(* Each entry in the config is one of the following ... *)
let entry = default_tls_entry
| vnc_entry
| vxhs_entry
| nbd_entry
| swtpm_entry
+ | capability_filters_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
#
#swtpm_user = "tss"
#swtpm_group = "tss"
+
+# For debugging and testing purposes it's sometimes useful to be able to disable
+# libvirt behaviour based on the capabilities of the qemu process. This option
+# allows to do so. DO _NOT_ use in production and beaware that the behaviour
+# may change across versions.
+#
+#capability_filters = [ "capname" ]
VIR_FREE(cfg->memoryBackingDir);
VIR_FREE(cfg->swtpmStorageDir);
+
+ virStringListFree(cfg->capabilityfilters);
}
}
+static int
+virQEMUDriverConfigLoadCapsFiltersEntry(virQEMUDriverConfigPtr cfg,
+ virConfPtr conf)
+{
+ if (virConfGetValueStringList(conf, "capability_filters", false,
+ &cfg->capabilityfilters) < 0)
+ return -1;
+
+ return 0;
+}
+
+
int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
const char *filename,
bool privileged)
if (virQEMUDriverConfigLoadSWTPMEntry(cfg, conf) < 0)
goto cleanup;
+ if (virQEMUDriverConfigLoadCapsFiltersEntry(cfg, conf) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
uid_t swtpm_user;
gid_t swtpm_group;
+
+ char **capabilityfilters;
};
/* Main driver state */
{ "pr_helper" = "/usr/bin/qemu-pr-helper" }
{ "swtpm_user" = "tss" }
{ "swtpm_group" = "tss" }
+{ "capability_filters"
+ { "1" = "capname" }
+}