Merge pull request #886 from stephen-turner/CA-202427

CA-202427: Correction: we do still need to check the vendor, so movin…
This commit is contained in:
Mihaela Stoica 2016-03-07 15:06:56 +00:00
commit 59788e2c3e

View File

@ -263,8 +263,7 @@ namespace XenAdmin.Core
// the CPUs can be pooled but only if they are masked first.
public static bool CompatibleCPUs(Host slave, Host master, bool allowCpuLevelling)
{
// As of Dundee, feature levelling makes all CPUs compatible
if (slave == null || master == null || Helpers.DundeeOrGreater(master) || Helpers.DundeeOrGreater(slave))
if (slave == null || master == null)
return true;
Dictionary<string, string> slave_cpu_info = slave.cpu_info;
@ -277,6 +276,10 @@ namespace XenAdmin.Core
if (slave_cpu_info["vendor"] != master_cpu_info["vendor"])
return false;
// As of Dundee, feature levelling makes all CPUs from the same vendor compatible
if (Helpers.DundeeOrGreater(master) || Helpers.DundeeOrGreater(slave))
return true;
if (slave_cpu_info["features"] == master_cpu_info["features"])
return true;