qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Yaniv Kaul <ykaul@redhat.com>,
	qemu-devel@nongnu.org, kvm <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] Failure to compile latest git (target-i386/kvm.c:953:29: error: variable ‘fop’ set but not used)
Date: Sun, 24 Apr 2011 10:10:17 +0300	[thread overview]
Message-ID: <4DB3CCD9.6020602@redhat.com> (raw)
In-Reply-To: <4DB05086.7050609@siemens.com>

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 ‘kvm_get_xsave’:
> >  /home/ykaul/qemu/target-i386/kvm.c:953:29: error: variable ‘fop’ set but
> >  not used [-Werror=unused-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 information
> 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 
handle it, because likely qemu tcg never emulated it and thus we never 
had anywhere to stow it.

To trigger a bug here you'd need a live migration that happens after an 
x87 fpu instruction that causes an exception but before the next fpu 
instruction (which would trigger an exception), plus an exception 
handler that reads this information (I think Linux doesn't), plus an 
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.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

      reply	other threads:[~2011-04-24  7:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 14:10 [Qemu-devel] Failure to compile latest git (target-i386/kvm.c:953:29: error: variable ‘fop’ set but not used) Yaniv Kaul
2011-04-21 15:12 ` Stefan Hajnoczi
2011-04-21 15:43 ` Jan Kiszka
2011-04-24  7:10   ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DB3CCD9.6020602@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ykaul@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).