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] [PATCH] libxc: set CPUID topology leaf as unsupported fo

To: David Vrabel <david.vrabel@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxc: set CPUID topology leaf as unsupported for PV guests
From: Keir Fraser <keir.xen@xxxxxxxxx>
Date: Thu, 14 Jul 2011 14:30:28 +0100
Cc:
Delivery-date: Thu, 14 Jul 2011 06:32:18 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=sC4ZtmCG8Her8x96deqYHwZAJYxinJXH9WODrt+XEhw=; b=RxaKux0CMXz0Fn+mcRn1wrYD/KY6mg9thuzGUNrykwdDoTTPxB0OOdKmFnGJvNtY0t VoAuHCNNz78p+Hw1zCSLdVEFrOziRs7orcXCNhLJPKazrZyottl5mCeK54iQ2iGC5w32 OtFOYbhg+8/hXtikChczWE9x8f0wNH6yro83U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b3705aae543b95fd7f6b.1310644219@qabil>
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: AcxCKjHkzDZcFvmHN02XCGXGHNPFSg==
Thread-topic: [Xen-devel] [PATCH] libxc: set CPUID topology leaf as unsupported for PV guests
User-agent: Microsoft-Entourage/12.30.0.110427
On 14/07/2011 12:50, "David Vrabel" <david.vrabel@xxxxxxxxxx> wrote:

> # HG changeset patch
> # User David Vrabel <david.vrabel@xxxxxxxxxx>
> # Date 1310643124 -3600
> # Branch cpuid
> # Node ID b3705aae543b95fd7f6bb38c21b5f1edd2b70609
> # Parent  98701b1276c034b2bbbc8c7a975cf4c361caaa63
> libxc: set CPUID topology leaf as unsupported for PV guests
> 
> The result of a CPUID Extended Topology Enumeration leaf for PV guests
> is invalid as the level in ECX is ignored.  This can cause some guests
> to loop endlessly when trying to enumerate the topology.
> 
> Since the physical topology isn't useful to PV guests set the topology
> leaf as unsupported.

For future reference, you also need to modify
xen/arch/x86/traps.c:pv_cpuid(), for dom0.

 -- Keir

> Guests affected include Linux kernels prior 2.6.32 where a workaround
> was applied ("xen: mask extended topology info in cpu",
> 82d6469916c6fcfa345636a49004c9d1753905d1).
> 
> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
> 
> diff -r 98701b1276c0 -r b3705aae543b tools/libxc/xc_cpuid_x86.c
> --- a/tools/libxc/xc_cpuid_x86.c Thu Jul 14 09:43:37 2011 +0100
> +++ b/tools/libxc/xc_cpuid_x86.c Thu Jul 14 12:32:04 2011 +0100
> @@ -487,6 +487,11 @@ static void xc_cpuid_pv_policy(
>          regs[0] = regs[2] = regs[3] = 0;
>          break;
>  
> +    case 0x0000000b:
> +        /* Extended Topology Enumeration leaf is unsupported. */
> +        regs[0] = regs[1] = regs[2] = regs[3] = 0;
> +        break;
> +
>      case 0x0000000d:
>          xc_cpuid_config_xsave(xch, domid, xfeature_mask, input, regs);
>          break;
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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