[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Project idea: make QEMU more flexible



Il 23/01/2014 17:23, Wei Liu ha scritto:
On Thu, Jan 23, 2014 at 01:54:40PM +0000, Wei Liu wrote:
On Thu, Jan 23, 2014 at 10:11:57AM +0100, Paolo Bonzini wrote:
Il 22/01/2014 17:09, Wei Liu ha scritto:
On Wed, Jan 22, 2014 at 11:20:38AM +0100, Paolo Bonzini wrote:
Il 21/01/2014 19:27, Wei Liu ha scritto:

Googling "disable tcg" would have provided an answer, but the patches
were old enough to be basically useless.  I'll refresh the current
version in the next few days.  Currently I am (or try to be) on
vacation, so I cannot really say when, but I'll do my best. :)

Hi Paolo, any update?

Oops, sorry, I thought I had sent that out.  It's in the disable-tcg
branch on my github repository.


Unfortunately your branch didn't work when I enabled TCG support. If I
use "--disable-tcg" with configure then it works fine.

Branch fixed.


Yes, it's fixed for the case I reported. Thanks.

But it is now broken with following rune:
./configure --enable-kvm --disable-tcg --target-list=i386-softmmu
--disable-xen --enable-debug

  LINK  i386-softmmu/qemu-system-i386
  cpus.o: In function `cpu_signal':
  /local/scratch/qemu/cpus.c:569: undefined reference to `exit_request'
  cpus.o: In function `tcg_cpu_exec':
  /local/scratch/qemu/cpus.c:1257: undefined reference to `cpu_x86_exec'
  cpus.o: In function `tcg_exec_all':
  /local/scratch/qemu/cpus.c:1282: undefined reference to `exit_request'
  /local/scratch/qemu/cpus.c:1299: undefined reference to `exit_request'
  exec.o: In function `tlb_reset_dirty_range_all':
  /local/scratch/qemu/exec.c:736: undefined reference to
  `cpu_tlb_reset_dirty_all'
  collect2: error: ld returned 1 exit status
  make[1]: *** [qemu-system-i386] Error 1
  make: *** [subdir-i386-softmmu] Error 2

--enable-debug is the one to blame. Without that it links successfully.

Wei.


Finally I figured out what was wrong. Your patch series was relying on
compiler to aggresively optimize away unused code.

So when --enable-debug is set, compiler won't optimize away the dead
code, hence those undefine references. With any optimization option -O
you series compiles successfully.

Feel free to integrate my patch below, or fix those errors in the way
you see appropriate.

Thanks!  I added stubs for all three undefined symbols in tcg-stub.c.

Another way to fix it would be -ffunction-sections/-Wl,--gc-sections (which shaves 200k more out of the .text section), but that breaks glibc static linking.

Paolo

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.