]> git.proxmox.com Git - qemu.git/log
qemu.git
11 years agoMerge remote-tracking branch 'stefanha/block' into staging
Anthony Liguori [Mon, 15 Apr 2013 13:02:41 +0000 (08:02 -0500)]
Merge remote-tracking branch 'stefanha/block' into staging

* stefanha/block:
  rbd: add an asynchronous flush
  iotests: Add 'check -ssh' option to test Secure Shell block device.
  block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
  block: Add support for Secure Shell (ssh) block device.
  ide: refuse WIN_READ_NATIVE_MAX on empty device
  qemu-iotests: filter QEMU_PROG in 051.out
  qemu-iotests: Add test for -drive options
  qemu-iotests: A few more bdrv_pread/pwrite tests
  block: Introduce bdrv_pwritev() for qcow2_save_vmstate
  savevm: Implement block_writev_buffer()
  block: Introduce bdrv_writev_vmstate

Conflicts:
savevm.c

aliguori: add f->pos parameter to writev_buffer().

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'luiz/queue/qmp' into staging
Anthony Liguori [Mon, 15 Apr 2013 12:49:21 +0000 (07:49 -0500)]
Merge remote-tracking branch 'luiz/queue/qmp' into staging

# By Michal Novotny (2) and Eric Blake (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
  qapi: use valid JSON in schema
  Revert "New QMP command query-cpu-max and HMP command cpu_max"
  New cpu-max field in query-machines QMP command output

Message-id: 1365775103-18737-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'quintela/migration.next' into staging
Anthony Liguori [Mon, 15 Apr 2013 12:46:39 +0000 (07:46 -0500)]
Merge remote-tracking branch 'quintela/migration.next' into staging

# By Paolo Bonzini
# Via Juan Quintela
* quintela/migration.next:
  migration: simplify writev vs. non-writev logic
  migration: drop is_write complications
  migration: use a single I/O operation when writev_buffer is not defined
  migration: set f->is_write and flush in add_to_iovec

Message-id: 1365512961-15623-1-git-send-email-quintela@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agorbd: add an asynchronous flush
Josh Durgin [Fri, 29 Mar 2013 20:03:23 +0000 (13:03 -0700)]
rbd: add an asynchronous flush

The existing bdrv_co_flush_to_disk implementation uses rbd_flush(),
which is sychronous and causes the main qemu thread to block until it
is complete. This results in unresponsiveness and extra latency for
the guest.

Fix this by using an asynchronous version of flush.  This was added to
librbd with a special #define to indicate its presence, since it will
be backported to stable versions. Thus, there is no need to check the
version of librbd.

Implement this as bdrv_aio_flush, since it matches other aio functions
in the rbd block driver, and leave out bdrv_co_flush_to_disk when the
asynchronous version is available.

Reported-by: Oliver Francke <oliver@filoo.de>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoiotests: Add 'check -ssh' option to test Secure Shell block device.
Richard W.M. Jones [Tue, 9 Apr 2013 14:30:55 +0000 (15:30 +0100)]
iotests: Add 'check -ssh' option to test Secure Shell block device.

Note in order to run these tests on ssh, you must be running a local
ssh daemon, and that daemon must accept loopback connections, and
ssh-agent has to be set up to allow logins on the local daemon.  In
other words, the following command should just work without demanding
any passphrase:

 ssh localhost

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoblock: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.
Richard W.M. Jones [Tue, 9 Apr 2013 14:30:54 +0000 (15:30 +0100)]
block: ssh: Use libssh2_sftp_fsync (if supported by libssh2) to flush to disk.

libssh2_sftp_fsync is an extension to libssh2 to support fsync(2) over
sftp, which is itself an extension of OpenSSH.

If both libssh2 and the ssh daemon support it, this will allow
bdrv_flush_to_disk to commit changes through to disk on the remote
server.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoblock: Add support for Secure Shell (ssh) block device.
Richard W.M. Jones [Tue, 9 Apr 2013 14:30:53 +0000 (15:30 +0100)]
block: Add support for Secure Shell (ssh) block device.

  qemu-system-x86_64 -drive file=ssh://hostname/some/image

QEMU will ssh into 'hostname' and open '/some/image' which is made
available as a standard block device.

