From: Vineeth Pillai <viremana(a)linux.microsoft.com>
Enable support of VIR_DRV_FEATURE_TYPED_PARAM_STRING to enable numatune
Signed-off-by: Vineeth Pillai <viremana(a)linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <prapal(a)linux.microsoft.com>
---
src/ch/ch_driver.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
index 110c86168a..408aae2cd6 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -943,6 +943,36 @@ static int chStateInitialize(bool privileged,
return ret;
}
+/* Which features are supported by this driver? */
+static int
+chConnectSupportsFeature(virConnectPtr conn, int feature)
+{
+ if (virConnectSupportsFeatureEnsureACL(conn) < 0)
+ return -1;
+
+ switch ((virDrvFeature) feature) {
+ case VIR_DRV_FEATURE_TYPED_PARAM_STRING:
+ return 1;
+ case VIR_DRV_FEATURE_MIGRATION_V2:
+ case VIR_DRV_FEATURE_MIGRATION_V3:
+ case VIR_DRV_FEATURE_MIGRATION_P2P:
+ case VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION:
+ case VIR_DRV_FEATURE_FD_PASSING:
+ case VIR_DRV_FEATURE_XML_MIGRATABLE:
+ case VIR_DRV_FEATURE_MIGRATION_OFFLINE:
+ case VIR_DRV_FEATURE_MIGRATION_PARAMS:
+ case VIR_DRV_FEATURE_MIGRATION_DIRECT:
+ case VIR_DRV_FEATURE_MIGRATION_V1:
+ case VIR_DRV_FEATURE_PROGRAM_KEEPALIVE:
+ case VIR_DRV_FEATURE_REMOTE:
+ case VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK:
+ case VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK:
+ case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER:
+ default:
+ return 0;
+ }
+}
+
static int
chDomainGetVcpusFlags(virDomainPtr dom,
unsigned int flags)
@@ -1285,6 +1315,7 @@ static virHypervisorDriver chHypervisorDriver = {
.connectListAllDomains = chConnectListAllDomains, /* 7.5.0 */
.connectListDomains = chConnectListDomains, /* 7.5.0 */
.connectGetCapabilities = chConnectGetCapabilities, /* 7.5.0 */
+ .connectSupportsFeature = chConnectSupportsFeature, /* 8.0.0 */
.domainCreateXML = chDomainCreateXML, /* 7.5.0 */
.domainCreate = chDomainCreate, /* 7.5.0 */
.domainCreateWithFlags = chDomainCreateWithFlags, /* 7.5.0 */
--
2.27.0