Markus Armbruster
2006-Nov-15 15:55 UTC
[Xen-devel] Xen support for i386/core and i386/core2?
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@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Nov-15 16:39 UTC
Re: [Xen-devel] Xen support for i386/core and i386/core2?
On 15/11/06 15:55, "Markus Armbruster" <armbru@redhat.com> wrote:> Andrew Theurer posted a patch back in October[*], which makes the Xen > code match the Linux code. What happened to it?I guess it got dropped on the floor. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Markus Armbruster
2006-Nov-16 09:33 UTC
Re: [Xen-devel] Xen support for i386/core and i386/core2?
Keir Fraser <Keir.Fraser@cl.cam.ac.uk> writes:> On 15/11/06 15:55, "Markus Armbruster" <armbru@redhat.com> wrote: > >> Andrew Theurer posted a patch back in October[*], which makes the Xen >> code match the Linux code. What happened to it? > > I guess it got dropped on the floor.Mind to pick it up? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Nov-16 09:36 UTC
Re: [Xen-devel] Xen support for i386/core and i386/core2?
On 16/11/06 9:33 am, "Markus Armbruster" <armbru@redhat.com> wrote:>> On 15/11/06 15:55, "Markus Armbruster" <armbru@redhat.com> wrote: >> >>> Andrew Theurer posted a patch back in October[*], which makes the Xen >>> code match the Linux code. What happened to it? >> >> I guess it got dropped on the floor. > > Mind to pick it up?Repost it and I''ll put it on my to-apply list. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Markus Armbruster
2006-Nov-16 10:16 UTC
[PATCH] Xenoprof: Support Intel CORE microarchitecture (was Re: [Xen-devel] Xen support for i386/core and i386/core2?)
Repost of Andrew Theurer''s patch http://lists.xensource.com/archives/html/xen-devel/2006-10/msg00032.html Message-ID: <45213A82.8010009@us.ibm.com> Date: Mon, 02 Oct 2006 11:12:50 -0500 From: Andrew Theurer <habanero@us.ibm.com> To: xen-devel@lists.xensource.com This adds support for core and core2 chips. Tested on Woodcrest processors. Requires Oprofile 0.9.2. -Andrew Signed-off-by: Andrew Theurer <habanero@xxxxxxxxxx> diff -Naurp xen-unstable.hg-11684/xen/arch/x86/oprofile/nmi_int.c xen-unstable.hg-11684-oprofile/xen/arch/x86/oprofile/nmi_int.c --- xen-unstable.hg-11684/xen/arch/x86/oprofile/nmi_int.c 2006-10-02 10:55:35.000000000 -0500 +++ xen-unstable.hg-11684-oprofile/xen/arch/x86/oprofile/nmi_int.c 2006-10-02 10:58:35.000000000 -0500 @@ -305,22 +305,24 @@ static int __init ppro_init(char *cpu_ty { __u8 cpu_model = current_cpu_data.x86_model; - if (cpu_model > 0xd) { + if (cpu_model > 15) { printk("xenoprof: Initialization failed. " "Intel processor model %d for P6 class family is not " "supported\n", cpu_model); return 0; } - - if (cpu_model == 9) { + else if (cpu_model == 15) + strncpy (cpu_type, "i386/core_2", XENOPROF_CPU_TYPE_SIZE - 1); + else if (cpu_model == 14) + strncpy (cpu_type, "i386/core", XENOPROF_CPU_TYPE_SIZE - 1); + else if (cpu_model == 9) strncpy (cpu_type, "i386/p6_mobile", XENOPROF_CPU_TYPE_SIZE - 1); - } else if (cpu_model > 5) { + else if (cpu_model > 5) strncpy (cpu_type, "i386/piii", XENOPROF_CPU_TYPE_SIZE - 1); - } else if (cpu_model > 2) { + else if (cpu_model > 2) strncpy (cpu_type, "i386/pii", XENOPROF_CPU_TYPE_SIZE - 1); - } else { + else strncpy (cpu_type, "i386/ppro", XENOPROF_CPU_TYPE_SIZE - 1); - } model = &op_ppro_spec; return 1; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel