Commit graph

18860 commits

Author SHA1 Message Date
Paolo Bonzini 5db1764cc1 virtio-scsi: add migration support
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-24 14:54:51 +01:00
Paolo Bonzini 06114d72f6 virtio-scsi: process control queue requests
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-24 14:54:51 +01:00
Alon Levy f293d8b1f2 slirp/misc: fix gcc __warn_memset_zero_len warnings
By removing memset altogether (Patch from Stefan Hajnoczi, tested
compile only by me).

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-24 13:24:42 +00:00
Benjamin Herrenschmidt 67d6fa5362 hw/9pfs: Endian fixes for virtfs
This patch fixes several endian bugs in virtfs.

Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-02-24 14:01:19 +05:30
Meador Inge 983eef5ad7 ./configure: add option for disabling VirtFS
Signed-off-by: Meador Inge <meadori@codesourcery.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-02-24 14:00:42 +05:30
Michael Roth 546b60d06b qemu-ga: add win32 guest-shutdown command
Implement guest-shutdown RPC for Windows. Functionally this should be
equivalent to the posix implementation.

Original patch by Gal Hammer <ghammer@redhat.com>
2012-02-23 15:43:50 -06:00
Michael Roth bc62fa039c qemu-ga: add Windows service integration
This allows qemu-ga to function as a Windows service:

 - to install the service (will auto-start on boot):
     qemu-ga --service install
 - to start the service:
     net start qemu-ga
 - to stop the service:
     net stop qemu-ga
 - to uninstall service:
     qemu-ga --service uninstall

Original patch by Gal Hammer <ghammer@redhat.com>
2012-02-23 15:43:50 -06:00
Michael Roth 7868e26e59 qemu-ga: add initial win32 support
This adds a win32 channel implementation that makes qemu-ga functional
on Windows using virtio-serial (unix-listen/isa-serial not currently
implemented). Unlike with the posix implementation, we do not use
GIOChannel for the following reasons:

 - glib calls stat() on an fd to check whether S_IFCHR is set, which is
   the case for virtio-serial on win32. Because of that, a one-time
   check to determine whether the channel is readable is done by making
   a call to PeekConsoleInput(), which reports the underlying handle is
   not a valid console handle, and thus we can never read from the
   channel.

 - if one goes as far as to "trick" glib into thinking it is a normal
   file descripter, the buffering is done in such a way that data
   written to the output stream will subsequently result in that same
   data being read back as if it were input, causing an error loop.
   furthermore, a forced flush of the channel only moves the data into a
   secondary buffer managed by glib, so there's no way to prevent output
   from getting read back as input.

The implementation here ties into the glib main loop by implementing a
custom GSource that continually submits asynchronous/overlapped I/O to
fill an GAChannel-managed read buffer, and tells glib to poll the
corresponding event handle for a completion whenever there is no
data/RPC in the read buffer to notify the main application about.
2012-02-23 15:43:49 -06:00
Michael Roth d8ca685acb qemu-ga: fixes for win32 build of qemu-ga
Various stubs and #ifdefs to compile for Windows using mingw
cross-build. Still has 1 linker error due to a dependency on the
forthcoming win32 versions of the GAChannel/transport class.
2012-02-23 15:40:16 -06:00
Michael Roth c216e5add1 qemu-ga: rename guest-agent-commands.c -> commands-posix.c 2012-02-23 15:40:16 -06:00
Michael Roth 42074a9d4d qemu-ga: separate out common commands from posix-specific ones
Many of the current RPC implementations are very much POSIX-specific
and require complete re-writes for Windows. There are however a small
set of core guest agent commands that are common to both, and other
commands such as guest-file-* which *may* be portable. So we introduce
commands.c for the latter, and will rename guest-agent-commands.c to
commands-posix.c in a future commit. Windows implementations will go in
commands-win32.c, eventually.
2012-02-23 15:40:16 -06:00
Michael Roth 125b310e1d qemu-ga: move channel/transport functionality into wrapper class
This is mostly in preparation for the win32 port, which won't use
GIO channels for reasons that will be made clearer later. Here the
GAChannel class is just a loose wrapper around GIOChannel
calls/callbacks, but we also roll in the logic/configuration for
various channel types and managing unix socket connections, which makes
the abstraction much more complete and further aids in the win32 port
since isa-serial/unix-listen will not be supported initially.

