Commit Graph

10961 Commits

Author SHA1 Message Date
Blue Swirl 369c86e788 slirp: remove dead increments, spotted by clang
Value stored is never read.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-07 13:45:37 +00:00
Blue Swirl aca9fcd28e slirp: remove dead assignments, spotted by clang
Value stored is never read.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-07 13:13:05 +00:00
Adam Lackorzynski a990f58fed 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>
2010-03-06 23:22:22 +01:00
Samuel Thibault 44bb61c8d9 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>
2010-03-06 23:15:30 +01:00
Paolo Bonzini 9d0706e44a 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>
2010-03-06 23:09:28 +01:00
Stefan Weil 01668d98a3 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>
2010-03-06 23:07:09 +01:00
Christoph Hellwig 99aba0c41b scsi: update comment on the standards revision
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 23:05:59 +01:00
Ryota Ozaki bba7be962e 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>
2010-03-06 23:03:50 +01:00
Kevin Wolf 7b23447571 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>
2010-03-06 23:02:47 +01:00
Amit Shah 21be440c6a 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>
2010-03-06 22:56:54 +01:00
Amit Shah 977b6b91ce 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>
2010-03-06 22:56:53 +01:00
Amit Shah ad509737f8 s390-virtio: Fix compile error for virtio-block init
Commit 428c149b0b 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>
2010-03-06 22:55:18 +01:00
Kevin Wolf d758d90fe1 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>
2010-03-06 22:32:54 +01:00
Aurelien Jarno cdee7bdfee 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 71e605f803.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 22:28:07 +01:00
Aurelien Jarno 2f4f22bd44 hw/serial.c: fix indentation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-06 20:23:09 +01:00
takasi-y@ops.dti.ne.jp d871443692 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>
2010-03-06 19:37:05 +01:00
takasi-y@ops.dti.ne.jp 597c0212a7 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>
2010-03-06 19:35:18 +01:00
malc 41b1e61f51 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>
2010-03-06 19:20:04 +01:00
Aurelien Jarno c22549204a 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>
2010-03-06 18:33:53 +01:00
Anthony Liguori a0acb46c72 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>
2010-03-05 21:45:16 -06:00
Stefan Weil 5309e5fbbe Makefile: Fix names of GPXE ROM files
da51e79b7f 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>
2010-03-04 14:54:53 -06:00
Aurelien Jarno deb4203dc9 target-mips: use newer logical ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-03-04 17:42:03 +01:00
Anthony Liguori f374e826e3 Merge remote branch 'qemu-kvm/uq/master' into pulls 2010-03-04 09:14:24 -06:00
Jan Kiszka 6cb2996cef 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>
2010-03-04 00:29:32 -03:00
Jan Kiszka ea64305139 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>
2010-03-04 00:29:30 -03:00
Jan Kiszka ea375f9ab8 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>
2010-03-04 00:29:28 -03:00
Jan Kiszka b0b1d69079 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>
2010-03-04 00:29:26 -03:00
Marcelo Tosatti c902760fb2 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>
2010-03-04 00:28:47 -03:00
Avi Kivity 60e4c6317b 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>
2010-03-04 00:28:41 -03:00
Stefan Weil 78728c92a4 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>
2010-03-03 13:47:53 +02:00
Stefan Weil e7493b25c0 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>
2010-03-03 13:47:45 +02:00
Stefan Weil f80a7fc34e 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>
2010-03-03 13:44:32 +02:00
Stefan Weil 3d0f4b9bb5 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>
2010-03-03 13:44:20 +02:00
Stefan Weil ec1d02d8de 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>
2010-03-03 13:34:19 +02:00
Stefan Weil cc02c66cc8 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>
2010-03-03 13:34:17 +02:00
Stefan Weil cb25a3fb60 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>
2010-03-03 13:34:10 +02:00
Stefan Weil e824012bc2 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>
2010-03-03 13:34:07 +02:00
Stefan Weil e715c8e84c 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>
2010-03-03 13:34:06 +02:00
Stefan Weil b1e87018f2 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>
2010-03-03 13:34:04 +02:00
Stefan Weil c5bac30252 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>
2010-03-03 13:34:02 +02:00
Stefan Weil ced5296ab7 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>
2010-03-03 13:34:01 +02:00
Stefan Weil 762401e2f8 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>
2010-03-03 13:33:59 +02:00
Stefan Weil 230a167c29 eepro100: Update copyright notice
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:57 +02:00
Stefan Weil ba19f2dea5 eepro100: Add TODO list
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-03-03 13:33:55 +02:00
Stefan Weil da51e79b7f 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>
2010-03-03 13:33:52 +02:00
Stefan Weil 6cded3a43a 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>
2010-03-03 13:33:50 +02:00
Stefan Weil 0908bba157 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>
2010-03-03 13:33:48 +02:00
Stefan Weil ce0e58b394 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>
2010-03-03 13:33:46 +02:00
Samuel Thibault 55b1e61f64 (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>
2010-03-03 00:20:11 +01:00
Samuel Thibault 942cef3799 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>
2010-03-03 00:20:06 +01:00