Commit Graph

27829 Commits

Author SHA1 Message Date
Ed Maste f5aac8e07f block/m25p80: Update Micron entries
- Split 32Mb and 256Mb parts into a11 and a13 variants.
- Add the 4K sector flag to the 128Mb parts.  (These entries were taken from
  the Linux kernel list, which is missing the flag.)
- Fill out the table of sizes with entries for 64Mb parts.

Prodded by Peter Crosthwaite.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-19 12:52:03 +04:00
Cole Robinson 805695daf6 Fix command example in qemu.sasl
sasldblistusers2 doesn't have a '-a' option

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-19 12:52:03 +04:00
Michael Tokarev 0e44486cdc slirp: remove mbuf(m_hdr,m_dat) indirection 2013-07-19 12:52:03 +04:00
Petar Jovanovic 43be134366 linux-user: declare sys_futex to have 6 arguments
sys_futex has 6 arguments, and all of these need to be copied. Fix incorrect
declaration in the mips_syscall_args array.

This change fixes the cases where the 5th and 6th arguments have non-zero
value and have importance. An example is a Linux implementation of
pthread_cond_wait() function.

Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-19 12:52:03 +04:00
Peter Lieven a23fdf3559 block/raw: add .bdrv_get_info
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 15:27:37 +08:00
Peter Lieven 4e7395e84f block: fix bdrv_read_unthrottled()
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:22 +08:00
Kevin Wolf 594a45ce64 cpus: Let vm_stop[_force_state]() always flush block devices
Even if the VM is already stopped, we cannot assume that all data has
already been successfully flushed to disk. The flush during the previous
vm_stop() could have failed.

Run bdrv_flush_all() unconditionally so that we get an error each time
if the block device isn't really flushed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Peter Lieven 323004a39d block-migration: efficiently encode zero blocks
this patch adds a efficient encoding for zero blocks by
adding a new flag indicating a block is completely zero.

additionally bdrv_write_zeros() is used at the destination
to efficiently write these zeroes. depending on the implementation
this avoids that the destination target gets fully provisioned.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Peter Lieven 8bf9344ad6 block/raw: add bdrv_co_write_zeroes
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Peter Lieven 4105eaaab9 block: add bdrv_write_zeroes()
Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Fam Zheng 78f27bd02c block: fix vvfat error path for enable_write_target
s->qcow and s->qcow_filename are allocated but not freed on error. Fix the
possible leaks, remove unnecessary check for bdrv_new(), propagate ret code of
bdrv_create() and also the one of enable_write_target().

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Liu Ping Fan dcc772e2f2 QEMUBH: make AioContext's bh re-entrant
BH will be used outside big lock, so introduce lock to protect
between the writers, ie, bh's adders and deleter. The lock only
affects the writers and bh's callback does not take this extra lock.
Note that for the same AioContext, aio_bh_poll() can not run in
parallel yet.

Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Stefan Hajnoczi 9154b02c53 dataplane: sync virtio.c and vring.c virtqueue state
Load the virtio.c state into vring.c when we start dataplane mode and
vice versa when stopping dataplane mode.  This patch makes it possible
to start and stop dataplane any time while the guest is running.

This will eventually allow us to go back to QEMU main loop for
bdrv_drain_all() and live migration.  In the meantime, this patch makes
the dataplane lifecycle more robust but should make no visible
difference.  It may be useful in the virtio-net dataplane effort.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Bharata B Rao 0c14fb47ec gluster: Add discard support for GlusterFS block driver.
Implement bdrv_aio_discard for gluster.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Bharata B Rao e01bee0881 gluster: Use pkg-config to configure GlusterFS block driver
Use pkg-config to determine the version and library dependency
for GlusterFS block driver.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Markus Armbruster 24943978cb boot-order-test: Add tests for Sun4u
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-13-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:47 -05:00
Markus Armbruster 26491a388c libqos: Generalize I/O-mapped fw_cfg
Provide a constructor that takes the base address in addition to the
PC-specific one.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-12-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:47 -05:00
Markus Armbruster f88dc7dd4d boot-order-test: Add tests for Sun4m
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-11-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:47 -05:00
Markus Armbruster e99f87cc86 boot-order-test: Add tests for PowerPC PREP
Cc: Andreas Färber <afaerber@suse.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-10-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:47 -05:00
Markus Armbruster 484986e242 boot-order-test: Code motion for better readability
Cc: Andreas Färber <afaerber@suse.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-9-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:47 -05:00
Markus Armbruster aea6a16907 boot-order-test: Better separate target-specific and generic parts
The initial version did just PC.  I didn't bother to separate out
generic parts, because I don't like to abstract from a single case.

Now we have two cases, PC and PowerMac, and I'm about to add more.
Time to do it right.

To ease review, this commit changes the code in-place, and the next
commit reorders it for better readability.

Cc: Andreas Färber <afaerber@suse.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-8-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:47 -05:00
Markus Armbruster 995b0e136f boot-order-test: Cover -boot once in ppc tests
Cc: Andreas Färber <afaerber@suse.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-7-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:46 -05:00
Andreas Färber 530a7e48bc boot-order-test: Add tests for PowerMacs
They set the boot device via fw_cfg, which is then translated to a boot
path of "hd" or "cd" in OpenBIOS.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-6-git-send-email-armbru@redhat.com
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Converted to libqos/fw_cfg on Anthony's request.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:46 -05:00
Markus Armbruster 7a10016509 libqos: Add support for memory-mapped fw_cfg
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-5-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:46 -05:00
Anthony Liguori db2b5500c9 libqos: include dependencies
Otherwise rebuilds can fail when libqos is modified.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-4-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:46 -05:00
Markus Armbruster edbd790d20 boot-order-test: New; covering just PC for now
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-3-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:46 -05:00
Markus Armbruster ba646ff6a3 qtest: Don't reset on qtest chardev connect
libqtest's qtest_init() connecting to the qtest socket triggers reset.
This was coded in the hope we could use the same QEMU process for
multiple tests that way.  Never used.  Injects an extra reset even
when it's not used, and that can mess up tests such as the one of
-boot once I'm about to add.  Drop it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1372254743-15808-2-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 13:27:46 -05:00
Markus Armbruster 1d9358e686 libqtest: New qtest_end() to go with qtest_start()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1371711329-9144-3-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 11:32:55 -05:00
Markus Armbruster fdd26fca3c libqtest: Plug fd and memory leaks in qtest_quit()
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Message-id: 1371711329-9144-2-git-send-email-armbru@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 11:32:54 -05:00
Laszlo Ersek 293d2a0014 monitor: maintain at most one G_IO_OUT watch
When monitor_flush() is invoked repeatedly outside the monitor_unblocked()
callback, for example from tlb_info() -> ... -> print_pte(), several
watches may be added for the same event.

This is no problem per se because the extra monitor_unblocked() callbacks
are harmless if mon->outbuf is empty, the watches will be removed
gradually. However a big number of watches can grow "gpollfds" without
limit in glib_pollfds_fill(), triggering a -1/EINVAL condition in
g_poll().

Keep at most one such watch, by following the pattern observable in eg.
commits c874ea97 and c3d6b96e. The change has no effect when
monitor_unblocked() calls monitor_flush() (when the watch can either be
removed or renewed 1-for-1), but non-callback contexts won't create an
additional watch when the monitor already has one.

Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=970047

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1373998781-29561-3-git-send-email-lersek@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 11:22:57 -05:00
Laszlo Ersek ac8c26f633 char: io_channel_send: don't lose written bytes
The g_io_channel_write_chars() documentation states,

  bytes_written: The number of bytes written. This can be nonzero even if
                 the return value is not G_IO_STATUS_NORMAL. [...]

io_channel_send() could lose such bytes before.

Furthermore, the (status == G_IO_STATUS_EOF) condition used to evaluate to
constant false whenever it was reached. When that condition actually held,
it always led to -1 / EINVAL. This patch (almost) distinguishes
G_IO_STATUS_EOF only when no bytes have been written, and then treats it
as an error.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1373998781-29561-2-git-send-email-lersek@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 11:22:56 -05:00
Peter Maydell 0d185e6388 configure: Provide more helpful message if libvte not present
If the system has GTK but not libvte, it's more helpful to
tell the user that libvte is missing than to simply say that
GTK is not present.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1374162121-31582-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 11:21:42 -05:00
Richard Henderson b957a1b03c pc-bios: Update palcode-clipper
Update image to c87a92639b28ac42bc8f6c67443543b405dc479b,
incorporating changes for vm_time.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-07-18 08:17:42 -07:00
Richard Henderson 19e0cbb82f target-alpha: Move alarm to vm_clock
Basing the alarm off the rtc_clock was silly.  It leads to horrible
spinning in the guest after being suspended and resumed, as it tries
to catch up with lost ticks.

This requires adding an accessor for reading the vm_clock too.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-07-18 06:44:55 -07:00
Anthony Liguori 28199c48ed vfio: enhanced VGA quirks + AER error containment
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJR5x0qAAoJECObm247sIsim6oP/0n8kUWulJ5v4YUhG6qfpj4e
 5m4PsTUxCCPHjQCeGpooCynMI7qI3fcLTHzZsEY6UrF9wBkPwr0Yjq6lup4tIZt9
 O0USvRAJQHTe/htKfnz3I5yZeRlzlavmuyAqHVJbBTKMBNmCb3omm3U+GnonUb8q
 7SGNF9+NzM+5+O9OjsL7JrShkr7FMuzGR4W5nlKoQdcUyjJpqEYwa2Gmt52atLsn
 EqGOwVi7LCQAileb1j65yWsr71Y7qvz+h8gV1TQi+zdxw09ix64lzZahcZAcgdrn
 X4RSlqQs1PbmW+ddbXj+LmeH4UdNRlimp3gCdsSaDmqmnlPlT0IcVHaJdDgv/6Ea
 SuAPf2GeuRCpHzmfBFNFvmbHus6VWpad4K63L3bXKrwiNwX9hFodpCAH8HfNusff
 szxiF5DM+1+DcpOKUd9g+/t5LChV5n2RYUWABV54UcqTUkeUy0qNpAFLiinsaL3L
 +oAHJtP+ejf3Hbs2ccygvxU8BeWH64MojGxrBgY2Yj5kfWCxEdOjS9X2iWXS9NLt
 ZdFdwH6JQ/LIfyDfE8igVFdCnH4hoA4PzG5Bzi4SZx76uW+ZGRvSaQ8kOgCMP8jq
 6MS2hu4KUMdVNnf2w8IcnoliFK3/y1kxcEbl+0hasKoyf7/7tlLDajKSi7a7DVZ7
 +r7GqWMsLDi4wzYAKMBr
 =pxjI
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'awilliam/tags/vfio-for-qemu-1.6' into staging

vfio: enhanced VGA quirks + AER error containment

# gpg: Signature made Wed 17 Jul 2013 05:39:38 PM CDT using RSA key ID 3BB08B22
# gpg: Can't check signature: public key not found

# By Alex Williamson (1) and Vijay Mohan Pandarathil (1)
# Via Alex Williamson
* awilliam/tags/vfio-for-qemu-1.6:
  vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devices
  vfio-pci: VGA quirk update

Message-id: 20130717224939.4763.87264.stgit@bling.home
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 08:14:22 -05:00
Anthony Liguori bbcf59bc4b Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Amos Kong (1) and Luiz Capitulino (1)
# Via Luiz Capitulino
* luiz/queue/qmp:
  qmp: update send-key document
  qapi: qapi-commands: fix possible leaks on visitor dealloc

Message-id: 1374093679-29213-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 08:14:11 -05:00
Anthony Liguori 5ab4dba4da Merge remote-tracking branch 'bonzini/scsi-next' into staging
# By Peter Lieven (4) and Ronnie Sahlberg (1)
# Via Paolo Bonzini
* bonzini/scsi-next:
  iscsi: factor out sector conversions
  iscsi: assert that sectors are aligned to LUN blocksize
  iscsi: remove support for misaligned nb_sectors in aio_readv
  iscsi: fix -ENOSPC in iscsi_create()
  Fix iSCSI crash on SG_IO with an iovector

Message-id: 1374073524-8469-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 08:13:50 -05:00
Anthony Liguori e9acb8cea9 pci,net,pc enhancements
This includes some fixes and enhancements that accumulated in my tree:
 pci fixes by dkoch, virtio-net enhancements by akong and mst,
 and a fix for xen pc by mst.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQEcBAABAgAGBQJR5meNAAoJECgfDbjSjVRp24IIAMOkxbb85FJ323G/x5cQBzA/
 gjFDmvB6geIMBorX1YZRnIM+RFhx+mkXtBTu2raWVTNTt5G2u3vAQQWW2zSiOTBL
 gH4BhzJnUoqLHOydWql2MsGS7DMQo4Fq8OnzRBkZ119AEEqNMad1w2LykwFWs4ra
 k3bsPNCZM+ZNiLMWtQLOcD3FYvoiISinqFd81KOnxvDiT90rczk4dLWqjv8smNif
 WqZ7aCD1hGJ5yD7JI2YjCbhVvu4F7tBK+fWkT/O3oYslh/o241lyxUriOXMKdKML
 04sNXa5eWue9cOKlbo1G+yfFwFg1JDsAMe/Usg0KXz1MMK91wiWE763ESPbFBK0=
 =P+pr
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci,net,pc enhancements

This includes some fixes and enhancements that accumulated in my tree:
pci fixes by dkoch, virtio-net enhancements by akong and mst,
and a fix for xen pc by mst.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Wed 17 Jul 2013 04:44:45 AM CDT using RSA key ID D28D5469
# gpg: Can't check signature: public key not found

