WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

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

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-38844: CPUID maskability
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-38844: CPUID maskability, Rob Hoes <=