Jes Sorensen [Thu, 10 Jun 2010 09:42:23 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:22 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:21 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:20 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:19 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:18 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:17 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:16 +0000 (11:42 +0200)]
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>
Jes Sorensen [Thu, 10 Jun 2010 09:42:15 +0000 (11:42 +0200)]
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>
Paul Brook [Fri, 11 Jun 2010 19:01:00 +0000 (20:01 +0100)]
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>
Aurelien Jarno [Fri, 11 Jun 2010 16:39:47 +0000 (18:39 +0200)]
tcg: fix DEF macro after commit
c61aaf7a388c4ad95d8b546fdb9267dc01183317
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 4 Jun 2010 19:14:09 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 19:14:12 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 19:14:11 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 19:14:10 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 19:14:14 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 19:14:13 +0000 (12:14 -0700)]
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>
Aurelien Jarno [Thu, 10 Jun 2010 18:52:47 +0000 (20:52 +0200)]
tcg-i386: fix andi r, r, 0xff
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Thu, 10 Jun 2010 18:40:24 +0000 (20:40 +0200)]
tcg-i386: remove use of _Bool that slipped code review
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Thu, 10 Jun 2010 17:57:39 +0000 (17:57 +0000)]
esp: lower IRQ on soft reset
42f1ced228c9b616cfa2b69846025271618e4ef5 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>
Isaku Yamahata [Thu, 27 May 2010 05:35:58 +0000 (14:35 +0900)]
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>
Isaku Yamahata [Thu, 27 May 2010 05:37:09 +0000 (14:37 +0900)]
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>
Isaku Yamahata [Thu, 27 May 2010 05:37:53 +0000 (14:37 +0900)]
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>
Isaku Yamahata [Thu, 27 May 2010 05:38:47 +0000 (14:38 +0900)]
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>
Anthony Liguori [Thu, 10 Jun 2010 14:21:43 +0000 (09:21 -0500)]
Merge remote branch 'mst/for_anthony' into staging
Edgar E. Iglesias [Thu, 10 Jun 2010 12:45:46 +0000 (14:45 +0200)]
cris: Break out image loading to hw/cris-boot.c.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
Richard Henderson [Fri, 4 Jun 2010 19:14:17 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 19:14:16 +0000 (12:14 -0700)]
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>
Richard Henderson [Fri, 4 Jun 2010 00:35:17 +0000 (17:35 -0700)]
tcg-i386: Merge 64-bit generation.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Wed, 9 Jun 2010 22:14:02 +0000 (00:14 +0200)]
configure: display sysconfdir in summary
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:29 +0000 (16:08 +0200)]
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>
Paolo Bonzini [Wed, 26 May 2010 14:08:28 +0000 (16:08 +0200)]
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>
Paolo Bonzini [Wed, 26 May 2010 14:08:27 +0000 (16:08 +0200)]
configure: ignore unknown --xyzdir options
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:26 +0000 (16:08 +0200)]
configure: introduce more --xyzdir options
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:25 +0000 (16:08 +0200)]
configure: expand ${prefix} in create_config
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:24 +0000 (16:08 +0200)]
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>
Paolo Bonzini [Wed, 26 May 2010 14:08:23 +0000 (16:08 +0200)]
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>
Paolo Bonzini [Wed, 26 May 2010 14:08:22 +0000 (16:08 +0200)]
rename CONFIG_QEMU_PREFIX
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:21 +0000 (16:08 +0200)]
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>
Paolo Bonzini [Wed, 26 May 2010 14:08:20 +0000 (16:08 +0200)]
configure: introduce sysconfsuffix
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:19 +0000 (16:08 +0200)]
configure: delete duplicate create_config case stanza
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:18 +0000 (16:08 +0200)]
configure: dyngen is long time gone
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paolo Bonzini [Wed, 26 May 2010 14:08:17 +0000 (16:08 +0200)]
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>
Paolo Bonzini [Wed, 26 May 2010 14:08:16 +0000 (16:08 +0200)]
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>
Aurelien Jarno [Wed, 9 Jun 2010 22:06:55 +0000 (00:06 +0200)]
configure: remove some bashisms
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Stefan Weil [Wed, 9 Jun 2010 20:09:40 +0000 (22:09 +0200)]
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>
Nathan Froyd [Tue, 8 Jun 2010 20:30:03 +0000 (13:30 -0700)]
hw: honor low bit in mipssim machine
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 8 Jun 2010 20:30:02 +0000 (13:30 -0700)]
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>
Nathan Froyd [Tue, 8 Jun 2010 20:30:01 +0000 (13:30 -0700)]
target-mips: add microMIPS exception handler support
Unlike MIPS16, microMIPS lets you choose the ISA mode for your exception
handlers. The ISA mode is selectable via a user-writable CP0.Config3
flag.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 8 Jun 2010 20:29:59 +0000 (13:29 -0700)]
target-mips: microMIPS ASE support
Add instruction decoding for the microMIPS ASE. All we do is decode and
then forward to the existing gen_* routines.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 8 Jun 2010 20:29:58 +0000 (13:29 -0700)]
target-mips: mips16 cleanups
Change code handling mips16-specific branches to use ISA-neutral special
opcodes. Since there are several places where the delay slot
requirements for microMIPS branches differ from mips16 branches, using
opcodes is easier than checking hflags, then checking mips16
vs. microMIPS.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 8 Jun 2010 20:29:57 +0000 (13:29 -0700)]
target-mips: refactor c{, abs}.cond.fmt insns
Move all knowledge about coprocessor-checking and register numbering
into the gen_cmp* helper functions.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Wed, 9 Jun 2010 13:13:17 +0000 (15:13 +0200)]
target-mips: move FP FMT comments closer to the definitions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 8 Jun 2010 20:29:56 +0000 (13:29 -0700)]
target-mips: define constants for magic numbers
Add FMT_* constants for the floating-point format field in opcodes and
tweak a few places to use them. Add enums for various invocations of
FOP and tweak gen_farith and its lone caller accordingly.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Thu, 3 Jun 2010 17:40:04 +0000 (19:40 +0200)]
tcg: get rid of DEF2 in tcg-opc.h
Now that tcg-opc.h is only used in TCG code, get rid of DEF2 in
tcg-opc.h.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Thu, 3 Jun 2010 17:29:31 +0000 (19:29 +0200)]
tcg: get rid of copy_size in TCGOpDef
copy_size is a left-over from the dyngen era, remove it.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Alexander Graf [Tue, 1 Jun 2010 23:56:50 +0000 (01:56 +0200)]
Fix multiboot compilation
Commit
dd4239d6574ca41c94fc0d0f77ddc728510ffc57 broke multiboot. It replaced the
instruction "rep insb (%dx), %es:(%edi)" by the binary output of
"addr32 rep insb (%dx), %es:(%di)".
Linuxboot calls the respective helper function in a code16 section. So the
original instruction was automatically translated to its "addr32" equivalent.
For multiboot, we're running in code32 so gcc didn't add the "addr32" which
breaks the instruction.
This patch splits that helper function in one which uses addr32 and one which
does not, so everyone's happy.
The good news is that nobody probably cared so far. The bundled multiboot.bin
binary was built before the change and is thus correct.
Please also put this patch into -stable.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Tue, 8 Jun 2010 15:43:58 +0000 (21:13 +0530)]
net: Fix hotplug with pci_add
The correct model type wasn't getting added when hotplugging nics with
pci_add.
Testcase: start VM with default nic type. In the qemu_monitor:
(qemu) pci_add auto nic model=virtio
This results in a nic hot-plug of the same nic type as the default.
This was broken in
5294e2c774f120e10b44652ac143abda356f44eb
Also changes the behaviour where no .init is defined for a
net_client_type. Previously, 0 was returned, which indicated the init
was successful and that 0 was the index into the nd_tables[] array.
Return -1, indicating unsuccessful init, in such a case.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Richard Henderson [Thu, 3 Jun 2010 00:26:56 +0000 (17:26 -0700)]
tcg: Make some tcg-target.c routines static.
Both tcg_target_init and tcg_target_qemu_prologue
are unused outside of tcg.c.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Thu, 3 Jun 2010 00:26:55 +0000 (17:26 -0700)]
tcg: Add TYPE parameter to tcg_out_mov.
Mirror tcg_out_movi in having a TYPE parameter. This allows x86_64
to perform the move at the proper width, which may elide a REX prefix.
Introduce a TCG_TYPE_REG enumerator to represent the "native width"
of the host register, and to distinguish the usage from "pointer data"
as represented by the existing TCG_TYPE_PTR.
Update all targets to match.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Mon, 24 May 2010 16:19:35 +0000 (09:19 -0700)]
target-mips: break out [ls][wd]c1 and rdhwr insn generation
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 21 May 2010 17:04:46 +0000 (10:04 -0700)]
Fix --enable-user-pie compilation.
We forgot to propagate -fpie to the libdis-user directory.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Michael S. Tsirkin [Sun, 6 Jun 2010 15:53:10 +0000 (18:53 +0300)]
virtio-net: truncating packet
virtio net attempts to peek into virtio queue to
determine that we have enough space for the complete
packet to fit. However, it fails to account for space
consumed by virtio net header when it does this,
under stress this results in a failure
with the message 'truncating packet'.
redhat bz 591494.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Edgar E. Iglesias [Mon, 7 Jun 2010 09:54:27 +0000 (11:54 +0200)]
microblaze: Make MSR_UM and MSR_VM part of the tb flags
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
Edgar E. Iglesias [Mon, 7 Jun 2010 09:53:09 +0000 (11:53 +0200)]
petlogix-3adsp: Tweak displacement of cmdline and fdt blob.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
Blue Swirl [Fri, 4 Jun 2010 20:01:07 +0000 (20:01 +0000)]
migration-exec: fix OpenBSD build warning
Add include directives to get WIFEXITED() and WEXITSTATUS() macros defined.
Fixes warnings:
CC migration-exec.o
/src/qemu/migration-exec.c: In function `exec_close':
/src/qemu/migration-exec.c:53: warning: implicit declaration of function `WIFEXITED'
/src/qemu/migration-exec.c:54: warning: implicit declaration of function `WEXITSTATUS'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Paolo Bonzini [Fri, 4 Jun 2010 14:27:33 +0000 (16:27 +0200)]
target-i386: fix decoding of negative 4-byte displacements
Negative four byte displacements need to be sign-extended after
c086b783eb7a578993d6d2ab62c4c2666800b63d. Do so.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Anthony Liguori [Thu, 3 Jun 2010 19:55:49 +0000 (14:55 -0500)]
Merge remote branch 'kwolf/for-anthony' into staging
Anthony Liguori [Wed, 2 Jun 2010 19:55:25 +0000 (14:55 -0500)]
migration: respect exit status with exec:
This patch makes sure that if the exec: process exits with a non-zero return
status, we treat the migration as failed.
This fixes https://bugs.launchpad.net/qemu/+bug/391879
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Aurelien Jarno [Wed, 2 Jun 2010 22:02:30 +0000 (00:02 +0200)]
tcg-i386: fix a typo
Fix a typo introduced by
c28b14c694d759f39fe3ae4f8d03b567da5b93f8.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Tue, 1 Jun 2010 11:55:18 +0000 (13:55 +0200)]
tcg-i386: declare tcg_out_tlb_load() inline
Declare tcg_out_tlb_load() inline so that we don't loose optimisations
with commit
8516a04467cb7954cdc32e8b79b4b7df56dccb16.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 21 May 2010 16:03:04 +0000 (09:03 -0700)]
tcg-i386: Remove some ifdefs in qemu_ld/st.
Tidy some code by replacing ifdefs by C ifs.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 21 May 2010 16:03:03 +0000 (09:03 -0700)]
tcg-i386: Split out tlb load function.
Share some code between qemu_ld and qemu_st.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 21 May 2010 16:03:02 +0000 (09:03 -0700)]
tcg-i386: Swap order of TLB hit and miss paths.
Make fallthru be TLB hit and branch be TLB miss. Doing this
both improves branch prediction and will allow further cleanup.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 21 May 2010 16:03:01 +0000 (09:03 -0700)]
tcg-i386: Split out TLB Hit path from qemu_ld/st.
Splitting out these functions will allow further cleanups.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Fri, 21 May 2010 16:03:00 +0000 (09:03 -0700)]
tcg-i386: Tidy data16 prefixes.
Include it in the opcode as an extension, as with P_EXT
or the REX bits in the x86-64 port.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Igor V. Kovalenko [Tue, 1 Jun 2010 20:12:58 +0000 (00:12 +0400)]
sparc64: fix umul and smul insns
- truncate and sign or zero extend operands before multiplication
- factor out common code to gen_op_multiply() with parameter to sign/zero extend
- call gen_op_multiply from gen_op_umul and gen_op_smul
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Tue, 1 Jun 2010 20:12:53 +0000 (00:12 +0400)]
sparc64: fix udiv and sdiv insns
- truncate second operand to 32bit
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Tue, 1 Jun 2010 20:12:48 +0000 (00:12 +0400)]
sparc64: improve ldf and stf insns
- implemented block load/store primary/secondary with user privilege
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Wed, 2 Jun 2010 19:39:09 +0000 (23:39 +0400)]
sparc64: use symbolic name for MMU index v1
- use symbolic name for MMU index
v0->v1:
- change debug traces to DPRINTF_MMU
- fix debug trace function names
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Tue, 1 Jun 2010 20:12:37 +0000 (00:12 +0400)]
sparc64: fix ldxfsr insn
- rearrange code to break from switch when appropriate
- allow deprecated ldfsr insn
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Tue, 1 Jun 2010 20:12:32 +0000 (00:12 +0400)]
sparc64: fix 32bit load sign extension
- change return type of ldl_* to uint32_t to prevent unwanted sign extension
visible in sparc64 load alternate address space methods
- note this change makes ldl_* softmmu implementations match ldl_phys one
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Wed, 2 Jun 2010 19:38:45 +0000 (23:38 +0400)]
sparc64: fix missing address masking v1
- address masking for ldqf and stqf insns
- address masking for lddf and stdf insns
- address masking for translating ASI (Ultrasparc IIi)
v0->v1:
- move arch-specific code to helpers and drop more ifdefs at call sites
using new helper asi_address_mask()
- change user emulation to use asi_address_mask()
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Igor V. Kovalenko [Tue, 1 Jun 2010 20:12:22 +0000 (00:12 +0400)]
sparc64: fix tag access register on mmu traps
- set mmu tag access register on FAULT and PROT traps as well
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Michael S. Tsirkin [Wed, 2 Jun 2010 08:40:54 +0000 (11:40 +0300)]
virtio-net: stop vhost backend on vmstop
vhost net currently keeps running after vmstop,
which causes trouble as qemy does not check
for dirty pages anymore.
The fix is to simply keep vm and vhost running/stopped
status in sync.
Tested-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Corentin Chary [Tue, 1 Jun 2010 21:05:44 +0000 (23:05 +0200)]
vnc: add missing target for vnc-encodings-*.o
vnc-encodings-*.c dependencies where missing.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Corentin Chary [Tue, 1 Jun 2010 21:05:43 +0000 (23:05 +0200)]
vnc: tight: don't forget the third color
While couting color, if the third color was only present one
time it wasn't added to the palette.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Corentin Chary [Tue, 1 Jun 2010 21:05:42 +0000 (23:05 +0200)]
vnc: tight: don't forget last pixel in tight_encode_indexed_rect
A simple patch would have been to just remove count -= 1, but this
one also replace the while (count--) with a for(i = 0; i < count; i++)
which I believe is more easy to understand.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Mon, 31 May 2010 17:43:32 +0000 (14:43 -0300)]
Monitor: Drop QMP documentation from code
Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.
While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we
don't expect client writers to consult the code to find how to
use a QMP command.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Mon, 31 May 2010 17:43:31 +0000 (14:43 -0300)]
QMP: Introduce commands documentation
One of the most important missing feature in QMP today is its
supported commands documentation.
The plan is to make it part of self-description support, however
self-description is a big task we have been postponing for a
long time now and still don't know when it's going to be done.
In order not to compromise QMP adoption and make users' life easier,
this commit adds a simple text documentation which fully describes
all QMP supported commands.
This is not ideal for a number of reasons (harder to maintain,
text-only, etc) but does improve the current situation. To avoid at
least divering from the user monitor help and texi snippets, QMP bits
are also maintained inside qemu-monitor.hx, and hxtool is extended to
generate a single text file from them.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Mon, 31 May 2010 17:43:30 +0000 (14:43 -0300)]
monitor: Reorder info documentation
Push the doc fragments for the info command to the end of
qemu-monitor.hx. This helps to establish a proper layout in the upcoming
QMP documentation.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Tue, 1 Jun 2010 18:34:20 +0000 (13:34 -0500)]
Merge remote branch 'mst/for_anthony' into HEAD
Gerd Hoffmann [Tue, 25 May 2010 16:25:20 +0000 (18:25 +0200)]
vnc: move size-changed check into the vnc_desktop_resize function.
This make sure we send a desktop resize message only in case we actually
have to, using the new variables which track the clients desktop size.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 25 May 2010 16:25:19 +0000 (18:25 +0200)]
vnc: don't send invalid screen updates.
Don't send updates for screen areas which are outside the clients
desktop. May happed with vnc clients which don't support the desktop
resize message.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 25 May 2010 16:25:18 +0000 (18:25 +0200)]
vnc: keep track of client desktop size
Add two new variables to keep track of the vnc clients desktop size.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 25 May 2010 16:25:17 +0000 (18:25 +0200)]
vnc: send desktopresize event as reply to set encodings
In case the desktop did resize while the vnc connection setup was still
in progress the client isn't informed about it. Send a desktop resize
event as soon as the client told us it can handle deskop resize via set
encodings message to make sure the client us up to date.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 25 May 2010 16:25:16 +0000 (18:25 +0200)]
vnc: factor out vnc_desktop_resize()
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Fri, 21 May 2010 09:59:14 +0000 (11:59 +0200)]
Add support for depth 15 to qemu_default_pixelformat()
Makes qemu_default_pixelformat(15) return pixelformat filled for 15 bit
color depth (16 bpp, 5 bits for red,green,blue each, 1 bit unused).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Thu, 20 May 2010 13:23:06 +0000 (15:23 +0200)]
check for active_console before using it
Other vga_hw_* functions do the same.
Fixes a segmentation fault. Trigger: boot with -nodefaults,
then connect via vnc.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Thu, 20 May 2010 07:18:52 +0000 (09:18 +0200)]
Add dependency of JSON unit tests on config-host.h
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>