From: "Jan Beulich" Subject: Re: =?utf-8?q?=5BPATCH_2/3=5D_x86=3A_correctly_check_for_?= =?utf-8?q?sub=E2=80=91leaf_zero_of_leaf_7_in_pv=5Fcpuid=28=29?= Date: Tue, 20 Jan 2015 11:12:05 +0000 Message-ID: <54BE46150200007800056F3F@mail.emea.novell.com> References: <54BD2F2B0200007800056859@mail.emea.novell.com> <54BD307B0200007800056871@mail.emea.novell.com> <54BE31FB.1050901@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YDWjC-0006vM-Iv for xen-devel@lists.xenproject.org; Tue, 20 Jan 2015 11:12:10 +0000 In-Reply-To: <54BE31FB.1050901@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: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 20.01.15 at 11:46, wrote: > On 19/01/15 15:27, Jan Beulich wrote: >> Only the low 32 bits are relevant. >> >> Signed-off-by: Jan Beulich > > There are two examples of "regs->eax" which could turn to regs->_eax > under the same argument; the if statement immediately after cpuid, In if ( (regs->eax & 0x7fffffff) == 0x00000001 ) it really doesn't matter, as the high 33 bits get chopped off anyway. > and the switch statement. Yes, this could be cleaned up. But still its not under the same argument as switch ( (uint32_t)regs->eax ) and switch ( regs->_eax ) are functionally identical, whereas the sole original change actually fixed a functionality problem. Jan