There's also a bit of refactoring in the main logic to consolidate the
exit paths so we can do common cleanup for things like pid files, which
weren't always cleaned up previously.
2012-02-23 15:40:16 -06:00
Michael Roth 54383726dd qemu-ga: Add schema documentation for types
Document guest agent schema types in similar fashion to qmp schema
types.
2012-02-23 15:40:07 -06:00
Kevin Wolf d06cddf517 Merge qemu-iotests into for-anthony 2012-02-23 10:35:24 +01:00
Lucas Meneghel Rodrigues d305fd5dd8 qemu-iotests: common.config: Allow use of arbitrary qemu* paths
Since we might want to test arbitrary qemu, qemu-img and
qemu-io paths, allow users to specify environment variable
values for QEMU_PROG, QEMU_IMG_PROG and QEMU_IO_PROG so
the testsuite will use those values rather than find them
on PATH. Obviously, if such env variables are not set
prior to script execution, normal detection mechanism
takes place.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Lucas Meneghel Rodrigues df4b627efe qemu-iotests: check: print relevant path information
Print the paths of the programs under test
(qemu, qemu-img and qemu-io).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Kevin Wolf 8455e4ee66 qemu-iotests: test loading internal snapshots
Test loading internal snapshots where the L1 table of the snapshot
is smaller than the current L1 table.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Kevin Wolf bfe8524862 qemu-iotests: Update filter for default cluster size
Until recently, qemu-img create displayed cluster_size=0 for the default
cluster size. It is changed to display the real cluster size now, which results
in the cluster size not being filtered out any more.

If the cluster size is specified explicitly in CLUSTER_SIZE, keep the output,
and if using the default, filter it out. This mostly restores the old behaviour
of the test cases; test 015 must be fixed to use CLUSTER_SIZE instead of using
extra_img_options for it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Stefan Hajnoczi 25bb8a365a qemu-iotests: add qed support to 025 image resize test
QED now supports the truncate (aka resize) operation for growing images.
Update test 025 so it runs for QED.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Josh Durgin 92eeab5bf5 qemu-iotests: Update rbd support
rbd implements bdrv_truncate, so test 025 will work.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Mitnick Lyu 5e654e08ff qemu-iotests: common.config: Fix no $TEST_DIR directory
mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Christoph Hellwig 5177c51245 qemu-iotests: only run 016 for file and sheepdog protocols
016 writes past EOF which isn't support by most protocols, so limit
it to file and sheepdog, which explicitly support it.

Pointed out by Josh Durgin <josh.durgin@dreamhost.com>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:47 +01:00
Stefan Hajnoczi dd0c35d69b qemu-iotests: Use zero-based offsets for IO patterns
The io_pattern style functions have the following loop:

  for i in `seq 1 $count`; do
      echo ... $(( start + i * step )) ...
  done

Offsets are 1-based so start=1024, step=512, count=4 yields:
1536, 2048, 2560, 3072

Normally we expect:
1024, 1536, 2048, 2560

Most tests ignore this detail, which means that they perform I/O to a
slightly different range than expected by the test author.

Later on things got less innocent and tests started trying to compensate
for the 1-based indexing.  This included negative start values in test
024 and my own attempt with count-1 in test 028!

The end result is that tests that use io_pattern are hard to reason
about and don't work the way you'd expect.  It's time to clean this mess
up.

This patch switches io_pattern to 0-based offsets.  This requires
adjusting the golden outputs since I/O ranges are now shifted and output
differs.

