]> Git Repo - qemu.git/log
qemu.git
12 years agoqemu-ga: move channel/transport functionality into wrapper class
Michael Roth [Thu, 19 Jan 2012 06:18:20 +0000 (00:18 -0600)]
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.

12 years agoqemu-ga: Add schema documentation for types
Michael Roth [Mon, 16 Jan 2012 23:44:16 +0000 (17:44 -0600)]
qemu-ga: Add schema documentation for types

Document guest agent schema types in similar fashion to qmp schema
types.

12 years agoMerge qemu-iotests into for-anthony
Kevin Wolf [Thu, 23 Feb 2012 09:33:55 +0000 (10:33 +0100)]
Merge qemu-iotests into for-anthony

12 years agoqemu-iotests: common.config: Allow use of arbitrary qemu* paths
Lucas Meneghel Rodrigues [Thu, 1 Dec 2011 13:41:24 +0000 (11:41 -0200)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: check: print relevant path information
Lucas Meneghel Rodrigues [Thu, 1 Dec 2011 13:41:23 +0000 (11:41 -0200)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test loading internal snapshots
Kevin Wolf [Fri, 5 Aug 2011 14:37:25 +0000 (16:37 +0200)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: Update filter for default cluster size
Kevin Wolf [Wed, 8 Jun 2011 11:23:33 +0000 (13:23 +0200)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add qed support to 025 image resize test
Stefan Hajnoczi [Mon, 16 May 2011 12:59:12 +0000 (13:59 +0100)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: Update rbd support
Josh Durgin [Wed, 13 Apr 2011 00:47:45 +0000 (17:47 -0700)]
qemu-iotests: Update rbd support

rbd implements bdrv_truncate, so test 025 will work.

Signed-off-by: Josh Durgin <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: common.config: Fix no $TEST_DIR directory
Mitnick Lyu [Mon, 11 Apr 2011 20:05:44 +0000 (04:05 +0800)]
qemu-iotests: common.config: Fix no $TEST_DIR directory

mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: only run 016 for file and sheepdog protocols
Christoph Hellwig [Thu, 21 Apr 2011 06:26:04 +0000 (08:26 +0200)]
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 <[email protected]>.

Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: Use zero-based offsets for IO patterns
Stefan Hajnoczi [Fri, 4 Feb 2011 12:55:02 +0000 (12:55 +0000)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add support for rbd and sheepdog protocols
MORITA Kazutaka [Mon, 17 Jan 2011 17:01:17 +0000 (02:01 +0900)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: filter IMGFMT correctly in 019
Stefan Hajnoczi [Wed, 24 Nov 2010 16:12:21 +0000 (17:12 +0100)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: README: Fix spelling
Stefan Weil [Sun, 7 Nov 2010 13:56:57 +0000 (14:56 +0100)]
qemu-iotests: README: Fix spelling

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add support for qed format
Stefan Hajnoczi [Sun, 31 Oct 2010 20:10:20 +0000 (16:10 -0400)]
qemu-iotests: add support for qed format

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: filter TEST_DIR correctly in 019
Christoph Hellwig [Sun, 31 Oct 2010 20:07:46 +0000 (16:07 -0400)]
qemu-iotests: filter TEST_DIR correctly in 019

Signed-off-by: Kevin Wolf <[email protected]>
12 years agovl.c: Increase width of machine name column in "-M ?" output
Peter Maydell [Wed, 22 Feb 2012 22:13:11 +0000 (22:13 +0000)]
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 <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agotcg: Remove unneeded include statements
Stefan Weil [Sat, 11 Feb 2012 09:07:55 +0000 (10:07 +0100)]
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 49516bc0d622112caac9df628caf19010fda8b67).

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agoqom: In function object_set_link_property(), first call object_ref(), then object_unr...
Alexander Barabash [Wed, 22 Feb 2012 17:22:26 +0000 (19:22 +0200)]
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 <[email protected]>
Signed-off-by: Alexander Barabash <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agocpu defs: uncomment empty extfeatures_ecx definition for Opteron_G1 (v2)
Eduardo Habkost [Fri, 17 Feb 2012 16:41:25 +0000 (14:41 -0200)]
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoadd Westmere as a qemu cpu model (v2)
Eduardo Habkost [Fri, 17 Feb 2012 16:41:24 +0000 (14:41 -0200)]
add Westmere as a qemu cpu model (v2)

Version 1 of this patch was:

Message-Id: <1307041990[email protected]
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 <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agocpu defs: remove replicated flags from Intel (v2)
Eduardo Habkost [Fri, 17 Feb 2012 16:41:23 +0000 (14:41 -0200)]
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 <[email protected]>
Changes v1 -> v2:
 - Rebase against latest Qemu git tree

Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agocpu defs: add pse36, mca, mtrr to AMD CPU definitions (v2)
Eduardo Habkost [Fri, 17 Feb 2012 16:41:22 +0000 (14:41 -0200)]
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 <[email protected]>
Changes v1 -> v2:
 - Rebase against latest Qemu git tree

Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agocpu defs: use Intel flag names for Intel models (v2)
Eduardo Habkost [Fri, 17 Feb 2012 16:41:21 +0000 (14:41 -0200)]
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agocpu flags: aliases: pclmuldq|pclmulqdq and ffxsr|fxsr_opt
Eduardo Habkost [Fri, 17 Feb 2012 16:41:20 +0000 (14:41 -0200)]
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agocpu models: reorder flag list to match bit order
Eduardo Habkost [Fri, 17 Feb 2012 16:41:19 +0000 (14:41 -0200)]
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agosplit SCSI and LSI, add myself as SCSI maintainer
Paolo Bonzini [Wed, 22 Feb 2012 14:59:52 +0000 (15:59 +0100)]
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 <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoqmp: add DEVICE_TRAY_MOVED event
Luiz Capitulino [Tue, 14 Feb 2012 15:41:13 +0000 (13:41 -0200)]
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 <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
12 years agoide: drop ide_tray_state_post_load()
Luiz Capitulino [Fri, 17 Feb 2012 18:40:00 +0000 (16:40 -0200)]
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 <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
12 years agoblock: Don't call bdrv_eject() if the tray state didn't change
Luiz Capitulino [Fri, 17 Feb 2012 13:05:21 +0000 (11:05 -0200)]
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 <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
12 years agoblock: bdrv_eject(): Make eject_flag a real bool
Luiz Capitulino [Fri, 3 Feb 2012 18:24:53 +0000 (16:24 -0200)]
block: bdrv_eject(): Make eject_flag a real bool

Signed-off-by: Luiz Capitulino <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
12 years agoblock: Rename bdrv_mon_event() & BlockMonEventAction
Luiz Capitulino [Wed, 25 Jan 2012 18:59:43 +0000 (16:59 -0200)]
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 <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: Kevin Wolf <[email protected]>
12 years agoqom: add test tools
Anthony Liguori [Mon, 20 Feb 2012 22:28:30 +0000 (16:28 -0600)]
qom: add test tools

Tested-by: Andreas F=E4rber <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoqmp: make qmp.py easier to use
Anthony Liguori [Mon, 20 Feb 2012 22:28:29 +0000 (16:28 -0600)]
qmp: make qmp.py easier to use

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoqemu-iotests: fix 019 golden output
Kevin Wolf [Sun, 31 Oct 2010 20:05:21 +0000 (16:05 -0400)]
qemu-iotests: fix 019 golden output

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: update expected results after qemu-img changes
Kevin Wolf [Fri, 15 Oct 2010 21:08:51 +0000 (14:08 -0700)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add read/write from smaller backing image test
Stefan Hajnoczi [Fri, 15 Oct 2010 14:56:35 +0000 (07:56 -0700)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add sub-cluster allocating write test for sparse image formats
Stefan Hajnoczi [Fri, 15 Oct 2010 14:55:52 +0000 (07:55 -0700)]
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: improve test for qemu-img convert with backing file
Kevin Wolf [Fri, 15 Oct 2010 14:53:00 +0000 (07:53 -0700)]
qemu-iotests: improve test for qemu-img convert with backing file

Additionally to testing the qemu-img convert -B option, also test
-o backing_file.

Also, the old test acidentlly used a pattern of zeros for most of the writes,
so that the allocation test didn't really work out. This is fixed by using an
explicit pattern.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: consider more cases in parsing qemu-io output
Kevin Wolf [Fri, 1 Oct 2010 04:02:28 +0000 (06:02 +0200)]
qemu-iotests: consider more cases in parsing qemu-io output

I got a bug report with test output diffs like this:

-4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+4 KiB, 1 ops; 0.0000 sec (inf EiB/sec and inf ops/sec)

This patch extends the regular expression to consider terabytes, petabytes and
exabytes, and to allow inf as value for the throughput.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: qcow2 error path tests
Kevin Wolf [Mon, 14 Jun 2010 09:17:54 +0000 (11:17 +0200)]
qemu-iotests: qcow2 error path tests

This adds test cases for qcow2 error paths (using blkdebug)

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: improve rebase test
Kevin Wolf [Tue, 4 May 2010 16:59:26 +0000 (18:59 +0200)]
qemu-iotests: improve rebase test

The old test didn't consider cases in which the COW files contains some
unallocated clusters and after them allocated ones again.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test bdrv_truncate
Stefan Hajnoczi [Tue, 4 May 2010 16:59:08 +0000 (18:59 +0200)]
qemu-iotests: test bdrv_truncate

This patch adds an image resize grow test to ensure that existing data
is not lost during grow and new space is zeroed.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: explicitly use bash interpreter
Stefan Hajnoczi [Mon, 26 Apr 2010 09:44:05 +0000 (11:44 +0200)]
qemu-iotests: explicitly use bash interpreter

The tests use bash language features like 'let', which aren't supported
by /bin/sh on systems that use a conservative shell like dash.  This
patch changes the interpreter to /bin/bash.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test qemu-img rebase
Kevin Wolf [Sun, 17 Jan 2010 11:23:15 +0000 (12:23 +0100)]
qemu-iotests: test qemu-img rebase

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test larger clusters sizes on qcow2
Kevin Wolf [Thu, 1 Oct 2009 17:30:19 +0000 (14:30 -0300)]
qemu-iotests: test larger clusters sizes on qcow2

This patch adds test case 023 which tests some more cluster sizes. For
anythinger larger than 4k clusters we can't use requests that are l2_size or
more (128k for 1k clusters, 2 MB for 4k clusters, 512 MB for 64k clusters).
Therefore one of the common.pattern cases is changed and needs new expected
results for some old test cases.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: 019: Make cluster size dynamic
Kevin Wolf [Thu, 1 Oct 2009 17:30:13 +0000 (14:30 -0300)]
qemu-iotests: 019: Make cluster size dynamic

Change the offsets for test requests according to CLUSTER_SIZE.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: align test requests according to cluster size
Kevin Wolf [Thu, 1 Oct 2009 17:29:59 +0000 (14:29 -0300)]
qemu-iotests: align test requests according to cluster size

Change the io_test and io_test2 functions to take the cluster size of the image
and the number of test requests to issue. Tests are changed to specify a
cluster size (usually 4k), but expected test results stay the same for now
(apart from qemu-img printing the cluster size now).

Based on a patch written by Christoph Hellwig.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add support for vdi format "static" option
Stefan Weil [Thu, 13 Aug 2009 16:49:48 +0000 (13:49 -0300)]
qemu-iotests: add support for vdi format "static" option

VDI supports an image option 'static'.
Ignore "static=off" from qemu-img output.

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: fix expected result for 019 after qemu-io change
Kevin Wolf [Mon, 27 Jul 2009 11:12:40 +0000 (13:12 +0200)]
qemu-iotests: fix expected result for 019 after qemu-io change

The output of the alloc command in qemu-io has changed.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test bdrv_load/save_vmstate
Kevin Wolf [Mon, 20 Jul 2009 12:36:47 +0000 (14:36 +0200)]
qemu-iotests: test bdrv_load/save_vmstate

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: common.pattern: allow spaces in io() operation
Kevin Wolf [Mon, 20 Jul 2009 12:35:43 +0000 (14:35 +0200)]
qemu-iotests: common.pattern: allow spaces in io() operation

We need to be able to pass "write -b" as an operation to the pattern testing
functions. Unfortunately, this contains a space character...

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test invalid pattern argument handling in qemu-io
Christoph Hellwig [Mon, 20 Jul 2009 12:33:53 +0000 (14:33 +0200)]
qemu-iotests: test invalid pattern argument handling in qemu-io

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
12 years agoqemu-iotests: replace FSF postal addresses with www.gnu.org links
Christoph Hellwig [Thu, 16 Jul 2009 17:26:54 +0000 (19:26 +0200)]
qemu-iotests: replace FSF postal addresses with www.gnu.org links

Blue Swirl notices that we were using the old FSF post address in the
license boilerplates.  Replace both the old and new address with links
to the gnu.org licenses homepage as suggested by Ben Pfaff.

Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test commiting changes to backing file
Kevin Wolf [Thu, 16 Jul 2009 17:11:58 +0000 (19:11 +0200)]
qemu-iotests: test commiting changes to backing file

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test qemu-img convert with backing file for the output image
Kevin Wolf [Thu, 16 Jul 2009 17:11:09 +0000 (19:11 +0200)]
qemu-iotests: test qemu-img convert with backing file for the output image

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test merge of backing file when converting
Kevin Wolf [Thu, 16 Jul 2009 17:09:41 +0000 (19:09 +0200)]
qemu-iotests: test merge of backing file when converting

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: simple backing file test
Kevin Wolf [Thu, 16 Jul 2009 17:08:22 +0000 (19:08 +0200)]
qemu-iotests: simple backing file test

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: test I/O after EOF for growable files
Christoph Hellwig [Thu, 16 Jul 2009 16:43:09 +0000 (18:43 +0200)]
qemu-iotests: test I/O after EOF for growable files

Signed-off-by: Christoph Hellwig <[email protected]>
Reviwed-by: Kevin Wolf <[email protected]>
12 years agoqemu-iotests: fix pattern for write test
Stefan Weil [Tue, 14 Jul 2009 21:16:00 +0000 (23:16 +0200)]
qemu-iotests: fix pattern for write test

The write pattern value 0axb is invalid and evaluates to 0,
so the read check (which uses a correct value of 0xab) will fail.

This failure will only be detected with a separate patch for
qemu-io. Without it, qemu-io cannot interpret hex values
and always uses a pattern value of 0.

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: make a few more tests generic
Christoph Hellwig [Thu, 9 Jul 2009 13:26:11 +0000 (15:26 +0200)]
qemu-iotests: make a few more tests generic

Pretend that a non-implemented check is always successful and thus allow
various tests that were qcow2-specific before to be generic.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
12 years agoqemu-iotests: remove test image after 015 is done
Christoph Hellwig [Wed, 8 Jul 2009 19:39:57 +0000 (21:39 +0200)]
qemu-iotests: remove test image after 015 is done

Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add support for the vdi image format
Christoph Hellwig [Mon, 6 Jul 2009 09:48:30 +0000 (11:48 +0200)]
qemu-iotests: add support for the vdi image format

Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: add test for refcount table growth and snapshots
Kevin Wolf [Fri, 3 Jul 2009 15:45:56 +0000 (17:45 +0200)]
qemu-iotests: add test for refcount table growth and snapshots

015: Combined test to grow the refcount table and test snapshots.

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
12 years agoqemu-iotests: skip test 005 for vpc format images
Christoph Hellwig [Fri, 3 Jul 2009 15:41:58 +0000 (17:41 +0200)]
qemu-iotests: skip test 005 for vpc format images

The vpc format doesn't support large enough image size for this test.

Signed-off-by: Kevin Wolf <[email protected]>
12 years agoqemu-iotests: Initial import into the public repository.
Christoph Hellwig [Mon, 22 Jun 2009 16:29:05 +0000 (18:29 +0200)]
qemu-iotests: Initial import into the public repository.

Signed-off-by: Kevin Wolf <[email protected]>
12 years agoMakefile: Add dependency to fix linux-user-only build
Peter Maydell [Tue, 21 Feb 2012 14:44:40 +0000 (14:44 +0000)]
Makefile: Add dependency to fix linux-user-only build

Make qemu-bridge-helper explicitly depend on $(GENERATED_HEADERS)
so that it doesn't fail to build when we configured for linux-user
targets only. (Build breakage introduced in commit 7b93fad.)

Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoMake kernel, initrd and append be machine_opts
Peter Maydell [Wed, 8 Feb 2012 05:41:39 +0000 (05:41 +0000)]
Make kernel, initrd and append be machine_opts

Make kernel, initrd, append be machine opts (ie -machine kernel=foo)
with the old plain command line arguments as legacy/convenience
equivalents.

Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agojazz-led: compile it only twice
Hervé Poussineau [Fri, 17 Feb 2012 19:27:17 +0000 (20:27 +0100)]
jazz-led: compile it only twice

Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agojazz-led: convert to QOM
Hervé Poussineau [Fri, 17 Feb 2012 19:27:16 +0000 (20:27 +0100)]
jazz-led: convert to QOM

Some simplifications in I/O functions are possible because
Jazz LED only registers one byte of I/O.

Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agojazz-led: use trace framework
Hervé Poussineau [Fri, 17 Feb 2012 19:27:15 +0000 (20:27 +0100)]
jazz-led: use trace framework

Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoqom: Fix object_initialize_with_type() assertion
Andreas Färber [Sun, 19 Feb 2012 23:49:07 +0000 (00:49 +0100)]
qom: Fix object_initialize_with_type() assertion

Assert the object is at least sizeof(Object), not sizeof(ObjectClass).

Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agopci: set memory type for memory behind the bridge
Michael S. Tsirkin [Tue, 21 Feb 2012 13:57:58 +0000 (15:57 +0200)]
pci: set memory type for memory behind the bridge

As we make upper bits in IO and prefetcheable memory
registers writeable, we should declare support
for 64 bit prefetcheable memory and 32 bit io
in the bridge.

This changes the default for apb, dec, but I'm guessing
they got the defaults wrong by accident.
Alternatively, we could let bridges declare lack of
64 bit support and make the upper bits read-only zero.

With this applied, we can drop these bits
from express code.

Reported-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Could someone familiar with apb,dec ack this please?
Signed-off-by: Anthony Liguori <[email protected]>
12 years agopci: add accessors to get/set registers by mask
Michael S. Tsirkin [Tue, 21 Feb 2012 13:41:30 +0000 (15:41 +0200)]
pci: add accessors to get/set registers by mask

pci_regs.h specifies many registers by mask +
shifted register values.
There's always some duplication when using such:
for example to override device type, we would need:

pci_word_test_and_clear_mask(cap + PCI_EXP_FLAGS,
     PCI_EXP_FLAGS_TYPE);
pci_word_test_and_set_mask(cap + PCI_EXP_FLAGS,
    PCI_EXP_TYPE_ENDPOINT << (ffs(PCI_EXP_FLAGS_TYPE) - 1));

Getting such registers also uses some duplication:

word = pci_get_word(cap + PCI_EXP_FLAGS) & PCI_EXP_FLAGS_TYPE;
if ((word >> ffs((PCI_EXP_FLAGS_TYPE) - 1)) == PCI_EXP_TYPE_ENDPOINT)

Add API to access such registers in one line:
pci_set_word_by_mask(cap + PCI_EXP_FLAGS, PCI_EXP_FLAGS_TYPE,
     PCI_EXP_TYPE_ENDPOINT)

and
word = pci_get_word_by_mask(cap + PCI_EXP_FLAGS, PCI_EXP_FLAGS_TYPE)
if (word == PCI_EXP_TYPE_ENDPOINT)

Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoqom: Document ways to retrieve child object added by object_property_add_child()
Alexander Barabash [Tue, 21 Feb 2012 10:14:22 +0000 (12:14 +0200)]
qom: Document ways to retrieve child object added by object_property_add_child()

object_property_add_child() creates a property whose values as a string is
the child object's canonical path.

Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Alexander Barabash <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agopc_piix/pc_sysfw: enable flash by default
Jordan Justen [Wed, 22 Feb 2012 07:18:56 +0000 (23:18 -0800)]
pc_piix/pc_sysfw: enable flash by default

Now, the pc-sysfw:rom_only property will default
to false which enables flash by default.

All pc types below pc-1.1 set rom_only to true.
This prevents flash from being enabled on these
pc machine types.

For pc-1.1 rom_only will use the default (false),
which will allow flash to be used for pc-1.1.

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agohw/pc_piix: add pc-1.1
Jordan Justen [Wed, 22 Feb 2012 07:18:55 +0000 (23:18 -0800)]
hw/pc_piix: add pc-1.1

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agohw/pc_piix: remove is_default for pc-0.15
Jordan Justen [Wed, 22 Feb 2012 07:18:54 +0000 (23:18 -0800)]
hw/pc_piix: remove is_default for pc-0.15

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agohw/pc_sysfw: support system flash memory with pflash
Jordan Justen [Wed, 22 Feb 2012 07:18:53 +0000 (23:18 -0800)]
hw/pc_sysfw: support system flash memory with pflash

Flash can be enabled by calling pc_system_firmware_init
with the system_flash_enabled parameter being non-zero.
If system_flash_enabled is zero, then the older qemu
rom creation method will be used.

If flash is enabled and a pflash image is found, then
it is used for the system firmware image.

If flash is enabled and a pflash image is not initially
found, then a read-only pflash device is created using
the -bios filename.

KVM cannot execute from a pflash region currently.
Therefore, when KVM is enabled, the old rom based
initialization method is used.

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agohw/pc_sysfw: enable pc-sysfw as a qdev
Jordan Justen [Wed, 22 Feb 2012 07:18:52 +0000 (23:18 -0800)]
hw/pc_sysfw: enable pc-sysfw as a qdev

Setup a pc-sysfw device type.  It contains a single
property of 'rom_only' which is defaulted to enabled.

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agohw/pc: move rom init to pc_sysfw.c
Jordan Justen [Wed, 22 Feb 2012 07:18:51 +0000 (23:18 -0800)]
hw/pc: move rom init to pc_sysfw.c

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agovl: make find_default_machine externally visible
Jordan Justen [Wed, 22 Feb 2012 07:18:50 +0000 (23:18 -0800)]
vl: make find_default_machine externally visible

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agopflash_cfi01/02: support read-only pflash devices
Jordan Justen [Wed, 22 Feb 2012 07:18:49 +0000 (23:18 -0800)]
pflash_cfi01/02: support read-only pflash devices

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoblockdev: allow read-only pflash devices
Jordan Justen [Wed, 22 Feb 2012 07:18:48 +0000 (23:18 -0800)]
blockdev: allow read-only pflash devices

Signed-off-by: Jordan Justen <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
12 years agoMerge remote-tracking branch 'bonzini/qdev-props-for-anthony' into staging
Anthony Liguori [Wed, 22 Feb 2012 13:35:03 +0000 (07:35 -0600)]
Merge remote-tracking branch 'bonzini/qdev-props-for-anthony' into staging

* bonzini/qdev-props-for-anthony:
  qdev: drop unnecessary parse/print methods
  qdev: use built-in QOM string parser
  qdev: accept hex properties only if prefixed by 0x
  qdev: accept both strings and integers for PCI addresses
  qom: add generic string parsing/printing
  qapi: add tests for string-based visitors
  qapi: add string-based visitors
  qapi: drop qmp_input_end_optional
  qapi: allow sharing enum implementation across visitors

12 years agovirtio-scsi: add basic SCSI bus operation
Paolo Bonzini [Mon, 14 Nov 2011 15:58:41 +0000 (16:58 +0100)]
virtio-scsi: add basic SCSI bus operation

Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
12 years agovirtio-scsi: Add basic request processing infrastructure
Stefan Hajnoczi [Sun, 13 Feb 2011 10:55:52 +0000 (10:55 +0000)]
virtio-scsi: Add basic request processing infrastructure

Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
12 years agovirtio-scsi: Add virtio-scsi stub device
Stefan Hajnoczi [Fri, 11 Feb 2011 08:40:59 +0000 (08:40 +0000)]
virtio-scsi: Add virtio-scsi stub device

Add a useless virtio SCSI HBA device:

  qemu -device virtio-scsi-pci

Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoscsi-disk: add migration support
Paolo Bonzini [Thu, 15 Dec 2011 12:24:47 +0000 (07:24 -0500)]
scsi-disk: add migration support

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoscsi-generic: add migration support
Paolo Bonzini [Thu, 15 Dec 2011 12:24:30 +0000 (07:24 -0500)]
scsi-generic: add migration support

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoscsi: add SCSIDevice vmstate definitions
Paolo Bonzini [Fri, 2 Dec 2011 15:27:02 +0000 (16:27 +0100)]
scsi: add SCSIDevice vmstate definitions

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoscsi-disk: enable scatter/gather functionality
Paolo Bonzini [Wed, 12 Oct 2011 13:12:14 +0000 (15:12 +0200)]
scsi-disk: enable scatter/gather functionality

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoscsi: add scatter/gather functionality
Paolo Bonzini [Wed, 6 Jul 2011 09:26:47 +0000 (11:26 +0200)]
scsi: add scatter/gather functionality

Scatter/gather functionality uses the newly added DMA helpers.  The
device can choose between doing DMA itself, or calling scsi_req_data
as usual, which will use the newly added DMA helpers to copy piecewise
to/from the destination area(s).

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoscsi: pass residual amount to command_complete
Paolo Bonzini [Wed, 6 Jul 2011 09:55:37 +0000 (11:55 +0200)]
scsi: pass residual amount to command_complete

With the upcoming sglist support, HBAs will not see any transfer_data
call and will not have a way to detect short transfers.  So pass the
residual amount of data upon command completion.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoahci: use new DMA helpers
Paolo Bonzini [Thu, 15 Dec 2011 13:32:04 +0000 (08:32 -0500)]
ahci: use new DMA helpers

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agodma-helpers: add accounting wrappers
Paolo Bonzini [Mon, 5 Sep 2011 12:20:29 +0000 (14:20 +0200)]
dma-helpers: add accounting wrappers

The length of the transfer is already in the sglist, the wrapper simply
fetches it.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agodma-helpers: add dma_buf_read and dma_buf_write
Paolo Bonzini [Wed, 6 Jul 2011 06:02:14 +0000 (08:02 +0200)]
dma-helpers: add dma_buf_read and dma_buf_write

These helpers do a full transfer from an in-memory buffer to target
memory, with support for scatter/gather lists.  It will be used to
store the reply of an emulated command into a QEMUSGList provided by
the adapter.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agodma-helpers: make QEMUSGList target independent
Paolo Bonzini [Wed, 9 Nov 2011 15:58:30 +0000 (16:58 +0100)]
dma-helpers: make QEMUSGList target independent

scsi-disk will manage scatter/gather list, but it does not create
single entries so it remains target-independent.  Make QEMUSGList
available to it.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqdev: drop unnecessary parse/print methods
Paolo Bonzini [Thu, 9 Feb 2012 09:12:21 +0000 (10:12 +0100)]
qdev: drop unnecessary parse/print methods

More qdev printers could have been removed in the previous series, and
object_property_parse also made several parsers unnecessary.  In fact,
the new code is even more robust with respect to overflows, so clean
them up!

Signed-off-by: Paolo Bonzini <[email protected]>
This page took 0.082815 seconds and 4 git commands to generate.