All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Huang <wei.huang2@amd.com>
To: Tim Deegan <Tim.Deegan@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: AMD extended migration CPU masks: why only on CPU 0?
Date: Fri, 19 Feb 2010 14:27:12 -0600	[thread overview]
Message-ID: <4B7EF420.1010200@amd.com> (raw)
In-Reply-To: <20100216174352.GJ368@whitby.uk.xensource.com>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Tim,

The (extended) CPUID mask MSRs are associated with each core. They need 
to be updated on each core if migration happens across CPUs. Changset 
18402 does update the MSRs for each core. But printk() only happens on 
core 0. If you move printk() statements below wrmsr(), you will see it 
been called on each core.

It is hard to justify which way is better. I attach the patch anyway, in 
case Keir or you want it for xen-unstable.

Signed-off-by: Wei Huang <wei.huang2@amd.com>

Best,
-Wei




Tim Deegan wrote:
> Hi Travis, 
>
> In c/s 18402, the CPUID masks are only set once, on CPU 0.  Can you
> explain why this doesn't have to happen on every core, or at least every
> socket?  The white paper doesn't discuss it. 
>
> Cheers,
>
> Tim.
>
>   


[-- Attachment #2: amd_cpu_feature_mask_printk.patch --]
[-- Type: text/x-patch, Size: 873 bytes --]

diff -r 83a6621b91bf xen/arch/x86/cpu/amd.c
--- a/xen/arch/x86/cpu/amd.c	Wed Feb 10 09:20:56 2010 +0000
+++ b/xen/arch/x86/cpu/amd.c	Fri Feb 19 14:22:04 2010 -0600
@@ -131,10 +131,6 @@
 	}
 
 	status = set_mask;
-	printk("Writing CPUID feature mask ECX:EDX -> %08Xh:%08Xh\n", 
-	       feat_ecx, feat_edx);
-	printk("Writing CPUID extended feature mask ECX:EDX -> %08Xh:%08Xh\n", 
-	       extfeat_ecx, extfeat_edx);
 
  setmask:
 	/* FIXME check if processor supports CPUID masking */
@@ -146,6 +142,10 @@
 		wrmsr_amd(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
 		wrmsr_amd(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
 	}
+        printk("Writing CPUID feature mask ECX:EDX -> %08Xh:%08Xh\n", 
+               feat_ecx, feat_edx);
+        printk("Writing CPUID extended feature mask ECX:EDX -> %08Xh:%08Xh\n", 
+               extfeat_ecx, extfeat_edx);
 }
 
 /*

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2010-02-19 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 17:43 AMD extended migration CPU masks: why only on CPU 0? Tim Deegan
2010-02-19 20:27 ` Wei Huang [this message]
2010-02-22 13:36   ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B7EF420.1010200@amd.com \
    --to=wei.huang2@amd.com \
    --cc=Tim.Deegan@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.