From: David Vrabel Subject: [PATCH] libxc: set CPUID topology leaf as unsupported for PV guests Date: Thu, 14 Jul 2011 12:50:19 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: David Vrabel List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User David Vrabel # 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. 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 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;