Commit Graph

11978 Commits

Author SHA1 Message Date
Jes Sorensen 59a5264b99 Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c
Introduce OS specific cmdline argument handling by calling
os_parse_cmd_args() at the end of switch() statement. Move option
enum to qemu-options.h and have it included from os-posix.c and
os-win32.c in addition to vl.c.

In addition move SMB argument to os-posix.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:15 +03:00
Jes Sorensen 9f16732a06 Rename qemu-options.h to qemu-options.def
Rename qemu-options.h to qemu-options.def as it is not a header file
for general use and this leaves space for a proper qemu-options.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:15 +03:00
Jes Sorensen 6170540b82 Move find_datadir to OS specific files.
This moves the win32 and POSIX versions of find_datadir() to OS
specific files, and removes some #ifdef clutter from vl.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 8d963e6ae7 Move main signal handler setup to os specificfiles.
Move main signal handler setup to os specific files.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen fe98ac1461 Rename os_setup_signal_handling() to os_setup_early_signal_handling()
Rename os_setup_signal_handling() to os_setup_early_signal_handling()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 69bd73b1b0 Move win32 early signal handling setup to os_setup_signal_handling()
Move win32 early signal handling setup to os_setup_signal_handling()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 86b645e753 Introduce os-posix.c and create os_setup_signal_handling()
Introcuce os-posix.c and move posix specific signal handling
there.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 0d93ca7c3b vl.c: Move host_main_loop_wait() to OS specific files.
Move host_main_loop_wait() to OS specific files. Create
qemu-os-posix.h and provide empty inline for the POSIX case.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 19113504de Introduce os-win32.c and move polling functions from vl.c
This introduces os-win32.c. It is meant to carry win32 specific
functions thata are not relevant for all of QEMU as well as win32
versions of various pieces like signal handling etc.

Move win32 polling handler helper functions from vl.c to os-win32.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 39626c0375 Create qemu-os-win32.h and move WIN32 specific declarations there
Create qemu-os-win32.h for WIN32 specific declarations. Move polling
handling declaration into this file from sysemu.h

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen ddc9120e90 vl.c: Remove double include of netinet/in.h for Solaris
vl.c: netinet/in.h is already included once above for the

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Andreas Faerber <afaerber@opensolaris.org>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:13 +03:00
Paul Brook 41ba834146 NEON vldN optimization
When combining multiple values as part of a NEON array load, do explcit
shift/or rather than using gen_bfi.  This voids redundant mask
operations.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-06-11 20:37:51 +01:00
Aurelien Jarno 0e2029a063 tcg: fix DEF macro after commit c61aaf7a38
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 18:39:47 +02:00
Richard Henderson 28d7cc493e tcg-s390: Adjust compilation flags.
Force -m31/-m64 based on s390/s390x target.

Force -march=z990.  The TCG backend will always require the
long-displacement facility, so the compiler may as well make
use of that as well.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 18:16:35 +02:00
Richard Henderson 6a1621b917 tcg-s390: Compute is_write in cpu_signal_handler.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 18:15:41 +02:00
Richard Henderson 4d58be0628 s390x: Don't use a linker script for user-only.
The default placement of the application at 0x80000000 is fine,
and will avoid the default placement for most other guests.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 18:15:36 +02:00
Richard Henderson d35b261c7a s390x: Avoid _llseek.
There's no _llseek on s390x either.  Replace the existing
test for __x86_64__ with a functional test for __NR_llseek.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 18:15:35 +02:00
Richard Henderson eba0b89379 tcg-s390: Allocate the code_gen_buffer near the main program.
This allows the use of direct calls to the helpers,
and a direct branch back to the epilogue.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 09:30:48 +02:00
Richard Henderson 1bcaae666f tcg-s390: Icache flush is a no-op.
Before gcc 4.2, __builtin___clear_cache doesn't exist, and
afterward the gcc s390 backend implements it as nothing.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-11 08:46:05 +02:00
Aurelien Jarno dc397ca35e tcg-i386: fix andi r, r, 0xff
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 20:52:47 +02:00
Aurelien Jarno 447d681e8b tcg-i386: remove use of _Bool that slipped code review
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 20:41:08 +02:00
Blue Swirl 85948643b8 esp: lower IRQ on soft reset
42f1ced228 removed irq lowering
during reset. However, for chip reset command and DMA reset signal,
its actually the correct thing to do.

