From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] KVM: x86 emulator: MMX support Date: Wed, 21 Mar 2012 23:32:58 +0200 Message-ID: <4F6A490A.10802@redhat.com> References: <1332355222-30508-1-git-send-email-avi@redhat.com> <1332355222-30508-2-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35655 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760571Ab2CUVdC (ORCPT ); Wed, 21 Mar 2012 17:33:02 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2LLX1p4021044 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 21 Mar 2012 17:33:01 -0400 In-Reply-To: <1332355222-30508-2-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/21/2012 08:40 PM, Avi Kivity wrote: > > +static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) > +{ > + bool fault = false; > + > + ctxt->ops->get_fpu(ctxt); > + asm volatile("1: fwait \n\t" > + "2: \n\t" > + ".pushsection .fixup,\"ax\" \n\t" > + "3: \n\t" > + "movb $1, %[fault] \n\t" > + "jmp 2b \n\t" > + ".popsection \n\t" > + _ASM_EXTABLE(1b, 3b) > + : [fault]"=rm"(fault)); > "=" tells gcc that the asm section unconditionally writes 'fault', so it skips the initialization. Use "+" instead. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.