Verifying these output diffs is easy, however.  Each diff hunk moves one
I/O from beyond the end of the pattern range to the beginning.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:46 +01:00
MORITA Kazutaka 9cdfa1b34e qemu-iotests: add support for rbd and sheepdog protocols
This patch introduces tests for protocols other than file, and
initially supports rbd and sheepdog.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:46 +01:00
Stefan Hajnoczi 62284d1776 qemu-iotests: filter IMGFMT correctly in 019
Test 019 can be run with qcow2 and qed image formats.  Replace the
specific image format value with "IMGFMT" so the golden output does not
hardcode qcow2 or qed.

This patch also includes a typo fix for "occurrences".

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:46 +01:00
Stefan Weil 657c166f8e qemu-iotests: README: Fix spelling
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:46 +01:00
Stefan Hajnoczi f5a4bbd913 qemu-iotests: add support for qed format
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-23 10:29:46 +01:00
Christoph Hellwig 2684871af5 qemu-iotests: filter TEST_DIR correctly in 019
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-23 10:29:38 +01:00
Peter Maydell 3b26486acd vl.c: Increase width of machine name column in "-M ?" output
Increase the width of the column used for the machine name in
the "-M ?" output from 10 to 20 spaces. This fixes the formatting
so it looks nice for architectures where a few of the machines
have overly long names. (Our current longest machine name is
"petalogix-s3adsp1800" with "realview-eb-mpcore" not far behind.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-23 08:59:51 +00:00
Stefan Weil a97e45c8b8 tcg: Remove unneeded include statements
The standard include files are already included in qemu-common.h.

malloc.h and alloca.h were needed for alloca() which was removed
from TCG code some years ago when switching from dyngen to TCG
(see commit 49516bc0d6).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-23 08:59:51 +00:00
Alexander Barabash f0cdc966fb qom: In function object_set_link_property(), first call object_ref(), then object_unref().
In the old implementation, if the new value of the property links
to the same object, as the old value, that object is first unref-ed,
and then ref-ed. This leads to unintended deinitialization of that object.

In the new implementation, this is fixed.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Barabash <alexander_barabash@mentor.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:30 -06:00
Eduardo Habkost adbbdf2484 cpu defs: uncomment empty extfeatures_ecx definition for Opteron_G1 (v2)
This should have no visible effect, but it should just clean up the
config file a bit.

This is based on a previous patch from John Cooper where this was introduced
with many other changes at the same time. Original John's patch submission is
at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>.

Changes v1 -> v2:
 - Rebase against latest Qemu git tree

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:30 -06:00
Eduardo Habkost c58a6694f1 add Westmere as a qemu cpu model (v2)
Version 1 of this patch was:

Message-Id: <1307041990-26194-11-git-send-email-ehabkost@redhat.com
http://marc.info/?l=qemu-devel&m=130704415919346

This version doesn't have the duplicate feature bits on extfeature_edx, though,
as they are being removed from the Intel models (as they are reserved bits on
Intel CPUs).

Version 1 patch description:

    This patch adds Westmere as a qemu cpu model.  The only
    additional guest visible feature of a Westmere relative
    to Nehalem is the inclusion of AES instructions.  However
    as other non-ABI visible modifications exist along with
    fabrication changes, the CPUID data of the corresponding
    deployed silicon was altered slightly to reflect this.

    We've seen isolated cases where apparently unrelated yet
    slightly incoherent CPUID data has caused problems, most
    notably during guest boot.  Providing Westmere as a
    model separate fro Nehalem allows us to more easily address
    such quirks.

    [ehabkost: edited commit message to have a better Subject line]

    Signed-off-by: john cooper <john.cooper@redhat.com>
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Changes version 1 -> version 2:
 - Remove the duplicate feature bits on extfeature_edx, that are
   reserved on Intel CPUs
 - Reorder feature flags
 - Remove x2apic from the definition because x2apic requires some fixes
   that have to be resubmitted

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:30 -06:00
Eduardo Habkost df07ec5626 cpu defs: remove replicated flags from Intel (v2)
This patch removes the replicated feature flags from cpuid 8000_0001:edx
(extfeature_edx) from Intel models, as the duplicated feature flags are present
only on AMD CPUs. On Intel models, only the i64, syscall, and xd flags are kept
on extfeature_edx.

This is based on a previous patch from John Cooper where this was introduced
with many other changes at the same time. Original John's patch submission is
at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>.

Original John's patch description was:

    cpu model bug fixes and definition corrections

    This patch was intended to address the replicated feature
    flags in cpuid 8000_0001:edx from cpuid 0000_0001:edx.
    This is due to AMD's definition where these flags are
    mostly cloned in the 8000_0001:edx cpuid function.
    qemu64 attempted to glue together the respective Intel
    and AMD nearly disjoint features and this propagated to
    the new Intel models as doing so was believed conservative
    at the time.  However after further soak and test lugging
    around this cruft doesn't provide any value, could
    conceivably confuse a guest, and has confused users trying
    to maintain/add cpu definitions.  This also caused issues
    for libvirt attempting to track this mis-encoding.

    So we've here tossed out the AMD replicated definitions
    from the Intel models, added a few replications into AMD
    definitions which were missing according to AMD's latest
    CPUID document, and reordered the config file flags to
    follow intuitive sequential bit ordering.  Also two flag
    name aliases were added for clarity to Intel models.  The
    end result being the models definitions now conform to
    their respective cpuid specifications sans x2apic which is
    emulated by kvm.

    This was tested with the following combinations:

        [Conroe, Penryn, Nehalem] x [F12-64, win64, win32] -- Intel host
        [Opteron_G1, Opteron_G2, Opteron_G3] x [F12-64, win64, win32] -- AMD host

    Yielding successful boots in all cases.

    Signed-off-by: john cooper <john.cooper@redhat.com>

Changes v1 -> v2:
 - Rebase against latest Qemu git tree

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:30 -06:00
Eduardo Habkost 0ce01375a2 cpu defs: add pse36, mca, mtrr to AMD CPU definitions (v2)
This patch adds some missing flags to extfeature_edx, that were missing
according to AMD's latest CPUID document.

This is based on a previous patch from John Cooper where this was introduced
with many other changes at the same time. Original John's patch submission is
at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>.

Original John's patch description was:

    cpu model bug fixes and definition corrections

    This patch was intended to address the replicated feature
    flags in cpuid 8000_0001:edx from cpuid 0000_0001:edx.
    This is due to AMD's definition where these flags are
    mostly cloned in the 8000_0001:edx cpuid function.
    qemu64 attempted to glue together the respective Intel
    and AMD nearly disjoint features and this propagated to
    the new Intel models as doing so was believed conservative
    at the time.  However after further soak and test lugging
    around this cruft doesn't provide any value, could
    conceivably confuse a guest, and has confused users trying
    to maintain/add cpu definitions.  This also caused issues
    for libvirt attempting to track this mis-encoding.

    So we've here tossed out the AMD replicated definitions
    from the Intel models, added a few replications into AMD
    definitions which were missing according to AMD's latest
    CPUID document, and reordered the config file flags to
    follow intuitive sequential bit ordering.  Also two flag
    name aliases were added for clarity to Intel models.  The
    end result being the models definitions now conform to
    their respective cpuid specifications sans x2apic which is
    emulated by kvm.

    This was tested with the following combinations:

        [Conroe, Penryn, Nehalem] x [F12-64, win64, win32] -- Intel host
        [Opteron_G1, Opteron_G2, Opteron_G3] x [F12-64, win64, win32] -- AMD host

    Yielding successful boots in all cases.

    Signed-off-by: john cooper <john.cooper@redhat.com>

Changes v1 -> v2:
 - Rebase against latest Qemu git tree

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:29 -06:00
Eduardo Habkost 3ac8ebfe1c cpu defs: use Intel flag names for Intel models (v2)
Use 'i64' instead of 'lm' and 'xd' instead of 'nx' on Intel models.

The flags have different names on Intel docs, so use those names for clarity.

This is based on a previous patch from John Cooper where this was introduced
with many other changes at the same time. Original John's patch submission is
at Message-ID: <4DDAD5E7.2020002@redhat.com>, <http://marc.info/?l=qemu-devel&m=130618871926030>.

Changes v1 -> v2:
 - Rebase patch against latest Qemu git tree

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:28 -06:00
Eduardo Habkost f370be3c50 cpu flags: aliases: pclmuldq|pclmulqdq and ffxsr|fxsr_opt
pclmulqdq: /proc/cpuinfo on Linux and all documentation I have seen uses
pclmulqdq as the flag name. As the only document using pclmuldq seems to
be the Intel CPUID documentation (Application Note 485), it looks like a
typo and not the correct name for the flag.

ffxsr: AMD docs refer to fxsr_opt as ffxsr, so allow this named to be
used too.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:28 -06:00
Eduardo Habkost f5244e937a cpu models: reorder flag list to match bit order
This will make it easier to review and change the flag list in the future.

No behaviour change should be introduced by this, as it is just changing
the flag order on the config file.

To make sure the flag sets are really not changed by this patch, I have
used the following stupid script to compare the flag values in the
config files:
https://gist.github.com/1004885

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:27 -06:00
Paolo Bonzini de7724f700 split SCSI and LSI, add myself as SCSI maintainer
This has been the de facto situation for a while now.
Add a tree, too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 13:24:27 -06:00
Luiz Capitulino 6f382ed226 qmp: add DEVICE_TRAY_MOVED event
It's emitted whenever the tray is moved by the guest or by HMP/QMP
commands.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22 17:23:50 -02:00
Luiz Capitulino bde25388d1 ide: drop ide_tray_state_post_load()
This is used to sync the physical tray state after migration when
using CD-ROM passthrough. However, migrating when using passthrough
is broken anyway and shouldn't be supported...

So, drop this function as it causes a problem with the DEVICE_TRAY_MOVED
event, which is going to be introduced by the next commit.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22 17:23:33 -02:00
Luiz Capitulino d88b1819dd block: Don't call bdrv_eject() if the tray state didn't change
It's not needed. Besides we can then assume that bdrv_eject() is
only called when there's a tray state change, which is useful to
the DEVICE_TRAY_MOVED event (going to be added in a future
commit).

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22 17:23:21 -02:00
Luiz Capitulino f36f394952 block: bdrv_eject(): Make eject_flag a real bool
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22 17:23:05 -02:00
Luiz Capitulino 329c0a48a9 block: Rename bdrv_mon_event() & BlockMonEventAction
They are QMP events, not monitor events. Rename them accordingly.

Also, move bdrv_emit_qmp_error_event() up in the file. A new event will
be added soon and it's good to have them next each other.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Kevin Wolf <kwolf@redhat.com>
2012-02-22 17:22:35 -02:00
Anthony Liguori 235fe3bfd4 qom: add test tools
Tested-by: Andreas F=E4rber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 12:18:26 -06:00
Anthony Liguori 9f68f7fb12 qmp: make qmp.py easier to use
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-22 12:18:26 -06:00
Kevin Wolf 581e7d530b qemu-iotests: fix 019 golden output
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22 16:17:03 +01:00
Kevin Wolf 727822f5b7 qemu-iotests: update expected results after qemu-img changes
The error message for leaked clusters has changed. qemu-iotests needs to be
updated to pass 026 again.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22 16:17:03 +01:00
Stefan Hajnoczi 8268b7675c qemu-iotests: add read/write from smaller backing image test
Some image formats support backing images that are smaller than the
image file.  This patch adds a test that verifies that reads and writes
beyond the end of backing image work.

Unallocated reads beyond the end of the backing file should produce
zeroes.

Writes beyond the end of the backing file should copy-on-write using
zeroes.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22 16:17:03 +01:00
Stefan Hajnoczi 89d22bc306 qemu-iotests: add sub-cluster allocating write test for sparse image formats
Image formats that grow the image file on demand and are organized into
clusters must handle sub-cluster allocating writes.  Such writes touch
a portion of a previously unallocated data cluster.  After the image
file is grown with the written data, reads of that cluster should work
as expected:

1. Sectors before the written region are zero.
2. The written region is present and the data is uncorrupted.
3. Sectors after the written region are zero.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2012-02-22 16:17:03 +01:00