Lower IRQ on soft reset only.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10 17:57:39 +00:00
Isaku Yamahata e163ae7b8f qbus: fix memory leak in qbus_free()
BusState::name is allocated in qbus_create_inplace().
So it should be freed by qbus_free().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10 16:50:11 +00:00
Isaku Yamahata bd418d90d0 multiboot: compilation fix with DEBUG_MULTIBOOT enabled.
This patch fixes the following compilation errors in multiboot.c
when DEBUG_MULTIBOOT is defined.
Use TARGET_FMT_plx instead of %x for target_phys_addr_t.

  CC    i386-softmmu/multiboot.o
cc1: warnings being treated as errors
qemu/hw/multiboot.c: In function 'mb_add_mod':
qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 4 has type 'target_phys_addr_t'
qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t'
qemu/hw/multiboot.c: In function 'load_multiboot':
qemu/hw/multiboot.c:279: error: format '%#x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t'
qemu/hw/multiboot.c:307: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t'
qemu/hw/multiboot.c:308: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t'
make[1]: *** [multiboot.o] Error 1

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10 16:49:28 +00:00
Isaku Yamahata fe7f9567a6 vga-isa-mm: remove one #ifdef CONFIG_BOCHS_VBE.
remove one #ifdef CONFIG_BOCHS_VBE.
Call vga_init_vbe() instead.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10 16:48:32 +00:00
Isaku Yamahata 0f2ad63fcb main: allocate gui_timer only once.
fix memory leak.
there is no need to allocate more than one gui_timer.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10 16:48:06 +00:00
Anthony Liguori 60a3992e75 Merge remote branch 'mst/for_anthony' into staging 2010-06-10 09:21:43 -05:00
Edgar E. Iglesias 77d4f95e11 cris: Break out image loading to hw/cris-boot.c.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-06-10 14:45:46 +02:00
Richard Henderson 2024c53950 s390: Disassemble some general-instruction-extension insns.
The full general-instruction-extension facility was added to binutils
after the change to GPLv3.  This is not the entire extension, just
what we're using in TCG.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:46:41 +02:00
Richard Henderson 402ce448af s390: Update disassembler to the last GPLv2 from binutils.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:46:41 +02:00
Richard Henderson 5d8a4f8f4a tcg-i386: Merge 64-bit generation.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:16:21 +02:00
Aurelien Jarno 1c0fd16018 configure: display sysconfdir in summary
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:14:02 +02:00
Paolo Bonzini ca35f780ac move computation of tools and roms outside of config-host.mak generation
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:50 +02:00
Paolo Bonzini 683035de78 configure: move directory defaults earlier
Unify with existing special-purpose configure code for win32.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:50 +02:00
Paolo Bonzini 6bde81cb03 configure: ignore unknown --xyzdir options
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:50 +02:00
Paolo Bonzini 0b24e75f85 configure: introduce more --xyzdir options
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:49 +02:00
Paolo Bonzini 1dabe05ce4 configure: expand ${prefix} in create_config
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:49 +02:00
Paolo Bonzini 99d7cc75dd configure: move all directory entries in config-host.mak close
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:49 +02:00
Paolo Bonzini f2b9e1e37d configure: unify handling of xyzdir variables
Making an xyzdir variable for each directory prepares for the next
patches introducing config-host.h defines and configure options for them.
It also fixes the problem where overriding prefix at "make install"
time did not override it for sysconfdir.

Removes some of the differences between sysconfdir and other variables,
the rest will go away later.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:49 +02:00
Paolo Bonzini 7ee2822cbe rename CONFIG_QEMU_PREFIX
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:49 +02:00
Paolo Bonzini 190e9c59c0 configure: introduce confdir and confsuffix
confsuffix was write-only, flesh it out.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:48 +02:00
Paolo Bonzini e7b45cc446 configure: introduce sysconfsuffix
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:48 +02:00
Paolo Bonzini 604f78e06e configure: delete duplicate create_config case stanza
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:48 +02:00
Paolo Bonzini 0bfe8cc012 configure: dyngen is long time gone
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:48 +02:00
Paolo Bonzini f55fe2785c configure: avoid using expr
Just a personal preference against duplicating hieroglyphics.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:48 +02:00
Paolo Bonzini a447d4dc56 configure: bail out early on invalid -cpu option
It would fail later anyway.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:48 +02:00
Aurelien Jarno 4021d2476c configure: remove some bashisms
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-10 00:09:47 +02:00
Stefan Weil 3308759844 target-mips: Fix compilation
TCGv t1 needs tcg_temp_free instead of tcg_temp_free_i32.

Cc: Nathan Froyd <froydnj@codesourcery.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-09 23:37:36 +02:00
Nathan Froyd aecf137698 hw: honor low bit in mipssim machine
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-09 16:10:51 +02:00
Nathan Froyd 0fddbbf255 linux-user: honor low bit of entry PC for MIPS
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-09 16:10:51 +02:00