qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Failure to compile latest git (target-i386/kvm.c:953:29: error: variable ‘fop’ set but not used)
@ 2011-04-21 14:10 Yaniv Kaul
  2011-04-21 15:12 ` Stefan Hajnoczi
  2011-04-21 15:43 ` Jan Kiszka
  0 siblings, 2 replies; 4+ messages in thread
From: Yaniv Kaul @ 2011-04-21 14:10 UTC (permalink / raw)
  To: qemu-devel

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


[ykaul@ykaul qemu]$ gcc --version
gcc (GCC) 4.6.0 20110419 (Red Hat 4.6.0-5)


- Does happen even though I've used --target-list=x86_64-softmmu

- Doesn't happen with --disable-kvm in ./configure.

Then I'm getting:

/home/ykaul/qemu/tcg/tcg.c: In function ‘tcg_gen_callN’:
/home/ykaul/qemu/tcg/tcg.c:589:9: error: variable ‘call_type’ set but 
not used [-Werror=unused-but-set-variable]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Failure to compile latest git (target-i386/kvm.c:953:29: error: variable ‘fop’ set but not used)
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2011-04-21 15:12 UTC (permalink / raw)
  To: Yaniv Kaul; +Cc: qemu-devel

On Thu, Apr 21, 2011 at 3:10 PM, Yaniv Kaul <ykaul@redhat.com> 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
>
>
> [ykaul@ykaul qemu]$ gcc --version
> gcc (GCC) 4.6.0 20110419 (Red Hat 4.6.0-5)
>
>
> - Does happen even though I've used --target-list=x86_64-softmmu
>
> - Doesn't happen with --disable-kvm in ./configure.
>
> Then I'm getting:
>
> /home/ykaul/qemu/tcg/tcg.c: In function ‘tcg_gen_callN’:
> /home/ykaul/qemu/tcg/tcg.c:589:9: error: variable ‘call_type’ set but not
> used [-Werror=unused-but-set-variable]

Hi Yaniv,
Do you want to take a stab at fixing these warnings and sending patches?
http://wiki.qemu.org/Contribute/SubmitAPatch

If these warnings are preventing you from using QEMU, try:
$ ./configure --disable-werror

Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Failure to compile latest git (target-i386/kvm.c:953:29: error: variable ‘fop’ set but not used)
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2011-04-21 15:43 UTC (permalink / raw)
  To: Yaniv Kaul; +Cc: qemu-devel, kvm, Avi Kivity

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? 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.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Failure to compile latest git (target-i386/kvm.c:953:29: error: variable ‘fop’ set but not used)
  2011-04-21 15:43 ` Jan Kiszka
@ 2011-04-24  7:10   ` Avi Kivity
  0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2011-04-24  7:10 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Yaniv Kaul, qemu-devel, 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 ‘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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-24  7:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).