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-devel

[Xen-devel] Re: Detect Vanerpool

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: Detect Vanerpool
From: Andi Kleen <ak@xxxxxxx>
Date: 08 Mar 2006 14:21:57 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 08 Mar 2006 13:22:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1deaeb8463d1e484ac3a2503bcad2d25@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <440E0EED.7090508@xxxxxxxxxxxxxx> <1deaeb8463d1e484ac3a2503bcad2d25@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> writes:

> On 7 Mar 2006, at 22:53, gimli wrote:
> 
> > I have a new Intel iMac with the Yonah CPU. How can i determine if
> > Vanderpool is enabled or not. What should i see in /proc/cpuinfo ?
> 
> 2.6.16 Linux kernels will list 'vmx' as one of the CPU features. You
> cannot determine whether VMX is supported by looking at /proc/cpuinfo
> if you are running an earlier kernel.

In theory it could be still disabled by someone (e.g. another
Hypervisor) in the IA32 FEATURE MSR.

On an earlier kernel it can be tested with this simple program
(modulo the feature MSR)

-Andi

/* Detect if machine supports VMX. Written 2005 by Andi Kleen */
#include <stdio.h>

static inline unsigned int cpuid_ecx(unsigned int op)
{
        unsigned int eax, ecx;

        __asm__("cpuid"
                : "=a" (eax), "=c" (ecx)
                : "0" (op)
                : "bx", "dx" );
        return ecx;
}

int main(void)
{
        unsigned f = cpuid_ecx(1);
        if (f & (1<<5))
                printf("Machine has VT\n");
        else
                printf("Machine doesn't have VT\n");
}

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>