From: "Jan Beulich" Subject: Re: [PATCH] x86/amd: Protect set_cpuidmask() against #GP faults Date: Thu, 05 Jun 2014 16:14:36 +0100 Message-ID: <5390A57C0200007800018583@mail.emea.novell.com> References: <1401967206-27715-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1401967206-27715-1-git-send-email-andrew.cooper3@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Boris Ostrovsky , Aravind Gopalakrishnan , Suravee Suthikulpanit , Xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 05.06.14 at 13:20, wrote: > --- a/xen/arch/x86/cpu/amd.c > +++ b/xen/arch/x86/cpu/amd.c > @@ -151,7 +151,7 @@ static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) > static unsigned int extfeat_ecx, extfeat_edx; > static unsigned int l7s0_eax, l7s0_ebx; > static unsigned int thermal_ecx; > - static bool_t skip_l7s0_eax_ebx, skip_thermal_ecx; > + static bool_t skip_feat, skip_extfeat, skip_l7s0, skip_thermal; Please don't drop the _eax_ebx and _ecx suffixes - they're there for a reason (leaf 7 likely also getting ECX and EDX a bitmap assigned at some point, and the thermal leaf also having further unused registers that may become subject to masking later on). Jan