
On Mon, Feb 05, 2018 at 08:11:02 -0500, Shivaprasad G Bhat wrote:
virt-aa-helper need not verify the feature support as libvirt does it during domain creation anyway.
Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com> --- src/conf/domain_conf.c | 3 +++ src/conf/domain_conf.h | 1 + src/security/virt-aa-helper.c | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e827b2a81..92929a289 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4736,6 +4736,9 @@ static int virDomainDefPostParseCheckFeatures(virDomainDefPtr def, virDomainXMLOptionPtr xmlopt) { + if (!UNSUPPORTED(VIR_DOMAIN_DEF_FEATURE_SKIP_VALIDATE))
I don't think the 'UNSUPPORTED' macro should be used in this case.
+ return 0; + if (UNSUPPORTED(VIR_DOMAIN_DEF_FEATURE_MEMORY_HOTPLUG) && virDomainDefCheckUnsupportedMemoryHotplug(def) < 0) return -1; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 21e004515..c36d29fd9 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2539,6 +2539,7 @@ typedef enum { VIR_DOMAIN_DEF_FEATURE_NAME_SLASH = (1 << 3), VIR_DOMAIN_DEF_FEATURE_INDIVIDUAL_VCPUS = (1 << 4), VIR_DOMAIN_DEF_FEATURE_USER_ALIAS = (1 << 5), + VIR_DOMAIN_DEF_FEATURE_SKIP_VALIDATE = (1 << 6),
The name is slightly misleading, since it does not skip the validation callback, only the feature checking. I was also thinking that this flag should be part of VIR_DOMAIN_DEF_PARSE flags and not the features itself.