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

[Xen-API] [PATCH] CA-38844: CPUID maskability


  • To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
  • From: Rob Hoes <rob.hoes@xxxxxxxxxx>
  • Date: Thu, 8 Apr 2010 17:19:48 +0100
  • Delivery-date: Thu, 08 Apr 2010 09:22:04 -0700
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

# HG changeset patch
# User Rob Hoes <rob.hoes@xxxxxxxxxx>
CA-38844: CPUID maskability

Distinguish between not maskable ("no") (CPU does not have Intel FlexMigration 
or AMB Extended Migration), only base features are maskable ("base"), and 
base+extended features are maskable ("full") in Host.cpu_info:maskable.

Note: this patch should go in together with the flexmigration patch in 
xen-api-libs.hg.

Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>

diff -r cda70080e947 ocaml/xapi/create_misc.ml
--- a/ocaml/xapi/create_misc.ml Tue Apr 06 10:57:56 2010 +0100
+++ b/ocaml/xapi/create_misc.ml Thu Apr 08 13:29:53 2010 +0100
@@ -441,6 +441,11 @@
        let cpuid = Cpuid.read_cpu_info () in
        let features = Cpuid.features_to_string cpuid.Cpuid.features in
        let physical_features = Cpuid.features_to_string 
cpuid.Cpuid.physical_features in
+       let maskable = match cpuid.Cpuid.maskable with
+               | Cpuid.No -> "no"
+               | Cpuid.Base -> "base"
+               | Cpuid.Full -> "full"
+       in
        let cpu = [
                "cpu_count", string_of_int number;
                "vendor", vendor;
@@ -453,7 +458,7 @@
                "features", features;
                "features_after_reboot", features;
                "physical_features", physical_features;
-               "maskable", string_of_bool cpuid.Cpuid.maskable;
+               "maskable", maskable;
        ] in
        Db.Host.set_cpu_info ~__context ~self:host ~value:cpu;
  

Attachment: flex-maskability
Description: Text document

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.