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: [PATCH] X86: cpuid faulting feature enable

To: "Shan, Haitao" <haitao.shan@xxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] X86: cpuid faulting feature enable
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Mon, 04 Jul 2011 07:58:01 +0100
Cc: "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Sun, 03 Jul 2011 23:59:25 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=OIomqlcDXkevKOLaGcfpwCmU3mnAcW0921Cm/tK3VJg=; b=ggJRxAq6gfnx53fYg7QJBW6Wyrtc4cGx3oowHF21J3mooWaCyFbR6mp7mXXev/7CRb A+GliQW5ywyLeqRcQwb9oFt6QcY4BHBgHCN7CY+tFZmUlUcVHU/y8CPt/dyVDZRtWOlJ ysWQzDgsDBK6JOI65iNQM9vxFDcR6+yJrTJXo=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <04F972F38B3C4E4E91C4697DA8BF9F526B9906D11D@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acw3+7/16Vp3WJ3IS6S3gX5C8o9g2gAOm4pdAAviHJAACbsjRQBWdH8AAAxQZGI=
Thread-topic: [PATCH] X86: cpuid faulting feature enable
User-agent: Microsoft-Entourage/12.29.0.110113
On 04/07/2011 02:06, "Shan, Haitao" <haitao.shan@xxxxxxxxx> wrote:

> diff -r 177ddb2f4ebf -r 71b58748cfee xen/arch/x86/cpu/cpu.h
> --- a/xen/arch/x86/cpu/cpu.h    Fri Jul 01 20:48:00 2011 +0100
> +++ b/xen/arch/x86/cpu/cpu.h    Fri Jul 01 22:28:53 2011 +0100
> @@ -30,4 +30,4 @@ extern void display_cacheinfo(struct cpu
>  extern void generic_identify(struct cpuinfo_x86 * c);
> 
>  extern void early_intel_workaround(struct cpuinfo_x86 *c);
> -
> +extern void intel_cpuid_faulting_flip(unsigned int enable);
> 
> Should we remove this part at all? Seems it is not used now.

Done. Thanks.

> Shan Haitao
> 
> -----Original Message-----
> From: Keir Fraser [mailto:keir.xen@xxxxxxxxx]
> Sent: Saturday, July 02, 2011 3:50 PM
> To: Tian, Kevin; Liu, Jinsong; xen-devel@xxxxxxxxxxxxxxxxxxx
> Cc: Shan, Haitao; Li, Xin
> Subject: Re: [PATCH] X86: cpuid faulting feature enable
> 
> On 02/07/2011 04:15, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
> 
>>> From: Keir Fraser [mailto:keir.xen@xxxxxxxxx] On Behalf Of Keir
>>> Fraser
>>> Sent: Saturday, July 02, 2011 5:31 AM
>>> 
>>> On 01/07/2011 15:32, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote:
>>> 
>>>> X86: cpuid faulting feature enable
>>>> 
>>>> Latest Intel processor add cpuid faulting feature. This patch is
>>>> used to support cpuid faulting in Xen.
>>>> Like cpuid spoofing, cpuid faulting mainly used to support live migration.
>>>> When cpl>0, cpuid instruction will produce GP, vmm then emulate
>>>> execution
>>> of
>>>> the cpuid instruction. Hence will appear to guest software the value
>>>> chosen
>>> by
>>>> the vmm.
>>> 
>>> I fixed this up quite a bit and applied as c/s 23653. Please take a
>>> look and give it a test. In particular note the changes I made in
>>> intel_init(), to make sure that APs are at least as featureful as the
>>> BSP w.r.t. cpuid faulting.
>>> 
>> 
>> 2.42 + } else if (boot_cpu_has(X86_FEATURE_CPUID_FAULTING)) {
>>     2.43 +  BUG_ON(!probe_intel_cpuid_faulting());
>>     2.44 +  set_bit(X86_FEATURE_CPUID_FAULTING, c->x86_capability);
>>     2.45 + }
>>     2.46 +
>>     2.47 + if (!cpu_has_cpuid_faulting)
>>     2.48 +  set_cpuidmask(c);
>>     2.49 +
>>     2.50 + BUG_ON(cpu_has(c, X86_FEATURE_CPUID_FAULTING) !=
>>     2.51 +        boot_cpu_has(X86_FEATURE_CPUID_FAULTING));
>> 
>> the latter BUG_ON is useless since if AP is inconsistent with BSP we
>> already get bug triggered in earlier BUG_ON.
> 
> Oops, I forgot to remove the redundant second BUG_ON. I'll do that now.
> Thanks!
> 
>  -- Keir
> 
>> Thanks
>> Kevin
> 
> 



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