From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: VMX: Correct asm constraint in vmcs_load() Date: Mon, 20 Dec 2010 20:26:29 +0200 Message-ID: <4D0F9FD5.800@redhat.com> References: <1292835996-7274-1-git-send-email-avi@redhat.com> <4D0F8AA2.3010301@oracle.com> <4D0F96C0.8040101@redhat.com> <4D0F9816.7050003@oracle.com> <4D0F98F4.5070002@redhat.com> <4D0F9943.8090001@redhat.com> <4D0F9ED3.4040009@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Randy Dunlap Return-path: Received: from mx1.redhat.com ([209.132.183.28]:10792 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932742Ab0LTS0f (ORCPT ); Mon, 20 Dec 2010 13:26:35 -0500 In-Reply-To: <4D0F9ED3.4040009@oracle.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/20/2010 08:22 PM, Randy Dunlap wrote: > On 12/20/10 09:58, Avi Kivity wrote: > > On 12/20/2010 07:57 PM, Avi Kivity wrote: > >> On 12/20/2010 07:53 PM, Randy Dunlap wrote: > >>> On 12/20/10 09:47, Avi Kivity wrote: > >>> > On 12/20/2010 06:56 PM, Randy Dunlap wrote: > >>> >> On 12/20/10 01:06, Avi Kivity wrote: > >>> >> > 'error' is byte sized, so use a byte register constraint. > >>> >> > >>> >> Hm, OK, but I still get the same build error. > >>> > > >>> > Not okay then. Can you verify that by removing the content of the > >>> > function the problem goes away? > >>> > >>> Nope. I put #if 0 / #endif around the asm() and if (error) lines > >>> but I still get the error message: > >>> > >>> linux-next-20101217/arch/x86/kvm/vmx.c: Assembler messages: > >>> linux-next-20101217/arch/x86/kvm/vmx.c:488: Error: bad register name > >>> `%sil' > >>> > >> > >> And line 488 was one of those under #if 0? > >> > >>> which is on the "u8 error;" line below: > >>> > >>> static void vmcs_load(struct vmcs *vmcs) > >>> { > >>> u64 phys_addr = __pa(vmcs); > >>> u8 error; > >>> > > > > Er, you just answered me. Are you sure gcc saw your update? what > > happens if you comment that line as well? assign to 'error' instead? > > > pwd > /lnx/src/NEXT/linux-next-20101217 > > > quilt ser -v > = kvm-asm-constraint12.patch > > > make ARCH=i386 O=X32 all 2>&1 | tee kvm7.out > > Using /lnx/src/NEXT/linux-next-20101217 as source for kernel > GEN /lnx/src/NEXT/linux-next-20101217/X32/Makefile > CHK include/linux/version.h > CHK include/generated/utsrelease.h > CALL /lnx/src/NEXT/linux-next-20101217/scripts/checksyscalls.sh > CHK include/generated/compile.h > CC arch/x86/kvm/vmx.o > /lnx/src/NEXT/linux-next-20101217/arch/x86/kvm/vmx.c: Assembler messages: > /lnx/src/NEXT/linux-next-20101217/arch/x86/kvm/vmx.c:488: Error: bad register name `%sil' > make[3]: *** [arch/x86/kvm/vmx.o] Error 1 > make[2]: *** [arch/x86/kvm] Error 2 > make[1]: *** [arch/x86] Error 2 > make: *** [sub-make] Error 2 > > > This is with the entire function being empty (no code, no data). > > > Wierd. > > Definitely. I can't explain it. > Maybe it's the vmcs_clear() above. Try the same treatment? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.