From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDtSa-00087o-S6 for qemu-devel@nongnu.org; Sun, 24 Apr 2011 03:10:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QDtSZ-0003uc-Sd for qemu-devel@nongnu.org; Sun, 24 Apr 2011 03:10:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDtSZ-0003uY-Gg for qemu-devel@nongnu.org; Sun, 24 Apr 2011 03:10:23 -0400 Message-ID: <4DB3CCD9.6020602@redhat.com> Date: Sun, 24 Apr 2011 10:10:17 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4DB03AC4.1070907@redhat.com> <4DB05086.7050609@siemens.com> In-Reply-To: <4DB05086.7050609@siemens.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] =?windows-1252?q?Failure_to_compile_latest_git_=28ta?= =?windows-1252?q?rget-i386/kvm=2Ec=3A953=3A29=3A_error=3A_variable_=91fop?= =?windows-1252?q?=92_set_but_not_used=29?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Yaniv Kaul , qemu-devel@nongnu.org, kvm On 04/21/2011 06:43 PM, Jan Kiszka wrote: > On 2011-04-21 16:10, Yaniv Kaul wrote: > > Fedora 15beta/x64, latest git: > > [ykaul@ykaul qemu]$ make > > CC x86_64-softmmu/kvm.o > > /home/ykaul/qemu/target-i386/kvm.c: In function =91kvm_get_xsave=92: > > /home/ykaul/qemu/target-i386/kvm.c:953:29: error: variable =91fop=92= set but > > not used [-Werror=3Dunused-but-set-variable] > > cc1: all warnings being treated as errors > > > > make[1]: *** [kvm.o] Error 1 > > make: *** [subdir-x86_64-softmmu] Error 2 > > > > This one looks a bit suspicious: > > Avi, why do we have kvm_fpu::last_* in the ABI, copying that informatio= n > from/to user land, but do not handle it otherwise? We have in in the ABI because it is part of the FPU state. We don't=20 handle it, because likely qemu tcg never emulated it and thus we never=20 had anywhere to stow it. To trigger a bug here you'd need a live migration that happens after an=20 x87 fpu instruction that causes an exception but before the next fpu=20 instruction (which would trigger an exception), plus an exception=20 handler that reads this information (I think Linux doesn't), plus an=20 application that cares about the data... Note the kernel does handle it correctly. > To my understanding > this fop here in xsave corresponds to kvm_fpu::last_opcode in the > SET/GET_FPU case, right? It's set to 0 on SET_XSAVE and ignored on > GET_XSAVE as this warnings tells us. We have exactly the same issue in kvm_get_fpu(), just with no warning. --=20 I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.