summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | xilinx_zynq: Added SD controllersPeter Crosthwaite2013-02-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Xilinx Zynq device has two SDHCI controllers. Added to the machine model. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | vl.c: allow for repeated -sd argumentsPeter Crosthwaite2013-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows for repeating of -sd arguments in the same way as -pflash and -mtdblock. Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | hw/sdhci: introduce standard SD host controllerIgor Mitsyanko2013-02-284-0/+1615
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device model for standard SD Host Controller Interface (SDHCI) compliant with version 2.00 of SD association specification. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | arm: a9mpcore: Coreify the SCUPeter Crosthwaite2013-02-283-113/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the SCU in a9mpcore out into its own object definition. mpcore is now just a container for the mpcore components. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | arm: a9mpcore: remove old_timer_status fieldPeter Crosthwaite2013-02-281-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This field was write only and thus unused. Removed. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | arm: mptimer: Remove WDT distinctionPeter Crosthwaite2013-02-283-64/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In QEMU emulation, there is no functional difference between the ARM mpcore private timers and watchdogs. Removed all the distinction between the two from arm_mptimer.c and converted it to be just the mptimer. a9mpcore and arm11mpcore just instantiate the same mptimer object twice to get both timer and WDT. If in the future we want to make the WDT functionally different then we can use either QOM hierarchy to derive WDT from from mptimer, or we can add a property "is-wdt" or some such. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | arm: arm11mpcore, a9mpcore: CamelCased type namesPeter Crosthwaite2013-02-282-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To conform with QEMU coding style. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | arm: mptimer: CamelCased type namesPeter Crosthwaite2013-02-281-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial find replace on type names "timerblock" and "arm_mptimer_state" to conform with QEMU coding style. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | | hw/pflash_cfi01: Treat read in unknown command state as readPeter Maydell2013-02-281-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for handling the default "unknown command state" case in pflash_read in pflash_cfi01.c comments "reset state & treat it as a read". However the code doesn't actually do this. Moving the default case to the top of the switch so it can fall through into the read case brings this file into line with pflash_cfi02 and makes the code behave as the comments suggest. The pflash_cfi01 code has always had this bug -- it was presumably introduced when the original author copied the cfi02 code and rearranged the order of the switch statement without noticing that the default case relied on the fall-through. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1358777318-7579-3-git-send-email-peter.maydell@linaro.org
* | | | hw/pflash_cfi01: Make read after byte-write or erase return statusPeter Maydell2013-02-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Intel flash command set requires that a read operation after doing a 'single byte write' command returns the status register; add this case to pflash_read() so we return the correct information. Similarly, the case for the 0x28 flavour of block erase was missing. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1358777318-7579-2-git-send-email-peter.maydell@linaro.org
* | | | hw/ds1338: Fix conversion between 12 hours and 24 hours modes.Antoine Mathys2013-02-281-4/+4
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The proper mapping between 24 hours and 12 hours modes is: 0 12 AM 1-11 1-11 AM 12 12 PM 13-23 1-11 PM Fix code accordingly. Signed-off-by: Antoine Mathys <barsamin@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | target-i386: Use mulu2 and muls2Richard Henderson2013-02-273-155/+56
|/ / | | | | | | | | | | | | These correspond very closely to the insns that we're emulating. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge remote-tracking branch 'kiszka/queues/slirp' into stagingAnthony Liguori2013-02-261-0/+1
|\ \ | | | | | | | | | | | | | | | | | | # By Jan Kiszka # Via Jan Kiszka * kiszka/queues/slirp: slirp: Properly initialize pollfds_idx of new sockets
| * | slirp: Properly initialize pollfds_idx of new socketsJan Kiszka2013-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise we may start processing sockets in slirp_pollfds_poll that were created past slirp_pollfds_fill. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
* | | glib: Add compat wrapper for g_poll on old glibAlexander Graf2013-02-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older glib doesn't implement g_poll(). Most notably the glib version in use on SLE11 is on 2.18 which is hit by this. We do want to use g_poll() in the source however. So on older systems, just wrap it with functions that do exist on older versions. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de> Message-id: 1361835970-2889-1-git-send-email-agraf@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | qemu-log: default to stderr for logging outputPeter Maydell2013-02-268-53/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch the default for qemu_log logging output from "/tmp/qemu.log" to stderr. This is an incompatible change in some sense, but logging is mostly used for debugging purposes so it shouldn't affect production use. The previous behaviour can be obtained by adding "-D /tmp/qemu.log" to the command line. This change requires us to: * update all the documentation/help text (we take the opportunity to smooth out minor inconsistencies between the phrasing in linux-user/bsd-user/system help messages) * make linux-user and bsd-user defer to qemu-log for the default logging destination rather than overriding it themselves * ensure that all logfile closing is done via qemu_log_close() and that that function doesn't close stderr as well as the obvious change to the behaviour of do_qemu_set_log() when no logfile name has been specified. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1361901160-28729-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | show --disable-gtk and --enable-gtk in the help messageHu Tao2013-02-261-0/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Message-id: 1361759268-16314-1-git-send-email-hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Add compat for GDK_KEY_XXX symbolsDaniel P. Berrange2013-02-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GDK_KEY_XXX symbols are new in GTK3 and only the most recent GTK2 releases. Most versions of GTK2 have simply used GDK_XXX Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-14-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Add compat macro for gtk_widget_get_realizedDaniel P. Berrange2013-02-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The gtk_widget_get_realized method only arrived in GTK 2.20, so defined a compat macro for earlier GTK Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-13-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Add support for enabling build with GTK3Daniel P. Berrange2013-02-261-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a arg to configure to switch from GTK2 (default) to GTK3 (optional) build for QEMU. ./configure --with-gtkabi=3.0 will choose GTK3, while ./configure --with-gtkabi=2.0 will choose GTK2 (and remains the current default) Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-12-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Ensure x_keymap.o is built when GTK is enabledDaniel P. Berrange2013-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The x_keymap.o file is required by both GTK and SDL builds, so it must be explicitly listed as a GTK dep to ensure the linker works when SDL is disabled Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-11-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Replace expose-event handler with draw handler in GTK3Daniel P. Berrange2013-02-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GTK3 the 'expose-event' signal has been replaced by a new 'draw' signal. The only difference is that the latter will pre-create the cairo drawing context & set the clip mask. Since the drawing code is already structured in a nice way, we can just wire up the 'gd_draw_event' method to the 'draw' signal in GTK3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-10-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Conditionalize use of gtk_widget_size_requestDaniel P. Berrange2013-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gtk_widget_size_request method has been replaced by the gtk_widget_get_preferred_size method in GTK3. Conditionally call the new method in GTK3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-9-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Conditionalize use of gdk_display_warp_pointerDaniel P. Berrange2013-02-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GTK3 the gdk_display_warp_pointer method is deprecated. Instead we should use gdk_device_warp on the GdkDevice instead associated with the event being processed. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-8-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Replace gtk_menu_append with gtk_menu_shell_appendDaniel P. Berrange2013-02-261-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gtk_menu_append method has long been deprecated in favour of the gtk_menu_shell_append method. The former is now entirely gone in GTK3, so switch all code to the latter which works on both GTK2 and GTK3 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-7-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Remove use of GtkVBox in GTK3Daniel P. Berrange2013-02-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GtkVBox class is deprecated, in favour of just using the GtkBox class directly. Eventually even GtkBox will be deprecated in favour of GtkGrid, but that is a bigger fix which can wait. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-6-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Conditionalize use of gdk_pointer_grab / gdk_pointer_ungrabDaniel P. Berrange2013-02-261-11/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On GTK3 there is support for multiple pointer devices, so rather than using gdk_pointer_grab / gdk_pointer_ungrab we should iterate over all devices, grabbing each one in turn Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-5-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Conditionalize use of gdk_keyboard_grab / gdk_keyboard_ungrabDaniel P. Berrange2013-02-261-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On GTK3 there is support for multiple keyboard devices, so rather than using gdk_keyboard_grab / gdk_keyboard_ungrab we should iterate over all devices, grabbing each one in turn Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-4-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Remove use of gdk_drawable_get_{screen, display}Daniel P. Berrange2013-02-261-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gdk_drawable_get_screen and gdk_drawable_get_display methods don't exist in GDK3. Fortunately, even on GTK2 they are not required - we can call the equivalent gtk_widget_get_screen/gtk_widget_get_display methods which have existed since GTK 2.2 Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-3-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | Add compat for gdk_drawable_get_size on GTK3Daniel P. Berrange2013-02-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | GTK3 lacks the gdk_drawable_get_size method, so we create a stub impl which gets the get_width/get_height mehtods instead Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1361805646-6425-2-git-send-email-berrange@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | gtk ui: unbreak spiceGerd Hoffmann2013-02-261-3/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | Merge of the gtk ui brought a initialitation order issue for spice: The using_spice variable isn't set yet when checked, leading to the default UI being activated (additionally to spice remote access). Let's set display_remote when we find a -spice switch on the command line, like we do for vnc. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1361804550-15858-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2013-02-2632-229/+1440
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Paolo Bonzini (7) and others # Via Kevin Wolf * kwolf/for-anthony: (22 commits) pc: add compatibility machine types for 1.4 blockdev: enable discard by default qemu-nbd: add --discard option blockdev: add discard suboption to -drive block: implement BDRV_O_UNMAP block: complete all IOs before .bdrv_truncate coroutine: trim down nesting level in perf_nesting test coroutine: move pooling to common code qemu-iotests: Test qcow2 image creation options qemu-iotests: Add qemu-img compare test qemu-img: Add compare subcommand qemu-img: Add "Quiet mode" option block: Add synchronous wrapper for bdrv_co_is_allocated_above block: refuse negative iops and bps values block: use Error in do_check_io_limits() qcow2: support compressed clusters in BlockFragInfo qemu-img: add compressed clusters to BlockFragInfo qemu-img: fix missing space in qemu-img check output qcow2: record fragmentation statistics during check qcow2: introduce check_refcounts_l1/l2() flags ...
| * | pc: add compatibility machine types for 1.4Paolo Bonzini2013-02-223-5/+63
| | | | | | | | | | | | | | | | | | | | | Adds both pc-i440fx-1.4 and pc-q35-1.4. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | blockdev: enable discard by defaultPaolo Bonzini2013-02-223-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because discard is now a host parameter, we can always fake it as enabled in the guest. This is an extension of the current choice to ignore "not supported" errors from the host when discard_granularity is set to nonzero. The default granularity is set to the logical block size or 4k, whichever is largest, because cluster sizes below 4k are rarely used and 4K is a typical block size for files. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-nbd: add --discard optionPaolo Bonzini2013-02-222-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | Similar to --cache and --aio, this option mimics the discard suboption of "-drive". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | blockdev: add discard suboption to -drivePaolo Bonzini2013-02-222-0/+13
| | | | | | | | | | | | | | | | | | | | | Add support for BDRV_O_UNMAP from the QEMU command-line. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | block: implement BDRV_O_UNMAPPaolo Bonzini2013-02-223-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is better to present homogeneous hardware independent of the storage technology that is chosen on the host, hence we make discard a host parameter; the user can choose whether to pass it down to the image format and protocol, or to ignore it. Using DISCARD with filesystems can cause very severe fragmentation, so it is left default-off for now. This can change later when we implement the "anchor" operation for efficient management of preallocated files. There is still one choice to make: whether DISCARD has an effect on the dirty bitmap or not. I chose yes, though there is a disadvantage: if the guest is buggy and issues discards for data that is in use, there will be no way to migrate storage for that guest without downgrading the machine type to an older one. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | block: complete all IOs before .bdrv_truncatePeter Lieven2013-02-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bdrv_truncate() invalidates the bdrv_check_request() result for in-flight requests, so there should better be none. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Reported-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | coroutine: trim down nesting level in perf_nesting testPaolo Bonzini2013-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 20000 nested coroutines require 20 GB of virtual address space. Only nest 1000 of them so that the test (only enabled with "-m perf" on the command line) runs on 32-bit machines too. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | coroutine: move pooling to common codePaolo Bonzini2013-02-223-86/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The coroutine pool code is duplicated between the ucontext and sigaltstack backends, and absent from the win32 backend. But the code can be shared easily by moving it to qemu-coroutine.c. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Test qcow2 image creation optionsKevin Wolf2013-02-223-0/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just create lots of images and try out each of the creation options that qcow2 provides (except backing_file/fmt for now) I'm not totally happy with the behaviour of qemu-img in each of the cases, but let's be explicit and update the test when we do change things later. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Add qemu-img compare testMiroslav Rezanina2013-02-223-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | Simple test for qemu-img compare to check it's working correctly. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-img: Add compare subcommandMiroslav Rezanina2013-02-223-1/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds new qemu-img subcommand that compares content of two disk images. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-img: Add "Quiet mode" optionMiroslav Rezanina2013-02-226-71/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | There can be a need to turn output to stdout off. This patch adds a -q option that enable "Quiet mode". In Quiet mode, only errors are printed out. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: Add synchronous wrapper for bdrv_co_is_allocated_aboveMiroslav Rezanina2013-02-222-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no synchronous wrapper for bdrv_co_is_allocated_above function so it's not possible to check for sector allocation in an image with a backing file. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: refuse negative iops and bps valuesStefan Hajnoczi2013-02-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Negative I/O throttling iops and bps values do not make sense so reject them with an error message. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: use Error in do_check_io_limits()Stefan Hajnoczi2013-02-221-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The do_check_io_limits() function returns false when I/O limits are invalid but it doesn't set an Error to indicate why. The two do_check_io_limits() callers duplicate error reporting. Solve this by passing an Error pointer into do_check_io_limits(). Note that the two callers report slightly different errors: drive_init() prints a custom error message while qmp_block_set_io_throttle() does error_set(errp, QERR_INVALID_PARAMETER_COMBINATION). QERR_INVALID_PARAMETER_COMBINATION is a generic error, see include/qapi/qmp/qerror.h: #define QERR_INVALID_PARAMETER_COMBINATION \ ERROR_CLASS_GENERIC_ERROR, "Invalid parameter combination" Since it is generic we are not obliged to keep this error. Switch to the custom error message which contains more information. This patch prepares for adding additional checks with their own error messages to do_check_io_limits(). The next patch adds a new check. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qcow2: support compressed clusters in BlockFragInfoStefan Hajnoczi2013-02-221-0/+1
| | | | | | | | | | | | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-img: add compressed clusters to BlockFragInfoStefan Hajnoczi2013-02-225-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-img: fix missing space in qemu-img check outputStefan Hajnoczi2013-02-221-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qemu-img check fragmentation printf() is missing a space before the '=' sign. The human output is not guaranteed to be stable and we are not aware of screen scrapers, so add the missing space. Also fix the missing indentation of the printf() arguments. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>