# By Don Koch (2) and others
# Via Michael S. Tsirkin
* mst/tags/for_anthony:
  pc: don't access fw cfg if NULL
  virtio-net: add feature bit for any header s/g
  net: add support of mac-programming over macvtap in QEMU side
  pci: fix BRDIGE typo
  pci-bridge: update mappings for migration/restore

Message-id: 1374054430-21966-1-git-send-email-mst@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 08:12:47 -05:00
Paolo Bonzini e1622f4b15 exec: fix incorrect assumptions in memory_access_size
access_size_min can be 1 because erroneous accesses must not crash
QEMU, they should trigger exceptions in the guest or just return
garbage (depending on the CPU).  I am not sure I understand the
comment: placing a 4-byte field at the last byte of a region
makes no sense (unless impl.unaligned is true), and that is
why memory.c:access_with_adjusted_size does not bother with
minimums larger than the remaining length.

access_size_max can be mr->ops->valid.max_access_size because memory.c
can and will still break accesses bigger than
mr->ops->impl.max_access_size.

Reported-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-18 06:03:25 +02:00
Jan Kiszka 9b8c692435 memory: Return -1 again on reads from unsigned regions
This restore the behavior prior to b018ddf633 which accidentally changed
the return code to 0. Specifically guests probing for register existence
were affected by this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-18 06:03:25 +02:00
Paolo Bonzini b4afea11aa memory: actually set the owner
Brown paper bag for me.  Originally commit 803c0816 came before commit
2c9b15c.  When the order was inverted, I left in the NULL initialization
of mr->owner.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-18 06:03:25 +02:00
Peter Maydell cb85f7ab04 exec.c: Pass correct pointer type to qemu_ram_ptr_length
Commit e3127ae0 introduced a problem where we're passing a
hwaddr* to qemu_ram_ptr_length() but it wants a ram_addr_t*;
this will cause problems on 32 bit hosts and in any case
provokes a clang warning on MacOSX:

  CC    arm-softmmu/exec.o
exec.c:2164:46: warning: incompatible pointer types passing 'hwaddr *'
(aka 'unsigned long long *') to parameter of type 'ram_addr_t *'
(aka 'unsigned long *')
[-Wincompatible-pointer-types]
    return qemu_ram_ptr_length(raddr + base, plen);
                                             ^~~~
exec.c:1392:63: note: passing argument to parameter 'size' here
static void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size)
                                                              ^

Since this function is only used in one place, change its
prototype to pass a hwaddr* rather than a ram_addr_t*,
rather than contorting the calling code to get the type right.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Riku Voipio <riku.voipio@linaro.org>
Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-18 06:03:25 +02:00
Markus Armbruster 3ba00637d0 trace-events: Fix up source file comments
They're all wrong since (at least) Paolo's big source tree
reorganization.  Need to shuffle some event declarations around to
keep them under the correct source file comment.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Markus Armbruster 3ae76d23d2 trace-events: Drop unused events
Dropped event                           Unused since
mirror_cow                              884fea4
paio_complete                           47e6b25
paio_cancel                             47e6b25
usb_ehci_data                           0ce668b
megasas_qf_dequeue                      never used
megasas_handle_frame                    never used
megasas_io_continue                     never used
megasas_iovec_map_failed                never used
megasas_dcmd_map_failed                 never used
milkymist_softusb_mouse_event           4c15ba9
xen_map_block                           6506e4f
xen_unmap_block                         6506e4f
qemu_spice_start                        67be672
qemu_spice_stop                         67be672

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Markus Armbruster 0ece9671fd milkymist-minimac2: Fix minimac2_read/_write tracepoints
Broken in milkymist-minimac.c from the start (commit 0742454),
faithfully moved to milkymist-minimac2.c (commit 57aa265).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Markus Armbruster f3a64b8c89 slavio_misc: Fix slavio_led_mem_readw/_writew tracepoints
Broken since they got added in commit 97bf485.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Markus Armbruster f0c03c8cf6 cleanup-trace-events.pl: New
Simple script to drop unused events and fix up source file comments.
The next few commits put it to use.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Amos Kong f9b1d9b20f qmp: update send-key document
commit 9f328977 changes qmp_send_key() to accept key codes in hex,
but the document wasn't updated. The items of keys list is union
now, not enum.

Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-07-17 16:00:26 -04:00
Peter Lieven 0777b5dde4 iscsi: factor out sector conversions
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-17 17:01:41 +02:00
Peter Lieven 91bea4e2bb iscsi: assert that sectors are aligned to LUN blocksize
if the blocksize of an iSCSI LUN is bigger than the BDRV_SECTOR_SIZE
it is possible that sector_num or nb_sectors are not correctly
aligned.

to avoid corruption we fail requests which are misaligned.

Signed-off-by: Peter Lieven <pl@kamp.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-17 17:01:41 +02:00