You can specify a username (ssh://user@host/...) and/or a port number
(ssh://host:port/...).  You can also use an alternate syntax using
properties (file.user, file.host, file.port, file.path).

Current limitations:

- Authentication must be done without passwords or passphrases, using
  ssh-agent.  Other authentication methods are not supported.

- Uses a single connection, instead of concurrent AIO with multiple
  SSH connections.

This is implemented using libssh2 on the client side.  The server just
requires a regular ssh daemon with sftp-server support.  Most ssh
daemons on Unix/Linux systems will work out of the box.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoide: refuse WIN_READ_NATIVE_MAX on empty device
Stefan Hajnoczi [Fri, 5 Apr 2013 09:51:01 +0000 (11:51 +0200)]
ide: refuse WIN_READ_NATIVE_MAX on empty device

What is the highest addressable sector on an empty CD-ROM?  Nothing is
addressable so produce an error.

This patch prevents a divide-by-zero in ide_set_sector() since
s->sectors and s->heads would be 0.  Not to mention that a sector=-1
argument would be nonsense.

Note that WIN_READ_NATIVE_MAX can be triggered using hdparm -N 1024
/dev/cdrom.  The LBA bit will be set to 1 though, so the only easy way
to go down the ide_set_sector() CHS code path which divides by zero is
to comment out the s->select & 0x40 case for testing.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
11 years agoqemu-iotests: filter QEMU_PROG in 051.out
Stefan Hajnoczi [Mon, 15 Apr 2013 08:15:17 +0000 (10:15 +0200)]
qemu-iotests: filter QEMU_PROG in 051.out

Filter the name of the QEMU executable so the output can be diffed no
matter what QEMU_PROG is (e.g. qemu-system-x86_64).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoqemu-iotests: Add test for -drive options
Kevin Wolf [Tue, 9 Apr 2013 13:56:13 +0000 (15:56 +0200)]
qemu-iotests: Add test for -drive options

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoqemu-iotests: A few more bdrv_pread/pwrite tests
Kevin Wolf [Fri, 5 Apr 2013 19:27:56 +0000 (21:27 +0200)]
qemu-iotests: A few more bdrv_pread/pwrite tests

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoblock: Introduce bdrv_pwritev() for qcow2_save_vmstate
Kevin Wolf [Fri, 5 Apr 2013 19:27:55 +0000 (21:27 +0200)]
block: Introduce bdrv_pwritev() for qcow2_save_vmstate

Directly pass the QEMUIOVector on instead of linearising it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agosavevm: Implement block_writev_buffer()
Kevin Wolf [Fri, 5 Apr 2013 19:27:54 +0000 (21:27 +0200)]
savevm: Implement block_writev_buffer()

Instead of breaking up RAM state into many small chunks, pass the iovec
to the block layer for better performance.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoblock: Introduce bdrv_writev_vmstate
Kevin Wolf [Fri, 5 Apr 2013 19:27:53 +0000 (21:27 +0200)]
block: Introduce bdrv_writev_vmstate

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoqjson: to_json() case QTYPE_QSTRING is buggy, rewrite
Markus Armbruster [Thu, 11 Apr 2013 16:07:21 +0000 (18:07 +0200)]
qjson: to_json() case QTYPE_QSTRING is buggy, rewrite

Known bugs in to_json():

* A start byte for a three-byte sequence followed by less than two
  continuation bytes is split into one-byte sequences.

* Start bytes for sequences longer than three bytes get misinterpreted
  as start bytes for three-byte sequences.  Continuation bytes beyond
  byte three become one-byte sequences.

  This means all characters outside the BMP are decoded incorrectly.

* One-byte sequences with the MSB are put into the JSON string
  verbatim when char is unsigned, producing invalid UTF-8.  When char
  is signed, they're replaced by "\\uFFFF" instead.

  This includes \xFE, \xFF, and stray continuation bytes.

* Overlong sequences are happily accepted, unless screwed up by the
  bugs above.

* Likewise, sequences encoding surrogate code points or noncharacters.

* Unlike other control characters, ASCII DEL is not escaped.  Except
  in overlong encodings.

My rewrite fixes them as follows:

* Malformed UTF-8 sequences are replaced.

  Except the overlong encoding \xC0\x80 of U+0000 is still accepted.
  Permits embedding NUL characters in C strings.  This trick is known
  as "Modified UTF-8".

* Sequences encoding code points beyond Unicode range are replaced.

* Sequences encoding code points beyond the BMP produce a surrogate
  pair.

* Sequences encoding surrogate code points are replaced.

* Sequences encoding noncharacters are replaced.

* ASCII DEL is now always escaped.

The replacement character is U+FFFD.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agocheck-qjson: Test noncharacters other than U+FFFE, U+FFFF in strings
Markus Armbruster [Thu, 11 Apr 2013 16:07:20 +0000 (18:07 +0200)]
check-qjson: Test noncharacters other than U+FFFE, U+FFFF in strings

Test cases cover the two noncharacters in the BMP.  Add tests for the
other 64 noncharacters.

Three existing test cases involve noncharacters U+FFFF and U+10FFFF.
Instead of deleting them as now duplicates, adjust them to use U+FFFC
and U+10FFFFD.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agocheck-qjson: Improve a few comments, delete bogus ones
Markus Armbruster [Thu, 11 Apr 2013 16:07:19 +0000 (18:07 +0200)]
check-qjson: Improve a few comments, delete bogus ones

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agounicode: New mod_utf8_codepoint()
Markus Armbruster [Thu, 11 Apr 2013 16:07:18 +0000 (18:07 +0200)]
unicode: New mod_utf8_codepoint()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoMerge branch 'mingw' of git://qemu.weilnetz.de/qemu
Aurelien Jarno [Sat, 13 Apr 2013 12:31:54 +0000 (14:31 +0200)]
Merge branch 'mingw' of git://qemu.weilnetz.de/qemu

* 'mingw' of git://qemu.weilnetz.de/qemu:
  qemu-timer: move timeBeginPeriod/timeEndPeriod to os-win32
  Release SMP restriction on Windows
  Ensure good ordering of memory instruction in cpu_exec
  Check effective suspension of TCG thread

11 years agotarget-i386: add AES-NI instructions
Aurelien Jarno [Sun, 31 Mar 2013 10:58:31 +0000 (12:58 +0200)]
target-i386: add AES-NI instructions

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoaes: make Td[0-5] and Te[0-5] tables non static
Aurelien Jarno [Sun, 31 Mar 2013 10:58:31 +0000 (12:58 +0200)]
aes: make Td[0-5] and Te[0-5] tables non static

Remove static attribute to Td[0-5] and Te[0-5] tables so that they
can be used outside of aes.c. Change their type from u32 to uint32_t,
to keep the u32 udef local to aes.c. Prefix them with AES_ so that they
do not conflict with other symbols.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoaes: move aes.h from include/block to include/qemu
Aurelien Jarno [Sun, 31 Mar 2013 10:58:30 +0000 (12:58 +0200)]
aes: move aes.h from include/block to include/qemu

Move aes.h from include/block to include/qemu to show it can be reused
by other subsystems.

Cc: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agodisas/i386.c: disassemble aes-ni instructions
Aurelien Jarno [Sun, 31 Mar 2013 10:58:30 +0000 (12:58 +0200)]
disas/i386.c: disassemble aes-ni instructions

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agotarget-i386: enable PCLMULQDQ on Westmere CPU
Aurelien Jarno [Sun, 31 Mar 2013 10:58:30 +0000 (12:58 +0200)]
target-i386: enable PCLMULQDQ on Westmere CPU

The PCLMULQDQ instruction has been introduced on the Westmere CPU.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agotarget-i386: add pclmulqdq instruction
Aurelien Jarno [Sun, 31 Mar 2013 10:58:30 +0000 (12:58 +0200)]
target-i386: add pclmulqdq instruction

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agodisas/i386.c: disassemble pclmulqdq instruction
Aurelien Jarno [Sun, 31 Mar 2013 10:58:30 +0000 (12:58 +0200)]
disas/i386.c: disassemble pclmulqdq instruction

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agosh7750: Change cpu field type to SuperHCPU
Andreas Färber [Tue, 9 Apr 2013 14:51:24 +0000 (16:51 +0200)]
sh7750: Change cpu field type to SuperHCPU

This brings us a step closer to QOM'ified SH7750 SoC and
fixes b350ab75 (target-sh4: Move PVR/PRR/CVR into SuperHCPUClass)
assuming SuperHCPU type for SUPERH_CPU_GET_CLASS().

Fix Coding Style issues while at it (indentation, braces).

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoshix: Catch CPU initialization errors
Andreas Färber [Tue, 9 Apr 2013 14:51:23 +0000 (16:51 +0200)]
shix: Catch CPU initialization errors

Print an error message as done for the r2d machine and exit.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoMerge branch 'trivial-patches' of git://github.com/stefanha/qemu
Aurelien Jarno [Sat, 13 Apr 2013 11:50:34 +0000 (13:50 +0200)]
Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

* 'trivial-patches' of git://github.com/stefanha/qemu:
  cpu-exec: Allow "-d exec" in non-debug builds (drop CONFIG_DEBUG_EXEC)
  Typo, spelling and grammatical fixes
  linux-user: pass correct host flags to eventfd2 call
  target-moxie: Fix VMState registration

11 years agoMerge branch 'tci' of git://qemu.weilnetz.de/qemu
Aurelien Jarno [Sat, 13 Apr 2013 11:50:06 +0000 (13:50 +0200)]
Merge branch 'tci' of git://qemu.weilnetz.de/qemu

* 'tci' of git://qemu.weilnetz.de/qemu:
  tci: Make tcg temporaries local to tcg_qemu_tb_exec
  tci: Delete unused tb_ret_addr
  tci: Avoid code before declarations
  tci: Use a local variable for env
  tci: Use 32-bit signed offsets to loads/stores

11 years agoMerge branch 'tcg-s390' of git://github.com/rth7680/qemu
Aurelien Jarno [Sat, 13 Apr 2013 11:49:20 +0000 (13:49 +0200)]
Merge branch 'tcg-s390' of git://github.com/rth7680/qemu

* 'tcg-s390' of git://github.com/rth7680/qemu:
  tcg-s390: Fix merge error in tgen_brcond
  tcg-s390: Use all 20 bits of the offset in tcg_out_mem
  tcg-s390: Use load-address for addition
  tcg-s390: Cleanup argument shuffling fixme in softmmu code
  tcg-s390: Use risbgz for andi
  tcg-s390: Remove constraint letters for and
  tcg-s390: Implement deposit opcodes
  tcg-s390: Implement movcond opcodes
  tcg-s390: Implement mulu2_i64 opcode
  tcg-s390: Implement add2/sub2 opcodes
  tcg-s390: Remove useless preprocessor conditions
  tcg-s390: Properly allocate a stack frame.
  tcg-s390: Fix movi

11 years agoqemu-timer: move timeBeginPeriod/timeEndPeriod to os-win32
Paolo Bonzini [Wed, 20 Feb 2013 13:43:31 +0000 (14:43 +0100)]
qemu-timer: move timeBeginPeriod/timeEndPeriod to os-win32

These are needed for any of the Win32 alarm timer implementations.
They are not tied to mmtimer exclusively.

Jacob tested this patch with both mmtimer and Win32 timers.

Cc: qemu-stable@nongnu.org
Tested-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
11 years agoRelease SMP restriction on Windows
Fabien Chouteau [Tue, 9 Apr 2013 16:06:55 +0000 (18:06 +0200)]
Release SMP restriction on Windows

The previous patches make QEMU SMP safe on Windows, we can now release
the restriction.

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
11 years agoEnsure good ordering of memory instruction in cpu_exec
Olivier Hainque [Tue, 9 Apr 2013 16:06:54 +0000 (18:06 +0200)]
Ensure good ordering of memory instruction in cpu_exec

The IO thread, when it senses cpu_single_env == 0, expects exit_request
to be checked later on. A compiler scheduling constraint is not strong
enough to ensure this on modern architecture. A memory fence is needed
as well.

Signed-off-by: Olivier Hainque <hainque@adacore.com>
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
11 years agoCheck effective suspension of TCG thread
Olivier Hainque [Tue, 9 Apr 2013 16:06:53 +0000 (18:06 +0200)]
Check effective suspension of TCG thread

On multi-core systems, SuspendThread does not guaranty immediate thread
suspension. We add busy loop to wait for effective thread suspension
after call to ThreadSuspend().

Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
11 years agoqapi: use valid JSON in schema
Eric Blake [Wed, 10 Apr 2013 19:12:44 +0000 (13:12 -0600)]
qapi: use valid JSON in schema

* qapi-schema.json: JSON doesn't allow trailing commas.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
11 years agoRevert "New QMP command query-cpu-max and HMP command cpu_max"
Michal Novotny [Tue, 9 Apr 2013 14:23:39 +0000 (16:23 +0200)]
Revert "New QMP command query-cpu-max and HMP command cpu_max"

This reverts commit 4d700430a20b3d53b7b15bc5f6666f7e570e3f2c as asked by
Luiz. The patch has been obsoleted by extending MachineInfo structure
by cpu-max field.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
11 years agoNew cpu-max field in query-machines QMP command output
Michal Novotny [Mon, 8 Apr 2013 16:21:02 +0000 (18:21 +0200)]
New cpu-max field in query-machines QMP command output

Alter the query-machines QMP command to output information about
maximum number of CPUs for each machine type with default value
set to 1 in case the number of max_cpus is not set.

Signed-off-by: Michal Novotny <minovotn@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
11 years agocpu-exec: Allow "-d exec" in non-debug builds (drop CONFIG_DEBUG_EXEC)
Peter Maydell [Thu, 11 Apr 2013 20:21:46 +0000 (21:21 +0100)]
cpu-exec: Allow "-d exec" in non-debug builds (drop CONFIG_DEBUG_EXEC)

The CONFIG_DEBUG_EXEC define compiles out a single qemu_log_mask()
call, which is a pretty trivial cost even for something in the main
cpu_exec() loop.  Having this be conditionally defined means that
'-d exec' on a non-debug build will silently do nothing.  Drop the
define and the configure machinery that sets it, in favour of just
always allowing this log option to be enabled at runtime.  As a
concession to the mainloopiness, we use qemu_loglevel_mask()+qemu_log()
rather than qemu_log_mask() to avoid the function call overhead.

Note that DEBUG_DISAS is always defined, so removing the
'|| defined(CONFIG_DEBUG_EXEC)' from those conditionals makes
no behavioural change for that logging.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoTypo, spelling and grammatical fixes
Peter Maydell [Tue, 9 Apr 2013 11:48:19 +0000 (12:48 +0100)]
Typo, spelling and grammatical fixes

Minor fixes to documentation and code comments.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agolinux-user: pass correct host flags to eventfd2 call
Petar Jovanovic [Mon, 8 Apr 2013 18:26:10 +0000 (20:26 +0200)]
linux-user: pass correct host flags to eventfd2 call

This change makes conversion of TARGET_O_NONBLOCK and TARGET_O_CLOEXEC flags
to host flags before calling eventfd for TARGET_NR_eventfd2.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotarget-moxie: Fix VMState registration
Peter Maydell [Mon, 8 Apr 2013 15:51:46 +0000 (16:51 +0100)]
target-moxie: Fix VMState registration

Register the CPU VMState in the correct way, via cpu_class_set_vmsd(),
rather than doing it in two different wrong ways (once by providing
cpu_save and cpu_load functions, and once by setting the vmsd field in
DeviceClass).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agotci: Make tcg temporaries local to tcg_qemu_tb_exec
Richard Henderson [Thu, 28 Mar 2013 05:37:55 +0000 (05:37 +0000)]
tci: Make tcg temporaries local to tcg_qemu_tb_exec

We're moving away from the temporaries stored in env.  Make sure we can
differentiate between temp stores and possibly bogus stores for extra
call arguments.  Move TCG_AREG0 and TCG_REG_CALL_STACK out of the way
of the parameter passing registers.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off by: Stefan Weil <sw@weilnetz.de>

11 years agotci: Delete unused tb_ret_addr
Richard Henderson [Thu, 28 Mar 2013 05:37:54 +0000 (05:37 +0000)]
tci: Delete unused tb_ret_addr

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off by: Stefan Weil <sw@weilnetz.de>

11 years agotci: Avoid code before declarations
Richard Henderson [Thu, 28 Mar 2013 05:37:53 +0000 (05:37 +0000)]
tci: Avoid code before declarations

This only valid with c99 extensions enabled, and easy to avoid.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off by: Stefan Weil <sw@weilnetz.de>

11 years agotci: Use a local variable for env
Richard Henderson [Thu, 28 Mar 2013 05:37:52 +0000 (05:37 +0000)]
tci: Use a local variable for env

Since we have total conversion away from global AREG0, we do not
need a global variable named "env".  Retain that name as the
function parameter inside the interpreter.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off by: Stefan Weil <sw@weilnetz.de>

11 years agotci: Use 32-bit signed offsets to loads/stores
Richard Henderson [Thu, 28 Mar 2013 05:37:51 +0000 (05:37 +0000)]
tci: Use 32-bit signed offsets to loads/stores

Since the change to tcg_exit_req, the first insn of every TB is
a load with a negative offset from env.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off by: Stefan Weil <sw@weilnetz.de>

11 years agomigration: simplify writev vs. non-writev logic
Paolo Bonzini [Mon, 8 Apr 2013 11:29:57 +0000 (13:29 +0200)]
migration: simplify writev vs. non-writev logic

Check f->iovcnt in add_to_iovec, f->buf_index in qemu_put_buffer/byte.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
11 years agomigration: drop is_write complications
Paolo Bonzini [Mon, 8 Apr 2013 11:29:56 +0000 (13:29 +0200)]
migration: drop is_write complications

The same QEMUFile is never used for both read and write.  Simplify
the logic to simply look for presence or absence of the right ops.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
11 years agomigration: use a single I/O operation when writev_buffer is not defined
Paolo Bonzini [Mon, 8 Apr 2013 11:29:55 +0000 (13:29 +0200)]
migration: use a single I/O operation when writev_buffer is not defined

The recent patches to use vectored I/O for RAM migration caused a
regression in savevm speed.  To restore previous performance,
add data to the buffer in qemu_put_buffer_async whenever writev_buffer
is not available in the QEMUFile.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
11 years agomigration: set f->is_write and flush in add_to_iovec
Paolo Bonzini [Mon, 8 Apr 2013 11:29:54 +0000 (13:29 +0200)]
migration: set f->is_write and flush in add_to_iovec

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
11 years agovirtio-9p: Fix virtio-9p no longer building after hw-dirs branch merge
Hans de Goede [Tue, 9 Apr 2013 08:22:35 +0000 (10:22 +0200)]
virtio-9p: Fix virtio-9p no longer building after hw-dirs branch merge

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Message-id: 1365495755-10902-1-git-send-email-hdegoede@redhat.com
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'bonzini/hw-dirs' into staging
Anthony Liguori [Mon, 8 Apr 2013 18:12:32 +0000 (13:12 -0500)]
Merge remote-tracking branch 'bonzini/hw-dirs' into staging

# By Paolo Bonzini
# Via Paolo Bonzini
* bonzini/hw-dirs: (35 commits)
  hw: move private headers to hw/ subdirectories.
  MAINTAINERS: update for source code movement
  hw: move last file to hw/arm/
  hw: move hw/kvm/ to hw/i386/kvm
  hw: move ARM CPU cores to hw/cpu/, configure with default-configs/
  hw: move other devices to hw/misc/, configure with default-configs/
  hw: move NVRAM interfaces to hw/nvram/, configure with default-configs/
  hw: move GPIO interfaces to hw/gpio/, configure with default-configs/
  hw: move interrupt controllers to hw/intc/, configure with default-configs/
  hw: move DMA controllers to hw/dma/, configure with default-configs/
  hw: move VFIO and ivshmem to hw/misc/
  hw: move PCI bridges to hw/pci-* or hw/ARCH
  hw: move SD/MMC devices to hw/sd/, configure with default-configs/
  hw: move timer devices to hw/timer/, configure with default-configs/
  hw: move ISA bridges and devices to hw/isa/, configure with default-configs/
  hw: move char devices to hw/char/, configure via default-configs/
  hw: move more files to hw/xen/
  hw: move SCSI controllers to hw/scsi/, configure via default-configs/
  hw: move SSI controllers to hw/ssi/, configure via default-configs/
  hw: move I2C controllers to hw/i2c/, configure via default-configs/
  ...

Message-id: 1365442249-18259-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'stefanha/net' into staging
Anthony Liguori [Mon, 8 Apr 2013 18:12:25 +0000 (13:12 -0500)]
Merge remote-tracking branch 'stefanha/net' into staging

# By Dmitry Fleytman
# Via Stefan Hajnoczi
* stefanha/net:
  vmxnet3: const_cpu_to_le64 wrapping for feature bits dropped
  vmxnet3: iPXE compatibility fixes

Message-id: 1365435829-23535-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agohw: move private headers to hw/ subdirectories.
Paolo Bonzini [Mon, 18 Mar 2013 16:36:02 +0000 (17:36 +0100)]
hw: move private headers to hw/ subdirectories.

Many headers are used only in a single directory.  These can be
kept in hw/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoMAINTAINERS: update for source code movement
Paolo Bonzini [Mon, 4 Feb 2013 14:19:30 +0000 (15:19 +0100)]
MAINTAINERS: update for source code movement

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move last file to hw/arm/
Paolo Bonzini [Wed, 27 Mar 2013 17:49:23 +0000 (18:49 +0100)]
hw: move last file to hw/arm/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move hw/kvm/ to hw/i386/kvm
Paolo Bonzini [Tue, 5 Feb 2013 15:36:44 +0000 (16:36 +0100)]
hw: move hw/kvm/ to hw/i386/kvm

Peter requested the KVM GIC to be in hw/intc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move ARM CPU cores to hw/cpu/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 15:36:44 +0000 (16:36 +0100)]
hw: move ARM CPU cores to hw/cpu/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move other devices to hw/misc/, configure with default-configs/
Paolo Bonzini [Wed, 3 Apr 2013 16:06:08 +0000 (18:06 +0200)]
hw: move other devices to hw/misc/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move NVRAM interfaces to hw/nvram/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 15:36:44 +0000 (16:36 +0100)]
hw: move NVRAM interfaces to hw/nvram/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move GPIO interfaces to hw/gpio/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 15:36:44 +0000 (16:36 +0100)]
hw: move GPIO interfaces to hw/gpio/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move interrupt controllers to hw/intc/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 15:12:12 +0000 (16:12 +0100)]
hw: move interrupt controllers to hw/intc/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move DMA controllers to hw/dma/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 13:54:35 +0000 (14:54 +0100)]
hw: move DMA controllers to hw/dma/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move VFIO and ivshmem to hw/misc/
Paolo Bonzini [Tue, 5 Feb 2013 14:41:36 +0000 (15:41 +0100)]
hw: move VFIO and ivshmem to hw/misc/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move PCI bridges to hw/pci-* or hw/ARCH
Paolo Bonzini [Tue, 5 Feb 2013 14:06:20 +0000 (15:06 +0100)]
hw: move PCI bridges to hw/pci-* or hw/ARCH

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move SD/MMC devices to hw/sd/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 13:54:35 +0000 (14:54 +0100)]
hw: move SD/MMC devices to hw/sd/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move timer devices to hw/timer/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 13:38:25 +0000 (14:38 +0100)]
hw: move timer devices to hw/timer/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move ISA bridges and devices to hw/isa/, configure with default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 13:13:04 +0000 (14:13 +0100)]
hw: move ISA bridges and devices to hw/isa/, configure with default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move char devices to hw/char/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 12:35:34 +0000 (13:35 +0100)]
hw: move char devices to hw/char/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move more files to hw/xen/
Paolo Bonzini [Tue, 5 Feb 2013 12:25:08 +0000 (13:25 +0100)]
hw: move more files to hw/xen/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move SCSI controllers to hw/scsi/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 12:39:38 +0000 (13:39 +0100)]
hw: move SCSI controllers to hw/scsi/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move SSI controllers to hw/ssi/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 12:20:08 +0000 (13:20 +0100)]
hw: move SSI controllers to hw/ssi/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move I2C controllers to hw/i2c/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 12:07:03 +0000 (13:07 +0100)]
hw: move I2C controllers to hw/i2c/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move display devices to hw/display/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:59:04 +0000 (12:59 +0100)]
hw: move display devices to hw/display/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move audio devices to hw/audio/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:55:19 +0000 (12:55 +0100)]
hw: move audio devices to hw/audio/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move block devices to hw/block/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:55:04 +0000 (12:55 +0100)]
hw: move block devices to hw/block/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move NICs to hw/net/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:33:56 +0000 (12:33 +0100)]
hw: move NICs to hw/net/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move MC146818RTC to hw/timer/, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:30:44 +0000 (12:30 +0100)]
hw: move MC146818RTC to hw/timer/, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move watchdogs to hw/watchdog, configure via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:27:44 +0000 (12:27 +0100)]
hw: move watchdogs to hw/watchdog, configure via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: make all of hw/pci/ configurable via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 13:46:43 +0000 (14:46 +0100)]
hw: make all of hw/pci/ configurable via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: make all of hw/usb/ configurable via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:23:23 +0000 (12:23 +0100)]
hw: make all of hw/usb/ configurable via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: make all of hw/ide/ configurable via default-configs/
Paolo Bonzini [Tue, 5 Feb 2013 11:22:39 +0000 (12:22 +0100)]
hw: make all of hw/ide/ configurable via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move virtio devices to hw/ subdirectories
Paolo Bonzini [Tue, 5 Feb 2013 11:42:31 +0000 (12:42 +0100)]
hw: move virtio devices to hw/ subdirectories

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move target-independent files to subdirectories
Paolo Bonzini [Fri, 1 Mar 2013 12:59:19 +0000 (13:59 +0100)]
hw: move target-independent files to subdirectories

