Luiz Capitulino [Thu, 25 Feb 2010 15:06:58 +0000 (12:06 -0300)]
block: Emit BLOCK_IO_ERROR before vm_stop() call
The next commit will move the STOP event into do_vm_stop(), to
have the expected event sequence we need to emit the I/O error
event before calling vm_stop().
The expected sequence is:
{ "event": "BLOCK_IO_ERROR" [...] }
{ "event": "STOP" }
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Adam Litke [Mon, 22 Feb 2010 16:51:20 +0000 (10:51 -0600)]
Fix hanging user monitor when using balloon command
This patch application failed. My patch adds a cb() call in
do_balloon(), but the change in git has added the cb() call to
do_info_balloon(). That is causing qemu segfaults. Applying the
following should correct the damage. Thanks.
Fix for commit:
5c366a8a3d7ac71beda8499caa815cb3ea95eb58
The cb() call is needed in do_balloon(), not do_info_balloon().
Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 1 Mar 2010 14:47:28 +0000 (08:47 -0600)]
sdl: improve grab exiting instructions
It might not be obvious what "grab" is.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Aurelien Jarno [Mon, 8 Mar 2010 11:31:27 +0000 (12:31 +0100)]
ppc: don't define bamboo-0.13 as the default machine
It has been broken by commit
977b6b91cee1132f8c7b12d22f4b273091598e44.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Sun, 7 Mar 2010 15:48:43 +0000 (15:48 +0000)]
Blue Swirl [Sun, 7 Mar 2010 13:56:27 +0000 (13:56 +0000)]
i386-dis: remove dead assignments, spotted by clang
Value stored to 'mask' is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:49:58 +0000 (13:49 +0000)]
softfloat: remove dead assignments, spotted by clang
Value stored to 'bSign' is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:45:38 +0000 (13:45 +0000)]
slirp: remove dead nested assignment, spotted by clang
Although the value stored to 'r' is used in the enclosing expression,
the value is never actually read from 'r'.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:45:38 +0000 (13:45 +0000)]
slirp: remove dead initialization, spotted by clang
Value stored during initialization is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:45:37 +0000 (13:45 +0000)]
slirp: remove dead increments, spotted by clang
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:13:05 +0000 (13:13 +0000)]
slirp: remove dead assignments, spotted by clang
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Adam Lackorzynski [Mon, 1 Mar 2010 16:19:54 +0000 (17:19 +0100)]
target-arm: Fix missing 'return' in SRS handling.
There's a return missing in the srs handling which leads to srs always being
treated an an invalid op.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Samuel Thibault [Sun, 28 Feb 2010 20:03:00 +0000 (21:03 +0100)]
Fix curses interaction with keymaps
The combination of keymap support (-k option) and curses is currently
very broken. The patch below fixes it by first extending keymap support
to interpret the shift, ctrl, altgr and addupper keywords in keymaps,
and to fix curses into properly using keymaps.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Paolo Bonzini [Fri, 5 Mar 2010 08:08:04 +0000 (09:08 +0100)]
use absolute URLs for .gitmodules
The relative URLs do not work when cloning a fork of qemu or when
cloning from the Savannah URL.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Stefan Weil [Thu, 4 Mar 2010 21:21:02 +0000 (22:21 +0100)]
Documentation: Modify rule for html output (better looking output format)
To create html output from texi input, texi2html was used.
Output from makeinfo looks cleaner, so replace the old rule
and use makeinfo now.
For those who want to use their own variant of html output,
the macros MAKEINFO and MAKEINFOFLAGS allow customisation.
Option "-I ." is not needed (the current directory is
searched by default), so remove it.
Please note that the build requirements changed, too:
makeinfo is required for doc builds.
texi2html is no longer used.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Christoph Hellwig [Thu, 4 Mar 2010 13:45:44 +0000 (14:45 +0100)]
scsi: update comment on the standards revision
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Ryota Ozaki [Wed, 3 Mar 2010 15:18:43 +0000 (00:18 +0900)]
qemu-nbd: Fix wrong description in qemu-nbd.texi
-c option needs argument <dev> but it's missing now.
This patch fixes it.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Kevin Wolf [Wed, 3 Mar 2010 15:02:25 +0000 (16:02 +0100)]
Build usb-ohci for PCs
The OHCI emulation isn't obviously broken and there are people who want to use
it. Let's build it by default so that it can be enabled via -device.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Thu, 25 Feb 2010 13:56:12 +0000 (19:26 +0530)]
ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type
Disable the MULTIPORT feature and MSI vectors for the 0.12 machine
types; those features are added only for 0.13 onwards.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Thu, 25 Feb 2010 13:56:11 +0000 (19:26 +0530)]
ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat
Add a 0.12 machine type for compatibility with older versions. Mark the
default one as 0.13.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Thu, 25 Feb 2010 13:45:18 +0000 (19:15 +0530)]
s390-virtio: Fix compile error for virtio-block init
Commit
428c149b0be790b440e1cbee185b152cdb22feec modified the argument
that virtio_blk_init takes. Update the s390 bus code that calls this
function.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Kevin Wolf [Wed, 24 Feb 2010 15:17:58 +0000 (16:17 +0100)]
json-parser: Fix segfault on malformed input
If the parser fails to parse the key in parse_pair, it will access a NULL
pointer. A simple way to trigger this is sending {foo} via QMP. This patch
turns the segfault into a syntax error reply.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 6 Mar 2010 21:19:53 +0000 (22:19 +0100)]
hw/serial.c: fix THRE interrupt clearing
UART_IIR_THRI is not a mask, but a possible value for the IIR ID.
Use UART_IIR_ID to extract this value.
Broken by commit
71e605f80313a632cc6714cde7bd240042dbdd95.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 6 Mar 2010 19:23:09 +0000 (20:23 +0100)]
hw/serial.c: fix indentation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
takasi-y@ops.dti.ne.jp [Wed, 17 Feb 2010 15:46:45 +0000 (00:46 +0900)]
linux-user: Save/restore fpu registers to signal context on sh4
As "todo" comment in source code.
And modify restore_sigcontext() to have three args as kernel's does.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
takasi-y@ops.dti.ne.jp [Wed, 17 Feb 2010 15:35:03 +0000 (00:35 +0900)]
linux-user: Fix syscall pipe2() retval on sh4
On linux/sh4
pipe() return values by r0:r1 as SH C calling convention.
pipe2() return values on memory as traditional unix way.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
malc [Thu, 4 Mar 2010 12:09:26 +0000 (15:09 +0300)]
target-i386: Fix long jumps/calls in long mode with REX.W set
Signed-off-by: malc <av1474@comtv.ru>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 6 Mar 2010 17:33:53 +0000 (18:33 +0100)]
target-i386: fix lddqu SSE instruction
This instruction load data from memory to register and not the reverse.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Anthony Liguori [Sat, 6 Mar 2010 03:42:50 +0000 (21:42 -0600)]
Update to latest SeaBIOS
- 8f469b9 Dynamically allocate ata_channel info; introduce custom atadrive_s struct.
- 575ffc8 Cleanup - build drive description in temp memory during init.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Thu, 4 Mar 2010 20:44:41 +0000 (14:44 -0600)]
Makefile: Fix names of GPXE ROM files
da51e79b7ff2126cc2448749d657a4f6e3b1270f added two new ROM files
and removed an old one for eepro100.c.
These changes were missing in Makefile (which resulted
in a broken "make install").
Reported by Lucas Meneghel Rodrigues, thanks.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Aurelien Jarno [Wed, 3 Mar 2010 11:22:11 +0000 (12:22 +0100)]
target-mips: use newer logical ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Anthony Liguori [Thu, 4 Mar 2010 15:14:24 +0000 (09:14 -0600)]
Merge remote branch 'qemu-kvm/uq/master' into pulls
Jan Kiszka [Mon, 1 Mar 2010 18:10:32 +0000 (19:10 +0100)]
x86: Extend validity of bsp_to_cpu
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals
cpu_index, bsp_to_cpu can also be based on the latter directly. This
will help an early user of it: KVM while initializing mp_state.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Mon, 1 Mar 2010 18:10:31 +0000 (19:10 +0100)]
KVM: x86: Restrict writeback of VCPU state
Do not write nmi_pending, sipi_vector, and mpstate unless we at least go
through a reset. And TSC as well as KVM wallclocks should only be
written on full sync, otherwise we risk to drop some time on state
read-modify-write.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Mon, 1 Mar 2010 18:10:30 +0000 (19:10 +0100)]
KVM: Rework VCPU state writeback API
This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:
- cpu_synchronize_all_states in qemu_savevm_state_complete
(initial sync from kernel before vmsave)
- cpu_synchronize_all_post_init in qemu_loadvm_state
(writeback after vmload)
- cpu_synchronize_all_post_init in main after machine init
- cpu_synchronize_all_post_reset in qemu_system_reset
(writeback after system reset)
These writeback points + the existing one of VCPU exec after
cpu_synchronize_state map on three levels of writeback:
- KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run)
- KVM_PUT_RESET_STATE (on synchronous system reset, all VCPUs stopped)
- KVM_PUT_FULL_STATE (on init or vmload, all VCPUs stopped as well)
This level is passed to the arch-specific VCPU state writing function
that will decide which concrete substates need to be written. That way,
no writer of load, save or reset functions that interact with in-kernel
KVM states will ever have to worry about synchronization again. That
also means that a lot of reasons for races, segfaults and deadlocks are
eliminated.
cpu_synchronize_state remains untouched, just as Anthony suggested. We
continue to need it before reading or writing of VCPU states that are
also tracked by in-kernel KVM subsystems.
Consequently, this patch removes many cpu_synchronize_state calls that
are now redundant, just like remaining explicit register syncs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Mon, 1 Mar 2010 18:10:29 +0000 (19:10 +0100)]
KVM: Rework of guest debug state writing
So far we synchronized any dirty VCPU state back into the kernel before
updating the guest debug state. This was a tribute to a deficite in x86
kernels before 2.6.33. But as this is an arch-dependent issue, it is
better handle in the x86 part of KVM and remove the writeback point for
generic code. This also avoids overwriting the flushed state later on if
user space decides to change some more registers before resuming the
guest.
We furthermore need to reinject guest exceptions via the appropriate
mechanism. That is KVM_SET_GUEST_DEBUG for older kernels and
KVM_SET_VCPU_EVENTS for recent ones. Using both mechanisms at the same
time will cause state corruptions.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Marcelo Tosatti [Mon, 1 Mar 2010 23:25:08 +0000 (20:25 -0300)]
Add option to use file backed guest memory
Port qemu-kvm's -mem-path and -mem-prealloc options. These are useful
for backing guest memory with huge pages via hugetlbfs.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
CC: john cooper <john.cooper@redhat.com>
Avi Kivity [Wed, 24 Feb 2010 21:11:19 +0000 (18:11 -0300)]
Allocate memory below 4GB as one chunk
Instead of allocating a separate chunk for the first 640KB and another
for 1MB+, allocate one large chunk. This plays well in terms of alignment
and size with large pages.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:38:00 +0000 (22:38 +0100)]
eepro100: Keep includes sorted
I always try to keep standard includes sorted
and add a comment why they are there (so they
can be removed when they are no longer needed).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:59 +0000 (22:37 +0100)]
eepro100: Remove C++ comments
C++ comments are unwanted, so this is fixed here.
* Replace C++ comments by C comments.
* Put code which was deactivated by a C++ comment in #if 0...#endif.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:58 +0000 (22:37 +0100)]
eepro100: Add diagnose command
Real hardware would run an internal self-test.
The emulation just returns a passed status.
Original patch was from Reimar Döffinger, thanks.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:57 +0000 (22:37 +0100)]
eepro100: New function for reading command block
Move code which reads the command block to the
new function read_cb. The patch also fixes some
endianess issues related to the command block
and moves declarations of local variables to
the beginning of the block.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:56 +0000 (22:37 +0100)]
eepro100: Use tx.status
There is no need for a local variable "status".
Using tx.status makes it clearer which status
is addressed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:55 +0000 (22:37 +0100)]
eepro100: Prettify code (no functional changes)
* Fix indentation.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:54 +0000 (22:37 +0100)]
eepro100: Fix CU Start command
CU Start is allowed when the CU is in the idle or suspended state.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:53 +0000 (22:37 +0100)]
eepro100: Support RNR interrupt
The RNR interrupt is triggered under these conditions:
* the RU is not ready to receive a frame due to missing resources
* the RU is ready and a RU abort command was requested
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:52 +0000 (22:37 +0100)]
eepro100: Replace variable name to fix a compiler warning
When compiling with -Wshadow, gcc gives a warning
which is fixed by renaming stat -> status.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:51 +0000 (22:37 +0100)]
eepro100: Use symbolic names for bits in EEPROM id
V2 - Use UPPER_CASE for enum values
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:50 +0000 (22:37 +0100)]
eepro100: Remove old unused code
This code is no longer needed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:49 +0000 (22:37 +0100)]
eepro100: Use symbolic names and BIT macros in binary operations
Instead of magic numbers like 0x8000, symbolic names are used
for the SCB command and status bits.
There are too many configuration bits to use symbolic names
there, too. Using the BIT macro is a little help when comparing
code and documentation.
For the same reason, some other constants were replaced by
the BITS macro.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:48 +0000 (22:37 +0100)]
eepro100: Add device descriptions
Add descriptions for all devices.
These descriptions are shown when users call
qemu -device ?
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:47 +0000 (22:37 +0100)]
eepro100: Update copyright notice
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:46 +0000 (22:37 +0100)]
eepro100: Add TODO list
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:44 +0000 (22:37 +0100)]
eepro100: Support gpxe boot for all eepro100 devices
Only two boot ROM files are needed for all devices.
* Add these GPXE ROM files using new naming convention
(as discussed on qemu-devel). Both files were created
with http://rom-o-matic.net/, PCI vendor / device ids
as in ROM filenames and option BANNER_TIMEOUT = 0.
* Remove old PXE ROM file for i82559er.
It was replaced by gpxe-eepro100-
80861209.rom.
* Update pc-bios/README (and sort entries).
Full support still needs additional eepro100 fixes.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:43 +0000 (22:37 +0100)]
eepro100: Fix PXE boot
The phy handling was wrong for PXE, GPXE boot:
GPXE's eepro100 driver did not detect a valid link.
This is fixed here.
V2 - Use UPPER_CASE for enum values
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:42 +0000 (22:37 +0100)]
eepro100: Add missing SCB register names
Some system control block registers were addressed
using their offset value. Use symbolic names now
and clean the documentation.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:41 +0000 (22:37 +0100)]
eepro100: Fix compiler errors from debug messages
When debug output was enabled (by defining DEBUG_EEPRO100),
some debug messages resulted in a compiler error.
This is fixed here.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Samuel Thibault [Sun, 28 Feb 2010 17:12:01 +0000 (18:12 +0100)]
(curses) Use more descriptive values
Hello,
curses_keys.h is using obscure constant values while the curses.h header
provides fine defines, let's use the latter.
To be applied on top of my previous patch.
Samuel
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Samuel Thibault [Sun, 28 Feb 2010 14:35:19 +0000 (15:35 +0100)]
Fix curses return key when using -k
Hello,
There is a small incoherency in curses_keys.h, which makes it fail to
emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157
into \n, but name2keysym binds \r with Return, not \n. The patch below
fixes that.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Aurelien Jarno [Mon, 8 Feb 2010 14:50:58 +0000 (15:50 +0100)]
target-mips: use setcond when possible
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Tue, 2 Mar 2010 22:10:31 +0000 (23:10 +0100)]
tcg/arm: merge the two sets of #define for optional ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Mon, 1 Mar 2010 21:33:50 +0000 (22:33 +0100)]
tcg/arm: accept immediate arguments for brcond/setcond
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Andrzej Zaborowski [Tue, 2 Mar 2010 21:26:04 +0000 (22:26 +0100)]
Add a missing break
Aurelien Jarno [Mon, 1 Mar 2010 21:33:49 +0000 (22:33 +0100)]
tcg/arm: implement setcond2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Aurelien Jarno [Mon, 1 Mar 2010 21:33:48 +0000 (22:33 +0100)]
tcg/arm: implement setcond
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Aurelien Jarno [Tue, 2 Mar 2010 19:19:18 +0000 (20:19 +0100)]
tcg/arm: fix div2/divu2
When restoring register values, increase the stack register for skipped
values.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Paul Brook [Mon, 1 Mar 2010 03:31:14 +0000 (03:31 +0000)]
Avoid tlb_set_page in userspace emulation
tlb_set_page isn't meaningful for userspace emulation, so remove it.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Mon, 1 Mar 2010 03:31:14 +0000 (03:31 +0000)]
Move subpage definitions
Move definitions for subpage handling into !CONFIG_USER_ONLY code.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Mon, 1 Mar 2010 03:55:48 +0000 (03:55 +0000)]
Disassembler symbol lookup fix
Fix function signature for userspace disassembler symbol lookup.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Mon, 1 Mar 2010 03:29:21 +0000 (03:29 +0000)]
Move ioport.h out of cpu-all.h
Only include ioport.h where it is actually needed.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Mon, 1 Mar 2010 00:08:59 +0000 (00:08 +0000)]
Remove bogus cpu_physical_memory_rw
Userspace doesn't have physical memory, so cpu_physical_memory_rw
makes no sense. This is only used to implement cpu_memory_rw_debug, so
just implement that directly instead.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Sun, 28 Feb 2010 23:55:53 +0000 (23:55 +0000)]
Remove l1_phys_map from userspace emulation
Userspace emulation doesn't have a physical address space, so
l1_phys_map makes no sense. This code is never actually used, so don't
try and build it.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Sun, 28 Feb 2010 23:47:45 +0000 (23:47 +0000)]
Fix userspace breakpoint invalidation
Remove bogus virtual->physical address translation in
breakpoint_invalidate for userspace emulation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Juha Riihimäki [Fri, 5 Feb 2010 15:52:29 +0000 (15:52 +0000)]
target-arm: neon vshll instruction fix
implementation only widened the 32bit source vector elements into a
64bit destination vector but forgot to perform the actual shifting
operation.
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Riku Voipio [Fri, 5 Feb 2010 15:52:28 +0000 (15:52 +0000)]
target-arm: neon - fix VRADDHN/VRSUBHN vs VADDHN/VSUBHN
The rounding/truncating options were inverted. truncating
was done when rounding was meant and vice verse.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Jason Wessel [Tue, 26 Jan 2010 22:29:50 +0000 (16:29 -0600)]
target-i386: fix crash on x86 32bit linux host with hw breakpoint exceptions
If you make use of hw breakpoints on a 32bit x86 linux host, qemu
will segmentation fault when processing the exception.
The problem is that the value of env is stored in $ebp in the op_helper
raise_exception() function, and it can have the wrong value when
calling it from non generated code.
It is possible to work around the problem by restoring the value of
env before calling raise_exception() using a new helper function that
takes (CPUState *) as one of the arguments.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Mon, 28 Dec 2009 02:30:03 +0000 (18:30 -0800)]
alpha-linux-user: Implement signals.
Move userland PALcode handling into linux-user main loop so that
we can send signals from there. This also makes alpha_palcode.c
system-level only, so don't build it for userland. Add defines
for GENTRAP PALcall mapping to signals.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Richard Henderson [Mon, 4 Jan 2010 22:27:23 +0000 (14:27 -0800)]
target-alpha: Implement IEEE FP qualifiers.
IEEE FP instructions are split up so that the rounding mode
coming from the instruction and exceptions (both masking and
delivery) are handled external to the base FP operation.
FP exceptions are properly raised for non-finite inputs to
instructions that do not indicate software completion.
A shortcut is applied if CONFIG_SOFTFLOAT_INLINE is defined
at the top of translate.c: data is loaded and stored into
FP_STATUS directly instead of using the functional interface
defined by "softfloat.h".
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 28 Feb 2010 15:04:09 +0000 (16:04 +0100)]
target-ppc: don't print invalid opcode messages on the console
Invalid opcode messages can be perfectly normal, for example if this
code is never executed. Don't print an error message on the console,
but keep the message in the log for debugging purposes.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 28 Feb 2010 15:02:28 +0000 (16:02 +0100)]
Revert "target-ppc: stop translation after a trap instruction"
This reverts commit
6454e7be1b2504533f7ffb190d54ebe2993cb434.
malc [Sun, 28 Feb 2010 15:34:21 +0000 (18:34 +0300)]
audio/alsa: Handle SND_PCM_STATE_SETUP in alsa_poll_handler
Signed-off-by: malc <av1474@comtv.ru>
Vagrant Cascadian [Fri, 26 Feb 2010 21:39:46 +0000 (13:39 -0800)]
audio/alsa: Spelling typo (paramters)
Trivial patch to fix the spelling of "parameters".
Signed-off-by: malc <av1474@comtv.ru>
Aurelien Jarno [Sun, 28 Feb 2010 13:11:06 +0000 (14:11 +0100)]
target-ppc: stop translation after a trap instruction
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Jan Kiszka [Mon, 18 Jan 2010 11:15:01 +0000 (12:15 +0100)]
qemu-char.c: drop debug printfs from qemu_chr_parse_compat
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Liu Yu [Tue, 2 Feb 2010 08:49:03 +0000 (16:49 +0800)]
powerpc/e500: adjust fdt and ramdisk loading addr
Since kernel uimage is getting bigger,
old fixed loading bases will result in regions overlap.
Add pad for fdt and ramdisk, so that they won't overlap with uimage.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 27 Feb 2010 18:47:22 +0000 (19:47 +0100)]
powerpc: fix compilation with CONFIG_FDT undefined
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Liu Yu [Tue, 2 Feb 2010 08:49:02 +0000 (16:49 +0800)]
powerpc/booke: move fdt loading to rom infrastructure
It's convinent to use rom to checking overlap, to reset etc.
And uImage and ramdisk loading has already moved to it.
Also, after we add fdt to rom, free it.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Liu Yu [Wed, 27 Jan 2010 06:14:09 +0000 (14:14 +0800)]
target-ppc: add synchronize register for booke init
So that the following registers init could be flushed back to kvm.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Acked-by: Hollis Blanchard <hollis@penguinppc.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
takasi-y@ops.dti.ne.jp [Wed, 17 Feb 2010 15:53:29 +0000 (00:53 +0900)]
target-sh4: Fix gdb read/write register
cpu_gdb_read_register(): Fix n={8...15} case.
cpu_gdb_write_register(): Fix n={8...15} case and runaway "case:".
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 23 Feb 2010 20:21:31 +0000 (12:21 -0800)]
target-ppc: fix SPE evsplat* instructions
The shifts in the gen_evsplat* functions were expecting rA to be masked,
not extracted, and so used the wrong shift amounts to sign-extend or pad
with zeroes.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Nathan Froyd [Tue, 23 Feb 2010 19:55:14 +0000 (11:55 -0800)]
target-ppc: fix SPE evcmp* instructions
The CRF_{CH,CL,CH_OR_CL,CH_AND_CL} constants were all off by one bit
position. Because of this, the SPE evcmp* family of instructions would
store values in the result condition register that were also off by one
bit position.
Fixed by using the CRF_{LT,GT,EQ,SO} constants for the shift amounts.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Stefan Weil [Tue, 23 Feb 2010 21:32:23 +0000 (22:32 +0100)]
arm host: Fix linker warning (m68k targets)
Compilation of m68k-softmmu or m68k-linux-user on arm host
(or cross compilation for arm) results in a linker warning:
LINK m68k-softmmu/qemu-system-m68k
m68k-dis.o: warning: definition of `floatformat_ieee_single_little' overriding common
arm-dis.o: warning: common is here
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../../arm-linux-gnueabi/bin/ld: Warning: size of symbol `floatformat_ieee_single_little' changed from 4 in arm-dis.o to 48 in m68k-dis.o
floatformat_ieee_single_little is declared in arm-dis.c and m68k-dis.c,
and both declarations don't match, so this is an error.
The symbol is not needed in arm-dis.c, so I removed it there.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Fri, 26 Feb 2010 08:30:28 +0000 (14:00 +0530)]
Fix 'make install' from non-srcdir build
Commit
b5ec5ce0 broke 'make install' from non source-dir build. Fix.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Daniel Gutson [Fri, 26 Feb 2010 17:13:50 +0000 (14:13 -0300)]
Fix to 'gdb detach' stub
With this patch, 'gdb detach' correctly resumes the inferior execution
after detaching the debugger.
The bug was caused by qemu asking gdb to execute a syscall (isatty)
after the detach, and then waiting (forever) for the reply. I fixed this
by properly setting gdb_syscall_mode appropriately in the 'detach'
packet handling, so subsequent syscalls are solved by qemu rather than gdb.
Signed-off-by: Daniel Gutson <dgutson@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 27 Feb 2010 09:50:32 +0000 (10:50 +0100)]
Fix qemu -net user,hostfwd= example
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
malc [Fri, 26 Feb 2010 22:59:47 +0000 (01:59 +0300)]
tcg/ppc: Fix right rotation
Signed-off-by: malc <av1474@comtv.ru>
Stefan Weil [Thu, 25 Feb 2010 18:05:41 +0000 (19:05 +0100)]
target-sparc: fix --enable-debug build for 64 bit host
b551ec04ca45d1925417dd2ec7c1b7f115c84f1d fixed
the compilation for 32 bit hosts, but introduced
a new error for 64 bit hosts:
tcg_temp_new_ptr needs a matching tcg_temp_free_ptr.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Paul Brook [Thu, 25 Feb 2010 13:29:06 +0000 (13:29 +0000)]
Fix -usbdevice crash
If -usbdevice is used on a machine with no USB busses, usb_create
will fail and return NULL. Patch below handles this failure gracefully
rather than crashing when we try to init the device.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Tue, 23 Feb 2010 23:31:53 +0000 (23:31 +0000)]
ARM defconfig fix
Tix typo in default-configs/arm-softmmu.mak
Signed-off-by: Paul Brook <paul@codesourcery.com>
Richard Henderson [Mon, 4 Jan 2010 19:25:22 +0000 (11:25 -0800)]
target-alpha: Mark helper_excp as NORETURN.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>