All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH] libxc: set CPUID topology leaf as unsupported for PV guests
Date: Thu, 14 Jul 2011 14:30:28 +0100	[thread overview]
Message-ID: <CA44AE04.1DDBE%keir.xen@gmail.com> (raw)
In-Reply-To: <b3705aae543b95fd7f6b.1310644219@qabil>

On 14/07/2011 12:50, "David Vrabel" <david.vrabel@citrix.com> wrote:

> # HG changeset patch
> # User David Vrabel <david.vrabel@citrix.com>
> # 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@citrix.com>
> 
> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2011-07-14 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 11:50 [PATCH] libxc: set CPUID topology leaf as unsupported for PV guests David Vrabel
2011-07-14 13:30 ` Keir Fraser [this message]
2011-07-14 13:56   ` Ian Campbell
2011-07-14 14:25   ` David Vrabel
2011-07-15  8:41     ` Jan Beulich

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=CA44AE04.1DDBE%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=david.vrabel@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.