This patch tackles all files that are compiled once, moving
them to subdirectories of hw/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomoxie: configure with default-configs file
Paolo Bonzini [Wed, 27 Mar 2013 17:54:12 +0000 (18:54 +0100)]
moxie: configure with default-configs file

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: make subdirectories for devices
Paolo Bonzini [Mon, 4 Feb 2013 10:59:48 +0000 (11:59 +0100)]
hw: make subdirectories for devices

Prepare the new directory structure.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agohw: move headers to include/
Paolo Bonzini [Tue, 5 Feb 2013 16:06:20 +0000 (17:06 +0100)]
hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: enable using $(CONFIG_FOO) on the rhs of config files
Paolo Bonzini [Wed, 3 Apr 2013 15:53:21 +0000 (17:53 +0200)]
build: enable using $(CONFIG_FOO) on the rhs of config files

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoconfigure: Don't fall back to gthread coroutine backend
Peter Maydell [Mon, 8 Apr 2013 11:11:27 +0000 (12:11 +0100)]
configure: Don't fall back to gthread coroutine backend

The gthread coroutine backend is broken and does not produce a working
QEMU; it is only useful for some very limited debugging situations.
Clean up the backend selection logic in configure so that it now runs
"if on windows use windows; else prefer ucontext; else sigaltstack".

