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

[Xen-devel] Xen support for i386/core and i386/core2?


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Markus Armbruster <armbru@xxxxxxxxxx>
  • Date: Wed, 15 Nov 2006 16:55:22 +0100
  • Delivery-date: Wed, 15 Nov 2006 07:55:36 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Xen's oprofile code is derived from Linux.  Linux's version knows
core, Xen's doesn't.

Linux code (arch/i386/oprofile/nmi_int.c):

static int __init ppro_init(char ** cpu_type)
{
        __u8 cpu_model = boot_cpu_data.x86_model;

        if (cpu_model == 14)
                *cpu_type = "i386/core";
        else if (cpu_model == 15)
                *cpu_type = "i386/core_2";
        else if (cpu_model > 0xd)
                return 0;
        else if (cpu_model == 9) {
                *cpu_type = "i386/p6_mobile";
        } else if (cpu_model > 5) {
                *cpu_type = "i386/piii";
        } else if (cpu_model > 2) {
                *cpu_type = "i386/pii";
        } else {
                *cpu_type = "i386/ppro";
        }

        model = &op_ppro_spec;
        return 1;
}

Current Xen code:

static int __init ppro_init(char *cpu_type)
{
        __u8 cpu_model = current_cpu_data.x86_model;

        if (cpu_model > 0xd) {
                printk("xenoprof: Initialization failed. "
                       "Intel processor model %d for P6 class family is not "
                       "supported\n", cpu_model);
                return 0;
        }

        if (cpu_model == 9) {
                strncpy (cpu_type, "i386/p6_mobile", XENOPROF_CPU_TYPE_SIZE - 
1);
        } else if (cpu_model > 5) {
                strncpy (cpu_type, "i386/piii", XENOPROF_CPU_TYPE_SIZE - 1);
        } else if (cpu_model > 2) {
                strncpy (cpu_type, "i386/pii", XENOPROF_CPU_TYPE_SIZE - 1);
        } else {
                strncpy (cpu_type, "i386/ppro", XENOPROF_CPU_TYPE_SIZE - 1);
        }

        model = &op_ppro_spec;
        return 1;
}

Andrew Theurer posted a patch back in October[*], which makes the Xen
code match the Linux code.  What happened to it?

[*] http://lists.xensource.com/archives/html/xen-devel/2006-10/msg00032.html

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


 


Rackspace

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