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

Re: [Xen-devel] AMD extended migration CPU masks: why only on CPU 0?

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] AMD extended migration CPU masks: why only on CPU 0?
From: Wei Huang <wei.huang2@xxxxxxx>
Date: Fri, 19 Feb 2010 14:27:12 -0600
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 19 Feb 2010 12:31:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20100216174352.GJ368@xxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100216174352.GJ368@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080914)
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@xxxxxxx>

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.


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);
 }
 
 /*
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>