To do this we refactor the configure code to separate out "test
whether we have a working ucontext", "pick a default if user didn't
specify" and "validate that user didn't specify something invalid",
rather than having all three of these run together. We also simplify
the Makefile logic so it just links in the backend the configure
script selects.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1365419487-19867-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoconfigure: Provide and use convenience error reporting function
Peter Maydell [Mon, 8 Apr 2013 11:11:26 +0000 (12:11 +0100)]
configure: Provide and use convenience error reporting function

Provide a convenience function for reporting an error and exiting,
and update various places in the configure script to use it.
This allows us to be a little more consistent about how format
our error messages and makes the calling code shorter.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1365419487-19867-2-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoqemu-char: really fix behavior on can_read = 0
Paolo Bonzini [Mon, 8 Apr 2013 13:03:15 +0000 (15:03 +0200)]
qemu-char: really fix behavior on can_read = 0

I misread the glib manual, g_source_remove does not let you re-attach
the source later.  This behavior (called "blocking" the source in glib)
is present in glib's source code, but private and not available outside
glib; hence, we have to resort to re-creating the source every time.

In fact, g_source_remove and g_source_destroy are the same thing,
except g_source_destroy is O(1) while g_source_remove scans a potentially
very long list of GSources in the current main loop.  Ugh.  Better
use g_source_destroy explicitly, and leave "tags" to those dummies who
cannot track their pointers' lifetimes.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1365426195-12596-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'mdroth/qga-pull-4-2-13' into staging
Anthony Liguori [Mon, 8 Apr 2013 15:37:06 +0000 (10:37 -0500)]
Merge remote-tracking branch 'mdroth/qga-pull-4-2-13' into staging

# By Laszlo Ersek (2) and others
# Via Michael Roth
* mdroth/qga-pull-4-2-13:
  qemu-ga: ga_get_fd_handle(): abort if fd_counter overflows
  qga schema: document generic QERR_UNSUPPORTED
  qga schema: mark optional GuestLogicalProcessor.can-offline with #optional
  qga: add windows implementation for guest-set-time
  qga: add windows implementation for guest-get-time

11 years agoMerge remote-tracking branch 'kraxel/usb.79' into staging
Anthony Liguori [Mon, 8 Apr 2013 15:36:40 +0000 (10:36 -0500)]
Merge remote-tracking branch 'kraxel/usb.79' into staging

# By Gerd Hoffmann (7) and Hans de Goede (3)
# Via Gerd Hoffmann
* kraxel/usb.79:
  usb-tablet: Don't claim wakeup capability for USB-2 version
  usb: update docs for bus name change
  usb-hub: report status changes only once
  usb-hub: limit chain length
  xhci: zap unused name field
  xhci: remove unimplemented printfs
  xhci: remove leftover debug printf
  xhci: fix numintrs sanity checks
  usb-redir: Add flow control support
  usb-redir: Fix crash on migration with no client connected

11 years agovmxnet3: const_cpu_to_le64 wrapping for feature bits dropped
Dmitry Fleytman [Thu, 28 Mar 2013 08:53:30 +0000 (10:53 +0200)]
vmxnet3: const_cpu_to_le64 wrapping for feature bits dropped

Byte swap is redundant because shared memory reading functions
already swap bytes when required

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agovmxnet3: iPXE compatibility fixes
Dmitry Fleytman [Thu, 28 Mar 2013 08:53:29 +0000 (10:53 +0200)]
vmxnet3: iPXE compatibility fixes

iPXE vmxnet3 driver makes a few assumptions regarding device operation
that were missed during testing with Linux and Windows drivers.
This patch adds following logic:
  1. Additional GET commands processing added
  2. Max number of RX chunks should be set to 1 when driver passes 0
     via corresponding shared memory field
  3. Enforecement for max chunks number added

Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11 years agoMerge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
Blue Swirl [Sat, 6 Apr 2013 12:53:54 +0000 (12:53 +0000)]
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm

* 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm:
  hw/nand.c: Fix nand erase operation
  cadence_uart: Flush queued characters on reset
  pl330: Don't inhibit ES bits on INTEN
  pflash_cfi01: Implement migration support
  pflash_cfi01: Drop unused 'bypass' field
  hw/arm_gic_common: Use vmstate struct rather than save/load functions
  arm_gic: Fix sizes of state fields in preparation for vmstate support
  vmstate: Add support for two dimensional arrays
  hw/onenand.c: fix migration of dynamically allocated buffer "otp"
  hw/sd.c: fix migration of dynamically allocated buffer "buf"
  vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro
  hw/arm_mptimer: Save the timer state
  pl050: Don't send always-constant is_mouse field
  hw/arm/nseries: don't print to stdout or stderr

11 years agotcg-s390: Fix merge error in tgen_brcond
Richard Henderson [Fri, 5 Apr 2013 18:10:28 +0000 (14:10 -0400)]
tcg-s390: Fix merge error in tgen_brcond

When the TCG condition codes were re-organized last year,
we failed to update all of the "old-style" tests for unsigned.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-s390: Use all 20 bits of the offset in tcg_out_mem
Richard Henderson [Wed, 27 Mar 2013 18:37:42 +0000 (14:37 -0400)]
tcg-s390: Use all 20 bits of the offset in tcg_out_mem

This can save one insn, if the constant has any bits in 32-63 set,
but no bits in 21-31 set.  It never results in more insns.

Signed-off-by: Richard Henderson <rth@twiddle.net>
11 years agotcg-s390: Use load-address for addition
Richard Henderson [Wed, 27 Mar 2013 18:23:26 +0000 (14:23 -0400)]
tcg-s390: Use load-address for addition

Since we're always in 64-bit mode, load address performs a full
64-bit add.  Use that for 3-address addition, as well as for
larger constant addends when we lack extended-immediates facility.

Signed-off-by: Richard Henderson <rth@twiddle.net>