From: Vineeth Pillai <virem...@linux.microsoft.com>

Enable support of VIR_DRV_FEATURE_TYPED_PARAM_STRING to enable numatune

Signed-off-by: Vineeth Pillai <virem...@linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <pra...@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 7f3cf6dbef..9ad23c1710 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -955,6 +955,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)
 {
@@ -1303,6 +1333,7 @@ static virHypervisorDriver chHypervisorDriver = {
     .connectListAllDomains = chConnectListAllDomains,       /* 7.5.0 */
     .connectListDomains = chConnectListDomains,             /* 7.5.0 */
     .connectGetCapabilities = chConnectGetCapabilities,     /* 7.5.0 */
+    .connectSupportsFeature = chConnectSupportsFeature,     /* 7.8.0 */
     .domainCreateXML = chDomainCreateXML,                   /* 7.5.0 */
     .domainCreate = chDomainCreate,                         /* 7.5.0 */
     .domainCreateWithFlags = chDomainCreateWithFlags,       /* 7.5.0 */
-- 
2.27.0


Reply via email to