From 04f2fb3919b45fd6a1d42c7551803a2c1442e300 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 4 Feb 2020 01:53:41 -0600 Subject: [PATCH 1/6] removed obsolete 'Notify My Android' notification agent --- .../dynamix/include/NotificationAgents.xml | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/plugins/dynamix/include/NotificationAgents.xml b/plugins/dynamix/include/NotificationAgents.xml index ab6472305..f9f042889 100644 --- a/plugins/dynamix/include/NotificationAgents.xml +++ b/plugins/dynamix/include/NotificationAgents.xml @@ -89,45 +89,6 @@ ]]> - - Notify My Android - - API_KEY - APP_NAME - TITLE - MESSAGE - - - Prowl From f45cfb0e221798da043693127e0bb3c0e2bf739e Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 10 Feb 2020 03:05:14 -0600 Subject: [PATCH 2/6] remove 'nl-be' from VM keyboard types --- plugins/dynamix.vm.manager/include/libvirt_helpers.php | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/plugins/dynamix.vm.manager/include/libvirt_helpers.php index 6cb9bd106..c96c3a5fe 100644 --- a/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -827,7 +827,6 @@ 'cz' => 'Czech (cz)', 'da' => 'Danish (da)', 'nl' => 'Dutch (nl)', - 'nl-be' => 'Dutch-Belgium (nl-be)', 'en-gb' => 'English-United Kingdom (en-gb)', 'en-us' => 'English-United States (en-us)', 'es' => 'EspaƱol (es)', From 5b8ef99c966f518781470dee8b566ee5b32971e8 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 10 Feb 2020 03:06:08 -0600 Subject: [PATCH 3/6] remove 'nl-be' from VM keyboard type autocomplete --- .../scripts/codemirror/addon/hint/libvirt-schema.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix.vm.manager/scripts/codemirror/addon/hint/libvirt-schema.js b/plugins/dynamix.vm.manager/scripts/codemirror/addon/hint/libvirt-schema.js index 7adaf0f21..186d72c15 100644 --- a/plugins/dynamix.vm.manager/scripts/codemirror/addon/hint/libvirt-schema.js +++ b/plugins/dynamix.vm.manager/scripts/codemirror/addon/hint/libvirt-schema.js @@ -307,7 +307,7 @@ function getLibvirtSchema() { autoport: ["yes", "no"], websocket: ["-1"], listen: ["0.0.0.0"], - keymap: ["en-us", "en-gb", "ar", "hr", "cz", "da", "nl", "nl-be", "es", "et", "fo", + keymap: ["en-us", "en-gb", "ar", "hr", "cz", "da", "nl", "es", "et", "fo", "fi", "fr", "bepo", "fr-be", "fr-ca", "fr-ch", "de-ch", "hu", "is", "it", "ja", "lv", "lt", "mk", "no", "pl", "pt-br", "ru", "sl", "sv", "th", "tr"] } @@ -373,4 +373,4 @@ function getLibvirtSchema() { return root; -} \ No newline at end of file +} From 7288145222e1ed21641057608cf1b0f653d20c30 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 10 Feb 2020 04:07:54 -0600 Subject: [PATCH 4/6] Dont force single threaded VMs for AMD --- plugins/dynamix/include/UpdateTwo.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/dynamix/include/UpdateTwo.php b/plugins/dynamix/include/UpdateTwo.php index 67aef1f97..f3265b74b 100644 --- a/plugins/dynamix/include/UpdateTwo.php +++ b/plugins/dynamix/include/UpdateTwo.php @@ -33,12 +33,8 @@ case 'vm': // initial cores/threads assignment $cores = $vcpus; $threads = 1; - $vendor = exec("grep -Pom1 '^vendor_id\\s+: \\K\\S+' /proc/cpuinfo"); - if ($vendor == 'AuthenticAMD') { - $ht = 1; // force single threaded for AMD - } else { - $ht = exec("lscpu|grep -Po '^Thread\\(s\\) per core:\\s+\\K\\d+'") ?: 1; // fetch hyperthreading - } + $ht = exec("lscpu|grep -Po '^Thread\\(s\\) per core:\\s+\\K\\d+'") ?: 1; // fetch hyperthreading + // adjust for hyperthreading if ($vcpus > $ht && $vcpus%$ht===0) { $cores /= $ht; From bf78f59d75d38fdabe96cea43356bedf8c4114bf Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 10 Feb 2020 04:09:27 -0600 Subject: [PATCH 5/6] Dont force single threaded VMs for AMD --- plugins/dynamix.vm.manager/include/libvirt.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/dynamix.vm.manager/include/libvirt.php b/plugins/dynamix.vm.manager/include/libvirt.php index 0d724d7fe..80233d5be 100644 --- a/plugins/dynamix.vm.manager/include/libvirt.php +++ b/plugins/dynamix.vm.manager/include/libvirt.php @@ -327,12 +327,6 @@ // detect if the processor is hyperthreaded: $intCPUThreadsPerCore = max(intval(shell_exec('/usr/bin/lscpu | grep \'Thread(s) per core\' | awk \'{print $4}\'')), 1); - // detect if the processor is AMD, and if so, force single threaded - $strCPUInfo = file_get_contents('/proc/cpuinfo'); - if (strpos($strCPUInfo, 'AuthenticAMD') !== false) { - $intCPUThreadsPerCore = 1; - } - // even amount of cores assigned and cpu is hyperthreaded: pass that info along to the cpu section below if ($intCPUThreadsPerCore > 1 && ($vcpus % $intCPUThreadsPerCore == 0)) { $intCores = $vcpus / $intCPUThreadsPerCore; From 0f94acd8fb2486b67fc5931653bd8ed88c5be214 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Mon, 10 Feb 2020 04:35:23 -0600 Subject: [PATCH 6/6] VMs: enable cpu cache passthrough; AMD + multithreaded --- plugins/dynamix.vm.manager/include/libvirt.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/dynamix.vm.manager/include/libvirt.php b/plugins/dynamix.vm.manager/include/libvirt.php index 80233d5be..e8c07c32b 100644 --- a/plugins/dynamix.vm.manager/include/libvirt.php +++ b/plugins/dynamix.vm.manager/include/libvirt.php @@ -321,11 +321,22 @@ $intCPUThreadsPerCore = 1; $cpumode = ''; + $cpucache = ''; + $cpufeatures = ''; if (!empty($domain['cpumode']) && $domain['cpumode'] == 'host-passthrough') { $cpumode .= "mode='host-passthrough'"; + $cpucache = ""; // detect if the processor is hyperthreaded: $intCPUThreadsPerCore = max(intval(shell_exec('/usr/bin/lscpu | grep \'Thread(s) per core\' | awk \'{print $4}\'')), 1); + + // detect if the processor is AMD + multithreaded, and if so, enable topoext cpu feature + if ($intCPUThreadsPerCore > 1) { + $strCPUInfo = file_get_contents('/proc/cpuinfo'); + if (strpos($strCPUInfo, 'AuthenticAMD') !== false) { + $cpufeatures .= ""; + } + } // even amount of cores assigned and cpu is hyperthreaded: pass that info along to the cpu section below if ($intCPUThreadsPerCore > 1 && ($vcpus % $intCPUThreadsPerCore == 0)) { @@ -336,6 +347,8 @@ $cpustr = " + $cpucache + $cpufeatures {$vcpus}