[libvirt PATCH v4 4/7] ch_driver: enable typed param string for numatune

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Vineeth Pillai <viremana@xxxxxxxxxxxxxxxxxxx>

Enable support of VIR_DRV_FEATURE_TYPED_PARAM_STRING to enable numatune

Signed-off-by: Vineeth Pillai <viremana@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Praveen K Paladugu <prapal@xxxxxxxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux