OSDN Git Service

qmiga/qemu.git
10 years agoMerge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging
Peter Maydell [Thu, 20 Feb 2014 13:05:47 +0000 (13:05 +0000)]
Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging

QOM infrastructure fixes and device conversions

* QTest cleanups and test cases for PCI NICs
* NAND fix for "info qtree"
* Cleanup and extension of QOM machine tests
* IndustryPack test cases and conversion to QOM realize
* I2C cleanups
* Cleanups of legacy qdev properties

# gpg: Signature made Mon 17 Feb 2014 22:15:37 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/qom-devices-for-peter: (49 commits)
  qtest: Include system headers before user headers
  qapi: Refine human printing of sizes
  qdev: Use QAPI type names for properties
  qdev: Add enum property types to QAPI schema
  block: Handle "rechs" and "large" translation options
  qdev: Remove hex8/32/64 property types
  qdev: Remove most legacy printers
  qdev: Use human mode in "info qtree"
  qapi: Add human mode to StringOutputVisitor
  qdev: Inline qdev_prop_parse()
  qdev: Legacy properties are just strings
  qdev: Legacy properties are now read-only
  qdev: Remove legacy parsers for hex8/32/64
  qdev: Sizes are now parsed by StringInputVisitor
  qapi: Add size parser to StringInputVisitor
  qtest: Don't segfault with invalid -qtest option
  ipack: Move IndustryPack out of hw/char/
  ipoctal232: QOM parent field cleanup
  ipack: QOM parent field cleanup for IPackDevice
  ipack: QOM parent field cleanup for IPackBus
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
Peter Maydell [Thu, 20 Feb 2014 12:04:02 +0000 (12:04 +0000)]
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging

* remotes/qmp-unstable/queue/qmp:
  monitor: Add object_add class argument completion.
  monitor: Add object_del id argument completion.
  monitor: Add device_add device argument completion.
  monitor: Add device_del id argument completion.
  qmp: expose list of supported character device backends
  Use error_is_set() only when necessary
  QMP: allow JSON dict arguments in qmp-shell
  hmp: migrate command (without -d) now blocks correctly

Conflicts:
blockdev.c

[PMM: resolved trivial conflict in blockdev.c]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoqtest: Include system headers before user headers
Stefan Hajnoczi [Sat, 8 Feb 2014 10:41:07 +0000 (11:41 +0100)]
qtest: Include system headers before user headers

It is dangerous to include user headers before system headers since user
macros can affect system headers.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agomonitor: Add object_add class argument completion.
Hani Benhabiles [Thu, 6 Feb 2014 22:30:13 +0000 (23:30 +0100)]
monitor: Add object_add class argument completion.

Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agomonitor: Add object_del id argument completion.
Hani Benhabiles [Thu, 6 Feb 2014 22:30:12 +0000 (23:30 +0100)]
monitor: Add object_del id argument completion.

Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agomonitor: Add device_add device argument completion.
Hani Benhabiles [Thu, 6 Feb 2014 22:30:11 +0000 (23:30 +0100)]
monitor: Add device_add device argument completion.

Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agomonitor: Add device_del id argument completion.
Hani Benhabiles [Thu, 6 Feb 2014 22:30:10 +0000 (23:30 +0100)]
monitor: Add device_del id argument completion.

Signed-off-by: Hani Benhabiles <hani@linux.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agoqmp: expose list of supported character device backends
Martin Kletzander [Sat, 1 Feb 2014 11:52:42 +0000 (12:52 +0100)]
qmp: expose list of supported character device backends

Introduce 'query-chardev-backends' QMP command which lists all
supported character device backends.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agoUse error_is_set() only when necessary
Markus Armbruster [Thu, 30 Jan 2014 14:07:28 +0000 (15:07 +0100)]
Use error_is_set() only when necessary

error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out.  Unnecessarily hard for
optimizers, static checkers, and human readers.  Dumb it down to
obvious.

Gets rid of several dozen Coverity false positives.

Note that the obvious form is already used in many places.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agoQMP: allow JSON dict arguments in qmp-shell
Stefan Hajnoczi [Wed, 29 Jan 2014 11:17:31 +0000 (12:17 +0100)]
QMP: allow JSON dict arguments in qmp-shell

qmp-shell hides the QMP wire protocol JSON encoding from the user.  Most
of the time this is helpful and makes the command-line human-friendly.

Some QMP commands take a dict as an argument.  In order to express this
we need to revert back to JSON notation.

This patch allows JSON dict arguments in qmp-shell so commands like
blockdev-add and nbd-server-start can be invoked:

  (QEMU) blockdev-add options={"driver":"file","id":"drive1",...}

Note that spaces are not allowed since str.split() is used to break up
the command-line arguments first.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agohmp: migrate command (without -d) now blocks correctly
Soramichi AKIYAMA [Mon, 27 Jan 2014 10:46:11 +0000 (19:46 +0900)]
hmp: migrate command (without -d) now blocks correctly

This patch fixes a timing issue that migrate command (without -d) does not
block in some cases.

The original version of hmp.c:hmp_migrate_status_cb checks if the
migration status is 'active' or not to detect the completion of a migration.

However, if this function is executed when the migration status is stil
'setup' (the status before 'active'), migration command returns
immediately even if the user does not specify -d option.

Signed-off-by: Soramichi Akiyama <akiyama@nii.ac.jp>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
10 years agoFix QEMU build on OpenBSD on x86 archs
Brad [Wed, 11 Dec 2013 00:49:08 +0000 (19:49 -0500)]
Fix QEMU build on OpenBSD on x86 archs

This resolves the build issue with building the ROMs on OpenBSD on x86 archs.
As of OpenBSD 5.3 the compiler builds PIE binaries by default and thus the
whole OS/packages and so forth. The ROMs need to have PIE disabled.
Check in configure whether the compiler supports the flags for disabling
PIE, and if it does then use them for building the ROMs. This fixes the
following buildbot failure:

>From the OpenBSD buildbots..
  Building optionrom/multiboot.img
ld: multiboot.o: relocation R_X86_64_16 can not be used when making a shared object; recompile with -fPIC

Signed-off by: Brad Smith <brad@comstyle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agolibvixl: fix 64bit constants usage
Michael Tokarev [Sat, 15 Feb 2014 20:26:25 +0000 (20:26 +0000)]
libvixl: fix 64bit constants usage

Since commit 999b53ec8794f203964db3ecf939a3da5c4bc843:
 Author: Claudio Fontana <claudio.fontana@linaro.org>
 Date:   Wed Feb 5 17:27:28 2014 +0000

    disas: Implement disassembly output for A64

    Use libvixl to implement disassembly output in debug
    logs for A64, for use with both AArch64 hosts and targets.

disas/libvixl/ contains functions which uses 64bit constants
without using appropriate suffixes, which fails on 32bits.

Fix this by using ULL suffix.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' into staging
Peter Maydell [Sat, 15 Feb 2014 16:36:40 +0000 (16:36 +0000)]
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' into staging

trivial patches for 2014-02-15

# gpg: Signature made Sat 15 Feb 2014 12:10:46 GMT using RSA key ID 74F0C838
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: E190 8639 3B10 B51B AC2C  8B73 5253 C5AD 74F0 C838

* remotes/mjt/tags/trivial-patches-2014-02-15:
  char/serial: Fix emptyness check
  gitignore: anchor all ignored names
  vl: trim includes
  vl: remove old, long-unused defines
  net: declare struct iovec in checksum.h to fix compiler warning
  linux-user: refactor do_socketcall()
  configure: add hints to a remedy for feature_not_found errors
  configure: add hint of libfdt to DTC dependency not found message
  sparc/leon3: Initialize stack pointer
  misc: Fix case Qemu -> QEMU

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Peter Maydell [Sat, 15 Feb 2014 16:15:52 +0000 (16:15 +0000)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Block pull request

# gpg: Signature made Fri 14 Feb 2014 17:26:30 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  block: Open by reference will try device then node_name.
  block: Relax bdrv_lookup_bs constraints.
  blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.
  block: mirror - use local_err to avoid NULL errp
  qemu-iotests: Don't run 005 on vmdk split formats
  block: qemu-iotests - add vhdx log replay tests for qemu-img
  block: qemu-iotests - fix test 070 (vhdx)
  block: Don't throw away errno via error_setg
  block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
  blockdev: Remove 'type' parameter from blockdev_init()
  sdhci: Drop unnecessary #include

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/jliu/or32-ld-st' into staging
Peter Maydell [Sat, 15 Feb 2014 15:20:08 +0000 (15:20 +0000)]
Merge remote-tracking branch 'remotes/jliu/or32-ld-st' into staging

* remotes/jliu/or32-ld-st:
  target-openrisc: Use new qemu_ld/st opcodes

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/jovanovic/mips-ufrp' into staging
Peter Maydell [Sat, 15 Feb 2014 15:07:00 +0000 (15:07 +0000)]
Merge remote-tracking branch 'remotes/jovanovic/mips-ufrp' into staging

* remotes/jovanovic/mips-ufrp:
  target-mips: add user-mode FR switch support for MIPS32r5
  target-mips: add support for CP0_Config5
  target-mips: add support for CP0_Config4
  target-mips: add CPU definition for MIPS32R5

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agochar/serial: Fix emptyness check
Peter Crosthwaite [Tue, 11 Feb 2014 06:49:35 +0000 (22:49 -0800)]
char/serial: Fix emptyness check

This was guarding against a full fifo rather than an empty fifo when
popping. Fix.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agogitignore: anchor all ignored names
Michael Tokarev [Tue, 11 Feb 2014 10:22:32 +0000 (14:22 +0400)]
gitignore: anchor all ignored names

by default, patterns/names in .gitignore are applied
recursively to all subdirectories.  So any name mentioned
in .gitignore is ignored in all subdirectores.  This is good
for, say. object files (*.o), but not good for particular
names which should be ignored only in one directory.  For
example, qemu-img.1 file is generated in the top directory,
and it should be ignored only there, not in some subdir.

At first, this might not matter much, but we have lots of
examples already where it actually does not help at all.
For example, top-level .gitignore ignores a file/dir named
"patches" (which is very questionable by itself), but it
is applied recursively, so git also ignores, for example,
debian/patches/ which should not be ignored.

So anchor all the names where appropriate.  .gitignore
should be cleaned up further, which will be addressed in
a subsequent patch.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agovl: trim includes
Michael Tokarev [Fri, 7 Feb 2014 08:26:14 +0000 (12:26 +0400)]
vl: trim includes

Over time, lots of stuff moved from vl.c into separate
files.  But include statements has never been cleaned,
and they continue to carry lots of anymore-unused stuff.

Remove includes which are not relevant for vl.c anymore.
Apparently there are more includes like this, because
many are included from qemu-common.h and the like, or,
for example, I don't see were we use win32-specific
stuff in vl.c (so that maybe #include <windows.h> might
be removed too).

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agovl: remove old, long-unused defines
Michael Tokarev [Fri, 7 Feb 2014 08:23:05 +0000 (12:23 +0400)]
vl: remove old, long-unused defines

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agonet: declare struct iovec in checksum.h to fix compiler warning
Michael Tokarev [Fri, 7 Feb 2014 08:22:18 +0000 (12:22 +0400)]
net: declare struct iovec in checksum.h to fix compiler warning

The checksum calculation header exports a function that refers to
struct iov defined in iov.h.  Without including the former, build
fails like this:

  In file included from hw/net/fsl_etsec/rings.c:24:0:
  include/net/checksum.h:51:31: error: ‘struct iovec’ declared inside parameter list [-Werror]
  include/net/checksum.h:51:31: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]

Mention struct iovec there.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agolinux-user: refactor do_socketcall()
Michael Tokarev [Fri, 17 Jan 2014 10:23:51 +0000 (14:23 +0400)]
linux-user: refactor do_socketcall()

Refactor do_socketcall() to do argument conversion/checking first,
according to a lookup table (which call has how many args) and
by calling the right function second with ready-to-go arguments.

This ensures that all arguments are handled as abi_long, according
to socketcall prototype, and simplifies argument handling alot too.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoconfigure: add hints to a remedy for feature_not_found errors
Stewart Smith [Fri, 24 Jan 2014 01:39:10 +0000 (12:39 +1100)]
configure: add hints to a remedy for feature_not_found errors

Modify feature_not_found to accept an optional second parameter to be
printed after the generic feature not found error.

Modify most calls to feature_not_found to provide hints as to the
packages that may be missing. The few calls remaining without a remedy
are ones I couldn't work out how to remedy myself.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoconfigure: add hint of libfdt to DTC dependency not found message
Stewart Smith [Fri, 24 Jan 2014 01:39:06 +0000 (12:39 +1100)]
configure: add hint of libfdt to DTC dependency not found message

Most distros package it as libfdt, and mentioning libfdt here makes it
much easier to find the package you're missing.

Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agosparc/leon3: Initialize stack pointer
Sebastian Huber [Mon, 3 Feb 2014 09:18:11 +0000 (10:18 +0100)]
sparc/leon3: Initialize stack pointer

A lot of real world LEON3 systems are shipped with the GRMON boot
loader.  This boot loader initializes the stack pointer with the end of
RAM address.  The application can use this to detect the RAM size of a
particular board variant.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Reviewed-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agomisc: Fix case Qemu -> QEMU
Stefan Weil [Tue, 4 Feb 2014 05:43:09 +0000 (06:43 +0100)]
misc: Fix case Qemu -> QEMU

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
10 years agoqapi: Refine human printing of sizes
Paolo Bonzini [Sat, 8 Feb 2014 10:01:57 +0000 (11:01 +0100)]
qapi: Refine human printing of sizes

This fixes several bugs or shortcomings of the previous pretty-printer.
In particular:

* use PRIu64 instead of casting to long long

* the exact value is included too

* the correct unit of measure (MiB, GiB, etc.) is used.  PiB and EiB
are added too.

* due to an off-by-one error, 512*2^30 was printed as 0.500MiB rather than
512MiB.  floor(log2(val)) is equal to 63 - clz(val), while the code used 64.

* The desired specification is %g rather than %f, which always uses three
decimals in the current code.  However %g would switch to scientific
notation when the integer part is >= 1000 (e.g. 1000*2^30).  To keep the
code simple, switch to the higher power when the integer part is >= 1000;
overflow is avoided by using frexp instead of clz.

Suggested-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Use QAPI type names for properties
Paolo Bonzini [Sat, 8 Feb 2014 10:01:56 +0000 (11:01 +0100)]
qdev: Use QAPI type names for properties

Use "drive", "chr", etc. only for legacy_name (which shows up
in -device foo,? output).

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Add enum property types to QAPI schema
Paolo Bonzini [Sat, 8 Feb 2014 10:01:55 +0000 (11:01 +0100)]
qdev: Add enum property types to QAPI schema

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoblock: Handle "rechs" and "large" translation options
Paolo Bonzini [Sat, 8 Feb 2014 10:01:54 +0000 (11:01 +0100)]
block: Handle "rechs" and "large" translation options

Sure, CHS translation is an obscure topic, and legacy options for
hard-disk geometries are obscure as well.  But since QEMU does nothing
with it except telling the BIOS, and since there "large" and "rechs"
are listed in the enums, parsing them seems to be the bare minimum.

Acked-by: Stefan Hajnoczi <stefanha@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Remove hex8/32/64 property types
Paolo Bonzini [Sat, 8 Feb 2014 10:01:53 +0000 (11:01 +0100)]
qdev: Remove hex8/32/64 property types

Replace them with uint8/32/64.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Remove most legacy printers
Paolo Bonzini [Sat, 8 Feb 2014 10:01:52 +0000 (11:01 +0100)]
qdev: Remove most legacy printers

Their functionality is either aesthetic only (e.g. on/off vs. true/false)
or obtained by the "human mode" of StringOutputVisitor.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Use human mode in "info qtree"
Paolo Bonzini [Sat, 8 Feb 2014 10:01:51 +0000 (11:01 +0100)]
qdev: Use human mode in "info qtree"

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqapi: Add human mode to StringOutputVisitor
Paolo Bonzini [Sat, 8 Feb 2014 10:01:50 +0000 (11:01 +0100)]
qapi: Add human mode to StringOutputVisitor

This will be used by "info qtree".  For numbers it prints both the
decimal and hex values.  For sizes it rounds to the nearest power
of 2^10.  For strings, it puts quotes around the string and separates
NULL and empty string.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Inline qdev_prop_parse()
Paolo Bonzini [Sat, 8 Feb 2014 10:01:49 +0000 (11:01 +0100)]
qdev: Inline qdev_prop_parse()

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Legacy properties are just strings
Paolo Bonzini [Sat, 8 Feb 2014 10:01:48 +0000 (11:01 +0100)]
qdev: Legacy properties are just strings

prop->info->legacy_name is still used by "-device foo,?".

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Legacy properties are now read-only
Paolo Bonzini [Sat, 8 Feb 2014 10:01:47 +0000 (11:01 +0100)]
qdev: Legacy properties are now read-only

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Remove legacy parsers for hex8/32/64
Paolo Bonzini [Sat, 8 Feb 2014 10:01:46 +0000 (11:01 +0100)]
qdev: Remove legacy parsers for hex8/32/64

The hexNN property types have not been accepting values not prefixed
by "0x" since QEMU 1.2.  Parse those values as decimals now.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqdev: Sizes are now parsed by StringInputVisitor
Paolo Bonzini [Sat, 8 Feb 2014 10:01:45 +0000 (11:01 +0100)]
qdev: Sizes are now parsed by StringInputVisitor

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqapi: Add size parser to StringInputVisitor
Paolo Bonzini [Sat, 8 Feb 2014 10:01:44 +0000 (11:01 +0100)]
qapi: Add size parser to StringInputVisitor

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqtest: Don't segfault with invalid -qtest option
Fam Zheng [Mon, 10 Feb 2014 01:28:02 +0000 (09:28 +0800)]
qtest: Don't segfault with invalid -qtest option

This prints an error message, instead of core dump, when "-qtest"
option value is invalid, e.g.:

    $ ./x86_64-softmmu/qemu-system-x86_64 -qtest unknown
        qemu-system-x86_64: Failed to initialize device for qtest:
        "unknown"

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoipack: Move IndustryPack out of hw/char/
Andreas Färber [Thu, 1 Aug 2013 22:48:40 +0000 (00:48 +0200)]
ipack: Move IndustryPack out of hw/char/

Move the header defining an IPackBus and IPackDevice base class into
a new include/ directory and move their implementation and a
PCI-IndustryPack bridge out of hw/char/ directory into a new hw/ipack/.

Acked-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoipoctal232: QOM parent field cleanup
Andreas Färber [Thu, 1 Aug 2013 16:51:35 +0000 (18:51 +0200)]
ipoctal232: QOM parent field cleanup

Clean up accesses to IPOctalState::dev field and rename it.

Acked-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoipack: QOM parent field cleanup for IPackDevice
Andreas Färber [Thu, 1 Aug 2013 16:48:28 +0000 (18:48 +0200)]
ipack: QOM parent field cleanup for IPackDevice

Rename the IPackDevice::qdev field to avoid accidental use.

Acked-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoipack: QOM parent field cleanup for IPackBus
Andreas Färber [Thu, 1 Aug 2013 16:47:34 +0000 (18:47 +0200)]
ipack: QOM parent field cleanup for IPackBus

Clean up the only user of IPackBus::qbus field and rename it.

Acked-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoipack: Convert to QOM realize
Andreas Färber [Thu, 1 Aug 2013 16:45:02 +0000 (18:45 +0200)]
ipack: Convert to QOM realize

Acked-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add ipoctal232 qtest
Andreas Färber [Sun, 9 Feb 2014 11:24:15 +0000 (12:24 +0100)]
tests: Add ipoctal232 qtest

Acked-by: Alberto Garcia <agarcia@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add tpci200 qtest
Andreas Färber [Sun, 9 Feb 2014 02:48:44 +0000 (03:48 +0100)]
tests: Add tpci200 qtest

Acked-by: Alberto Garcia <agarcia@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add virtio-net qtest
Andreas Färber [Sun, 9 Feb 2014 03:13:37 +0000 (04:13 +0100)]
tests: Add virtio-net qtest

Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add ne2000 qtest
Andreas Färber [Sun, 9 Feb 2014 03:01:37 +0000 (04:01 +0100)]
tests: Add ne2000 qtest

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoblock: Open by reference will try device then node_name.
Benoît Canet [Wed, 12 Feb 2014 16:15:07 +0000 (17:15 +0100)]
block: Open by reference will try device then node_name.

Since we introduced node_name for named bs of the graph modify the opening by
reference to use it as a fallback.

This patch also enforce the separation of the device id and graph node
namespaces.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: Relax bdrv_lookup_bs constraints.
Benoît Canet [Wed, 12 Feb 2014 16:15:06 +0000 (17:15 +0100)]
block: Relax bdrv_lookup_bs constraints.

The following patch will reuse bdrv_lookup_bs in order to open images by
references so the rules of usage of bdrv_lookup_bs must be relaxed a bit.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.
Benoît Canet [Thu, 13 Feb 2014 16:22:33 +0000 (17:22 +0100)]
blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.

As bdrv_open() documentation states:
"The reference to the QDict belongs to the block layer
 * after the call (even on failure), so if the caller intends to reuse the
 * dictionary, it needs to use QINCREF() before calling bdrv_open."

the optional options dict will not be reused after bdrv_open() and should
belong to the block layer so remove the extra QDECREF(options).

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: mirror - use local_err to avoid NULL errp
Jeff Cody [Thu, 13 Feb 2014 14:23:38 +0000 (09:23 -0500)]
block: mirror - use local_err to avoid NULL errp

When starting a block job, commit_active_start() relies on whether *errp
is set by mirror_start_job.  This allows it to determine if the mirror
job start failed, so that it can clean up any changes to open flags from
the bdrv_reopen().  If errp is NULL, then it will not be able to
determine if mirror_start_job failed or not.

To avoid this, use a local Error variable, and then propagate the error
(if any) to errp.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoqemu-iotests: Don't run 005 on vmdk split formats
Fam Zheng [Thu, 13 Feb 2014 02:05:31 +0000 (10:05 +0800)]
qemu-iotests: Don't run 005 on vmdk split formats

There would be too many extents that VMDK driver can't open all of them:

    005 0s ... - output mismatch (see 005.out.bad)
    --- 005.out     2013-12-24 09:27:27.608181030 +0800
    +++ 005.out.bad 2014-02-13 10:00:15.282184557 +0800
    @@ -4,10 +4,10 @@
     Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=5368709120000

     small read
    -read 4096/4096 bytes at offset 1024
    -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
    +qemu-io: can't open device /tmp/qemu-iotests/t.vmdk: Could not open '/tmp/qemu-iotests/t-s1016.vmdk': Too many open files
    +no file open, try 'help open'

     small write
    -wrote 4096/4096 bytes at offset 8192
    -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
    +qemu-io: can't open device /tmp/qemu-iotests/t.vmdk: Could not open '/tmp/qemu-iotests/t-s1016.vmdk': Too many open files
    +no file open, try 'help open'
     *** done

So disable the two subformats.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: qemu-iotests - add vhdx log replay tests for qemu-img
Jeff Cody [Wed, 12 Feb 2014 21:30:53 +0000 (16:30 -0500)]
block: qemu-iotests - add vhdx log replay tests for qemu-img

VHDX logs can now be replayed via 'qemu-img check -r all'.  Add
tests to verify that the log replay is successful when using qemu-img.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: qemu-iotests - fix test 070 (vhdx)
Jeff Cody [Wed, 12 Feb 2014 21:30:52 +0000 (16:30 -0500)]
block: qemu-iotests - fix test 070 (vhdx)

VHDX test 070 failed, due to different output from qemu-io / qemu
when opening an image read-only that contains a log file.  Filter
the output, and update the expected results to match the correct
output.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblock: Don't throw away errno via error_setg
Jeff Cody [Wed, 12 Feb 2014 19:46:24 +0000 (14:46 -0500)]
block: Don't throw away errno via error_setg

There are a handful of places in the block layer where a failure path
has a valid -errno value, yet error_setg() is used.  Those instances
should instead use error_setg_errno(), to preserve as much error
information as possible.

This patch replaces those instances with error_setg_errno(), so that
errno is passed up the stack in the error message.

Reported-By: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agotests: Add eepro100 qtest
Andreas Färber [Thu, 7 Nov 2013 18:18:46 +0000 (19:18 +0100)]
tests: Add eepro100 qtest

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add pcnet qtest
Andreas Färber [Thu, 7 Nov 2013 17:53:28 +0000 (18:53 +0100)]
tests: Add pcnet qtest

Test PCI only for now.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add rtl8139 qtest
Andreas Färber [Thu, 7 Nov 2013 17:43:09 +0000 (18:43 +0100)]
tests: Add rtl8139 qtest

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add vmxnet3 qtest
Andreas Färber [Thu, 7 Nov 2013 17:37:34 +0000 (18:37 +0100)]
tests: Add vmxnet3 qtest

Note that this will emit a warning:
[vmxnet3][WR][vmxnet3_peer_has_vnet_hdr]: Peer has no virtio extension.
Task offloads will be emulated.

Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Add e1000 qtest
Andreas Färber [Thu, 7 Nov 2013 17:25:10 +0000 (18:25 +0100)]
tests: Add e1000 qtest

Cc: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoi2c: Drop FROM_I2C_SLAVE() macro
Andreas Färber [Thu, 19 Dec 2013 21:42:26 +0000 (22:42 +0100)]
i2c: Drop FROM_I2C_SLAVE() macro

We now use type-specific QOM cast macros instead.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotwl92230: QOM'ify
Andreas Färber [Thu, 19 Dec 2013 21:41:25 +0000 (22:41 +0100)]
twl92230: QOM'ify

Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with
QOM cast macro. Rename parent field.

Add missing braces while at it.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agods1338: QOM'ify
Andreas Färber [Thu, 19 Dec 2013 21:34:05 +0000 (22:34 +0100)]
ds1338: QOM'ify

Replace usages of FROM_I2C_SLAVE() with QOM cast macro.
Rename parent field.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agolm832x: QOM'ify
Andreas Färber [Thu, 19 Dec 2013 21:30:16 +0000 (22:30 +0100)]
lm832x: QOM'ify

Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with
QOM cast macro. Rename parent field.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agomax7310: QOM'ify
Andreas Färber [Thu, 19 Dec 2013 21:21:57 +0000 (22:21 +0100)]
max7310: QOM'ify

Replace FROM_I2C_SLAVE() usages with QOM cast macro.
Rename parent field.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agossd0303: QOM'ify
Andreas Färber [Thu, 19 Dec 2013 21:10:23 +0000 (22:10 +0100)]
ssd0303: QOM'ify

Replace usages of FROM_I2C_SLAVE() with QOM cast macro.
Rename parent field.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agowm8750: QOM'ify
Andreas Färber [Thu, 19 Dec 2013 21:04:29 +0000 (22:04 +0100)]
wm8750: QOM'ify

Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with
QOM cast macro. Rename parent field.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoz2: QOM'ify AER915
Andreas Färber [Thu, 19 Dec 2013 20:55:44 +0000 (21:55 +0100)]
z2: QOM'ify AER915

Replace usages of FROM_I2C_SLAVE() with QOM cast macro.
Rename the parent field. Reuse the type constant in z2_init().

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Use TYPE_AER915 in z2_init() too]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotosa: QOM'ify DAC
Andreas Färber [Thu, 19 Dec 2013 20:51:29 +0000 (21:51 +0100)]
tosa: QOM'ify DAC

Replace usages of FROM_I2C_SLAVE() with QOM cast macro.
Rename parent field. Use type constant in tosa_tg_init().

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agopxa2xx: QOM'ify I2C slave
Andreas Färber [Thu, 19 Dec 2013 20:44:53 +0000 (21:44 +0100)]
pxa2xx: QOM'ify I2C slave

Replace usages of FROM_I2C_SLAVE() and direct parent field accesses with
QOM cast macro. Rename parent field to assure we caught all. Reuse type
constant in pxa2xx_i2c_init().

Add some missing braces while at it.

Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoi2c: Rename i2c_bus to I2CBus
Andreas Färber [Fri, 2 Aug 2013 22:18:51 +0000 (00:18 +0200)]
i2c: Rename i2c_bus to I2CBus

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agonand: Don't use qdev_create() in nand_init()
Andreas Färber [Wed, 5 Feb 2014 14:21:38 +0000 (15:21 +0100)]
nand: Don't use qdev_create() in nand_init()

Commit 7426aa72c36c908a7d0eae3e38568bb0a70de479 (nand: Don't inherit
from Sysbus) changed the parent type of TYPE_NAND but continued to use
qdev_create(), which handled a NULL BusState as SysBus.

Use object_new() instead, and reuse the TYPE_NAND define while at it.

Reported-by: Markus Armbruster <armbru@redhat.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Run qom-test for every architecture
Peter Maydell [Thu, 23 Jan 2014 16:22:59 +0000 (16:22 +0000)]
tests: Run qom-test for every architecture

Rather than requiring every new architecture to remember to add a line
to the Makefile to say that qom-test will work on it, autogenerate
the list of supported architectures by looking at the files in
default-configs (as configure does), and add qom-test to the
test list for all of them automatically.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqom-test: Test shutdown in addition to startup
Markus Armbruster [Fri, 10 Jan 2014 13:31:39 +0000 (14:31 +0100)]
qom-test: Test shutdown in addition to startup

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqom-test: Run for all available machines
Markus Armbruster [Fri, 10 Jan 2014 13:31:38 +0000 (14:31 +0100)]
qom-test: Run for all available machines

Get available machines via QMP instead of hardcoding a list that's
perpetually out of date.

Xen machines can work only when running under the Xen hypervisor.
Blacklist them.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Fix gcov paths for relocated device sources
Andreas Färber [Fri, 14 Feb 2014 14:09:28 +0000 (15:09 +0100)]
tests: Fix gcov paths for relocated device sources

Commit 49ab747f668f421138d5b40d83fa279c4c5e278d moved
fdc.c, hd-geometry.c, m48t59.c, tmp105.c into hw/ subdirectories;
commit 0ddfaf7fe4c8453446730328bf348b7c6438e4f8 did for mc146818rtc.c.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoblock: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare
Jeff Cody [Tue, 4 Feb 2014 19:12:44 +0000 (14:12 -0500)]
block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare

iSCSI currently does not need to do any actions to support the
current usage of bdrv_reopen().  However, it is important to note
a couple of things: 1.) A connection will not be re-established to
an iSCSI target, and 2.) If iscsi_open() is changed to parse 'flags',
then iscsi_reopen_prepare() may need to be more than a stub.

In light of the above, this commit adds comments above both of the
functions to bring attention to these facts.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoblockdev: Remove 'type' parameter from blockdev_init()
Kevin Wolf [Sun, 9 Feb 2014 08:52:32 +0000 (09:52 +0100)]
blockdev: Remove 'type' parameter from blockdev_init()

blockdev-add doesn't know about the device that the backend will be
attached to, this is a legacy -drive concept. Move the remaining checks
that use it to drive_init().

[Fam Zheng <famz@redhat.com> suggested line-wrapping to 80 chars as
required by the coding standard.  I have fixed this.
--Stefan]

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agosdhci: Drop unnecessary #include
Kevin Wolf [Sun, 9 Feb 2014 09:02:27 +0000 (10:02 +0100)]
sdhci: Drop unnecessary #include

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10 years agoPPC: KVM: Add missing address space to ldl_phys helper
Alexander Graf [Fri, 14 Feb 2014 08:15:21 +0000 (09:15 +0100)]
PPC: KVM: Add missing address space to ldl_phys helper

We now have to pass an address space to our _phys helpers. During the
transition apparently the EPR exit path missed out, so let's put it there.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-ppc: Make ppc40x CPUs available in ppcemb
Andreas Färber [Thu, 23 Jan 2014 16:47:44 +0000 (17:47 +0100)]
target-ppc: Make ppc40x CPUs available in ppcemb

Not only 44x CPUs (BookE) but also 40x CPUs can run with 1k page size.

Move the criteria to a central inline function to avoid repetition
and #ifdef'fery. Update qom-test to no longer exempt them.

Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoppcemb-softmmu: Drop Mac and e500 emulation
Andreas Färber [Thu, 23 Jan 2014 15:37:55 +0000 (16:37 +0100)]
ppcemb-softmmu: Drop Mac and e500 emulation

They are still available in ppc-softmmu and ppc64-softmmu.

Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoqtest: don't report signals if qtest driver enabled
Michael S. Tsirkin [Tue, 4 Feb 2014 18:06:47 +0000 (20:06 +0200)]
qtest: don't report signals if qtest driver enabled

qtest driver always uses signals to kill qemu
no need to report it, whatever the accelerator state.

Add API to detect qtest driver, and suppress reporting
signals in this case.

Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
Peter Maydell [Thu, 13 Feb 2014 15:02:03 +0000 (15:02 +0000)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

acpi,pc,pci fixes and enhancements

Most changes here are hotplug related:

This merges hotplug infrastructure changes by Igor,
some acpi related fixes, and PC fixes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Mon 10 Feb 2014 09:13:26 GMT using RSA key ID D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  ACPI: Remove commented-out code from HPET._CRS
  hw/pci: switch to a generic hotplug handling for PCIDevice
  pci/pcie: convert PCIE hotplug to use hotplug-handler API
  pci/shpc: convert SHPC hotplug to use hotplug-handler API
  acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API
  qdev:pci: refactor PCIDevice to use generic "hotpluggable" property
  hw/acpi: move typeinfo to the file end
  qdev: add "hotpluggable" property to Device
  qdev: add to BusState "hotplug-handler" link
  define hotplug interface
  loader: document that errno is set
  pc.c: better error message on initrd sizing failure
  pc_piix: enable legacy hotplug for Xen
  qtest: don't report signals if qtest driver enabled
  hw:piix4:acpi: reuse pcihp code for legacy PCI hotplug
  pcihp: remove unused AcpiPciHpPciStatus.device_present field
  pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug
  pcihp: make PCI hotplug mmio handlers indifferent to PCI_HOTPLUG_ADDR
  pcihp: replace enable|disable_device() with oneliners
  pcihp: reduce number of device check events

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into staging
Peter Maydell [Thu, 13 Feb 2014 14:52:06 +0000 (14:52 +0000)]
Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into staging

PReP machine and devices

* Cleanups for Raven PCI host bridge
* Removal of PReP machine and devices from qemu-system-ppcemb

# gpg: Signature made Mon 10 Feb 2014 16:19:03 GMT using RSA key ID 3E7E013F
# gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
# gpg:                 aka "Andreas Färber <afaerber@suse.com>"

* remotes/afaerber/tags/prep-for-upstream:
  prep: Drop from ppcemb-softmmu
  raven: Use constant PCI_NUM_PINS instead of 4
  prep: Kill get_system_io() usage

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/alon/pull-libcacard.glusterfs' into staging
Peter Maydell [Wed, 12 Feb 2014 17:53:31 +0000 (17:53 +0000)]
Merge remote-tracking branch 'remotes/alon/pull-libcacard.glusterfs' into staging

* remotes/alon/pull-libcacard.glusterfs:
  libcacard: Don't link with all libraries QEMU links to

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agoMerge remote-tracking branch 'remotes/kevin/tags/for-anthony' into staging
Peter Maydell [Wed, 12 Feb 2014 16:42:50 +0000 (16:42 +0000)]
Merge remote-tracking branch 'remotes/kevin/tags/for-anthony' into staging

Block patches

# gpg: Signature made Sun 09 Feb 2014 08:12:51 GMT using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-anthony:
  block: Fix 32 bit truncation in mark_request_serialising()
  blkdebug: Don't leak bs->file on failure
  block: Don't call ROUND_UP with negative values
  block: bdrv_aligned_pwritev: Assert overlap range
  block: Fix memory leaks in bdrv_co_do_pwritev()
  raw: Fix BlockLimits passthrough
  qemu-iotests: add test for qcow2 preallocation with different cluster sizes
  qcow2: check for NULL l2meta
  qcow2: fix offset overflow in qcow2_alloc_clusters_at()
  qcow2: remove n_start and n_end of qcow2_alloc_cluster_offset()
  block/iscsi: always fill bs->bl.opt_transfer_length
  block: Fail gracefully with missing filename
  qemu-iotests: enable support for NFS protocol
  qemu-iotests: enable test 016 and 025 to work with NFS protocol
  qemu-iotests: blacklist test 020 for NFS protocol
  qemu-iotests: change _supported_proto to file for various tests
  block: add native support for NFS
  qemu-iotest: Make 077 raw-only

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10 years agotarget-openrisc: Use new qemu_ld/st opcodes
Richard Henderson [Wed, 11 Dec 2013 16:42:08 +0000 (08:42 -0800)]
target-openrisc: Use new qemu_ld/st opcodes

Signed-off-by: Richard Henderson <rth@twiddle.net>
Acked-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Jia Liu <proljc@gmail.com>
10 years agopetalogix-ml605: Create the CPU with object_new()
Edgar E. Iglesias [Mon, 16 Dec 2013 02:44:20 +0000 (12:44 +1000)]
petalogix-ml605: Create the CPU with object_new()

This is to allow future patches to set properties before cpu::realize().

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make cpu_memory_rw_debug use the CPUs AS
Edgar E. Iglesias [Fri, 13 Dec 2013 06:31:02 +0000 (16:31 +1000)]
exec: Make cpu_memory_rw_debug use the CPUs AS

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make cpu_physical_memory_write_rom input an AS
Edgar E. Iglesias [Fri, 13 Dec 2013 06:28:52 +0000 (16:28 +1000)]
exec: Make cpu_physical_memory_write_rom input an AS

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make stb_phys input an AddressSpace
Edgar E. Iglesias [Tue, 17 Dec 2013 05:29:06 +0000 (15:29 +1000)]
exec: Make stb_phys input an AddressSpace

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make stw_*_phys input an AddressSpace
Edgar E. Iglesias [Tue, 17 Dec 2013 05:22:06 +0000 (15:22 +1000)]
exec: Make stw_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make stl_phys_notdirty input an AddressSpace
Edgar E. Iglesias [Thu, 28 Nov 2013 09:13:41 +0000 (10:13 +0100)]
exec: Make stl_phys_notdirty input an AddressSpace

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make stl_*_phys input an AddressSpace
Edgar E. Iglesias [Tue, 17 Dec 2013 05:07:29 +0000 (15:07 +1000)]
exec: Make stl_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
10 years agoexec: Make stq_*_phys input an AddressSpace
Edgar E. Iglesias [Wed, 27 Nov 2013 23:11:44 +0000 (00:11 +0100)]
exec: Make stq_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>