Commit Graph

15579 Commits (9af8025e24185172a8857ed9b32d1d0ccd6aa79b)

Author SHA1 Message Date
Tsuneo Saito b5176d279a SPARC64: treat UA2007 ASI_BLK_* as translating ASIs.
UA2007 ASI_BLK_* should be added in is_translating_asi().

Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
Acked-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 21:11:08 +00:00
Blue Swirl d0510af26d checkpatch: Fix bracing false positives on #if
789f88d0b2 only fixed #else,
fix also #if.

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 21:07:24 +00:00
Stefan Weil ea15fb0672 tcg/mips: Fix regression caused by typo (copy + paste bug)
cppcheck reports an error:
qemu/tcg/mips/tcg-target.c:1487: error: Invalid number of character (()

The unpatched code won't compile on mips hosts starting with commit
cea5f9a28f.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 21:03:37 +00:00
Hervé Poussineau cd3e2409a3 ds1225y: convert to qdev device, and use it in MIPS Jazz emulation
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 20:54:51 +00:00
Hervé Poussineau d43ed9ec25 ds1225y: use trace framework
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 20:54:50 +00:00
Hervé Poussineau 86f25c7c37 ds1225y: Remove protection stuff, which doesn't belong to this device
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 20:54:49 +00:00
Tsuneo Saito b7d69dc233 SPARC64: add missing break on fmovdcc
"break" is missing on V9 fmovdcc (%icc).

Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 20:44:50 +00:00
Tsuneo Saito afcb737512 SPARC64: fix VIS1 SIMD signed compare instructions
The destination registers of SIMD signed compare instructions
(fcmp*<16|32>) are not FP registers but general purpose r registers.
Comparisons should be freg_rs1 CMP freg_rs2, that were reversed.

Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-20 20:44:23 +00:00
Blue Swirl a3ce3668cc Merge branch 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
* 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
  target-arm: Fix BASEPRI, BASEPRI_MAX, and FAULTMASK access
  target-arm: Minimal implementation of performance counters
  Revert "Makefile.target: Allow target helpers to be in any *_helper.c file"
  Revert "target-arm: Use global env in neon_helper.c helpers"
  target-arm: Pass fp status pointer explicitly to neon fp helpers
  target-arm: Make VFP binop helpers take pointer to fpstatus, not CPUState
  target-arm: Add helper function to generate code to get fpstatus pointer
  Revert "target-arm: Use global env in iwmmxt_helper.c helpers"

Conflicts:
	Makefile.target
2011-07-20 20:23:01 +00:00
Gerd Hoffmann 98e51ec92e usb-serial doesn't support migration
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Gerd Hoffmann 4ab0ba9e26 usb-net doesn't support migration
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Gerd Hoffmann 2474e5052b usb-bt doesn't support migration
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Gerd Hoffmann ccce9fd205 usb-wacom doesn't support migration
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Gerd Hoffmann f54b656303 usb storage: first migration support bits.
Tag vmstate as unmigratable for the time being,
to be removed when mgration support is finished.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Gerd Hoffmann 9490fb0624 ehci doesn't support migration
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Gerd Hoffmann b7ce1b27f6 ahci doesn't support migration
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 14:49:41 +02:00
Jes Sorensen aaf55b4795 Add missing documentation for qemu-img -p
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-20 11:13:52 +02:00
Yonit Halperin 8927cfbba2 qxl: upon reset, if spice worker is stopped, the command rings can be not empty
Spice worker does no longer process commands when it is stopped.
Otherwise, it might crash during migration when attempting to process
commands while the guest is not completely loaded.

Cc: Alon Levy <alevy@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 10:08:53 +02:00
Gerd Hoffmann df9cb66942 spice: add sanity check for spice ports
Make sure at least one port (port=.. or tls-port=...)
is specified.  Also apply range checks to the port numbers.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 10:08:53 +02:00
Gerd Hoffmann 2837c8ea1f vmstate: add no_migrate flag to VMStateDescription
This allows to easily tag devices as non-migratable,
so any attempt to migrate a virtual machine with the
device in question active will make migration fail.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-20 09:23:33 +02:00
Kevin Wolf 93913dfd8a qcow2: Use Qcow2Cache in writeback mode during loadvm/savevm
In snapshotting there is no guest involved, so we can safely use a writeback
mode and do the flushes in the right place (i.e. at the very end). This
improves the time that creating/restoring an internal snapshot takes with an
image in writethrough mode.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:22 +02:00
Fam Zheng 4a1d5e1fde block: add bdrv_get_allocated_file_size() operation
qemu-img.c wants to count allocated file size of image. Previously it
counts a single bs->file by 'stat' or Window API. As VMDK introduces
multiple file support, the operation becomes format specific with
platform specific meanwhile.

The functions are moved to block/raw-{posix,win32}.c and qemu-img.c calls
bdrv_get_allocated_file_size to count the bs. And also added VMDK code
to count his own extents.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:08 +02:00
Fam Zheng ae261c86aa VMDK: fix coding style
Conform coding style in vmdk.c to pass scripts/checkpatch.pl checks.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:07 +02:00
Fam Zheng f66fd6c383 VMDK: create different subformats
Add create option 'format', with enums:
    monolithicSparse
    monolithicFlat
    twoGbMaxExtentSparse
    twoGbMaxExtentFlat
Each creates a subformat image file. The default is monolithicSparse.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:07 +02:00
Fam Zheng 7fa60fa377 VMDK: open/read/write for monolithicFlat image
Parse vmdk decriptor file and open mono flat image.
Read/write the flat extent.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:07 +02:00
Fam Zheng 91b85bd388 VMDK: change get_cluster_offset return type
The return type of get_cluster_offset was an offset that use 0 to denote
'not allocated', this will be no longer true for flat extents, as we see
flat extent file as a single huge cluster whose offset is 0 and length
is the whole file length.
So now we use int return value, 0 means success and otherwise offset
invalid.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:07 +02:00
Fam Zheng 69b4d86d9f VMDK: move 'static' cid_update flag to bs field
Cid_update is the flag for updating CID on first write after opening the
image. This should be per image open rather than per program life cycle,
so change it from static var of vmdk_write to a field in BDRVVmdkState.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:07 +02:00
Fam Zheng 333c574d05 VMDK: flush multiple extents
Flush all the file that referenced by the image.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:06 +02:00
Fam Zheng e1da9b2433 VMDK: add field BDRVVmdkState.desc_offset
There are several occurrence of magic number 0x200 as the descriptor
offset within mono sparse image file. This is not the case for images
with separate descriptor file. So a field is added to BDRVVmdkState to
hold the correct value.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:06 +02:00
Fam Zheng b4b3ab146c VMDK: separate vmdk_open by format version
Separate vmdk_open by subformats to:
* vmdk_open_vmdk3
* vmdk_open_vmdk4

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:06 +02:00
Fam Zheng 01fc99d6a8 VMDK: probe for monolithicFlat images
Probe as the same behavior as VMware does.
Recognize image as monolithicFlat descriptor file when the file is text
and the first effective line (not '#' leaded comment or space line) is
either 'version=1' or 'version=2'. No space or upper case charactors
accepted.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:06 +02:00
Fam Zheng 0e69c54394 VMDK: bugfix, align offset to cluster in get_whole_cluster
In get_whole_cluster, the offset is not aligned to cluster when reading
from backing_hd. When the first write to child is not at the cluster
boundary, wrong address data from parent is copied to child.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:06 +02:00
Fam Zheng b3976d3c8b VMDK: introduce VmdkExtent
Introduced VmdkExtent array into BDRVVmdkState, enable holding multiple
image extents for multiple file image support.

Signed-off-by: Fam Zheng <famcool@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:05 +02:00
Luiz Capitulino 69d7e218fd qemu-config: Document -drive options
Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:05 +02:00
Luiz Capitulino ae73e5919a qemu-options.hx: Document missing -drive options
They are 'werror', 'rerror' and 'readonly'.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:05 +02:00
Hannes Reinecke 3e1c0c9a4b scsi-disk: Mask out serial number EVPD
If the serial number is not set we should mask it out in the
list of supported VPD pages and mark it as not supported.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:05 +02:00
Hannes Reinecke 653c1c3fb6 scsi-disk: Fixup debugging statement
A debugging statement wasn't converted to the new interface.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:39:05 +02:00
Hannes Reinecke c5bf71a9a3 scsi: Add 'hba_private' to SCSIRequest
'tag' is just an abstraction to identify the command
from the driver. So we should make that explicit by
replacing 'tag' with a driver-defined pointer 'hba_private'.
This saves the lookup for driver handling several commands
in parallel.
'tag' is still being kept for tracing purposes.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-19 15:38:58 +02:00
Anthony Liguori 03ff09580e Merge remote-tracking branch 'agraf/xen-next' into staging 2011-07-19 08:04:35 -05:00
Anthony Liguori b4dabf9587 Merge remote-tracking branch 'kraxel/usb.19' into staging 2011-07-19 08:03:20 -05:00
Anthony Liguori de20fbcac9 Merge remote-tracking branch 'spice/spice.v38' into staging 2011-07-19 08:02:35 -05:00
Anthony Liguori 6734529435 Merge remote-tracking branch 'mst/for_anthony' into staging 2011-07-19 07:43:54 -05:00
Anthony Liguori 81773a5055 Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging 2011-07-19 07:43:51 -05:00
Hannes Reinecke 348e7b8dcd iov: Update parameter usage in iov_(to|from)_buf()
iov_to_buf() has an 'offset' parameter, iov_from_buf() hasn't.
This patch adds the missing parameter to iov_from_buf().
It also renames the 'offset' parameter to 'iov_off' to
emphasize it's the offset into the iovec and not the buffer.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-18 16:06:27 +02:00
Devin Nakamura 5afc8b3de9 qemu-io: Fix if scoping bug
Fix a bug caused by lack of braces in if statement

Lack of braces means that if(count & 0x1ff) is never reached

Signed-off-by: Devin Nakamura <devin122@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-18 16:06:27 +02:00
Devin Nakamura 43642b3803 qemu-io: Fix formatting
Replaced tabs with spaces, 8 space indentations with 4 space
indentation, and other fixes to better adhere to CODING_STYLE

Signed-off-by: Devin Nakamura <devin122@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-18 16:06:26 +02:00
MORITA Kazutaka a8e0fdd715 sheepdog: add full data preallocation support
This introduces qemu-img create option for sheepdog which allows the
data to be fully preallocated (note that sheepdog always preallocates
metadata).

The option is disabled by default and you need to enable it like the
following:

qemu-img create sheepdog:test -o preallocation=full 1G

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-18 16:06:26 +02:00
Amit Shah 0219d73283 virtio-console: Prevent abort()s in case of host chardev close
A host chardev could close just before the guest sends some data to be
written.  This will cause an -EPIPE error.  This shouldn't be propagated
to virtio-serial-bus.

Ideally we should close the port once -EPIPE is received, but since the
chardev interface doesn't return such meaningful values to its users,
all we get is -1 for any kind of error.  Just return 0 for now and wait
for chardevs to return better error messages to act better on the return
messages.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18 15:30:15 +05:30
Amit Shah 95c9cde2df virtio-serial-bus: Fix trailing \n in error_report string
Markus fixed offenders in the file but one instance sneaked in via
another patch.  Fix it.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18 15:30:15 +05:30
Amit Shah d02e4fa4a8 virtio-console: Add some trace events
Add some trace events for messages passed between the char layer and the
virtio-serial bus.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-07-18 15:30:14 +05:30