From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v4 3/4] VMX: use proper instruction mnemonics if assembler supports them Date: Mon, 26 Aug 2013 16:33:46 +0100 Message-ID: <521B755A.8080407@citrix.com> References: <521786A002000078000EE064@nat28.tlf.novell.com> <521787C602000078000EE07F@nat28.tlf.novell.com> <52193148.2090601@citrix.com> <521B36AA02000078000EE496@nat28.tlf.novell.com> <521B1F15.1030104@citrix.com> <521B479902000078000EE505@nat28.tlf.novell.com> <521B528C.8080107@citrix.com> <521B7C6402000078000EE6D4@nat28.tlf.novell.com> <521B63AF.7000008@citrix.com> <521B825D02000078000EE72D@nat28.tlf.novell.com> <521B6F41.6090204@citrix.com> <521B907D02000078000EE79C@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VDyne-00017u-CP for xen-devel@lists.xenproject.org; Mon, 26 Aug 2013 15:33:50 +0000 In-Reply-To: <521B907D02000078000EE79C@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser , Eddie Dong , Jun Nakajima List-Id: xen-devel@lists.xenproject.org On 26/08/2013 16:29, Jan Beulich wrote: >>>> On 26.08.13 at 17:07, Andrew Cooper wrote: >> I was more referring to having a q in the instruction, yet an "r" in the >> parameter list. I would suggest > So you perhaps mix up "q" as a constraint (meaning byte registers) > and "q" as an operand qualifier (meaning the 64-bit register > regardless of the operand size of the respective asm() operand)? I clearly am. Sorry for the confusion. ~Andrew > >> INV{EPT,VPID} is strictly defined to take r64 as the "type" parameter in >> long mode. Invalid/unsupported values found in this register can be >> detected based on the state of EFLAGS afterwards. >> >> Therefore, I would suggest possibly changing "int type" to "unsigned >> long type" if we are going to the effort of getting this correct. It >> shouldn't make a difference currently, as all calls use appropriate >> INVEPT_*_CONTEXT defines. > Yes, as already indicated. v5 is about to be on its way. > >> As for the flags, should we be including "cc" to the clobber list as >> each of the VM*/INV* instructions explicitly sets the flags. I would >> hope that the toolchain is pessimistic enough to not trust the state of >> the flags across some inline assembly, but I can't find any hard >> information one way or another. > Yes, on x86 at least it is never necessary to list cc explicitly. > Which at times is sad, but here's it's to our benefit. > > Jan >