]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Simply looking for GenuineIntel or AuthenticAMD in /proc/cpuinfo
authorVinod Pademar <vinod.pademar@citrix.com>
Fri, 13 Nov 2015 15:20:54 +0000 (15:20 +0000)
committerVinod Pademar <vinod.pademar@citrix.com>
Fri, 13 Nov 2015 15:20:54 +0000 (15:20 +0000)
exec/xenrt/lib/xenserver/host.py

index 8d8124f03297c86754da55b7d5a2a1353ec1148a..66eaba89e5ebddaea5402410c1bfa76805d16323 100755 (executable)
@@ -3374,19 +3374,11 @@ fi
 
     def isSvmHardware(self):
         """Return True if host is HVM compatible and has SVM enabled"""
-        if isinstance(self, xenrt.lib.xenserver.BostonHost):
-            return self.isHvmEnabled() and "AuthenticAMD" in self.getHostParam("cpu_info")
-        else:
-            cpuinfo = self.execdom0("cat /proc/cpuinfo")
-            return self.isHvmEnabled() and re.search(r"AuthenticAMD", cpuinfo)
+        return self.isHvmEnabled() and re.search(r"AuthenticAMD", self.execdom0("cat /proc/cpuinfo"))
 
     def isVmxHardware(self):
         """Return True if host is HVM compatible and has VMX enabled"""
-        if isinstance(self, xenrt.lib.xenserver.BostonHost):
-            return self.isHvmEnabled() and "GenuineIntel" in self.getHostParam("cpu_info")
-        else:
-            cpuinfo = self.execdom0("cat /proc/cpuinfo")
-            return self.isHvmEnabled() and re.search(r"GenuineIntel", cpuinfo)
+        return self.isHvmEnabled() and re.search(r"GenuineIntel", self.execdom0("cat /proc/cpuinfo"))
 
     def getBridgeWithMapping(self, index):
         """Returns the name of a bridge corresponding to the interface