Commit Graph

57 Commits

Author SHA1 Message Date
Stefan Hajnoczi 2d47c6e9aa qmp: add block_job_set_speed command
Add block_job_set_speed, which sets the maximum speed for a background
block operation.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26 14:49:17 +01:00
Stefan Hajnoczi 12bd451fe0 qmp: add block_stream command
Add the block_stream command, which starts copy backing file contents
into the image file.  Also add the BLOCK_JOB_COMPLETED QMP event which
is emitted when image streaming completes.  Later patches add control
over the background copy speed, cancelation, and querying running
streaming operations.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-01-26 14:49:14 +01:00
Luiz Capitulino 80047da59b qapi: Convert block_set_io_throttle
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18 10:23:39 -02:00
Luiz Capitulino 333a96ec9f qapi: Convert change
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18 10:23:39 -02:00
Luiz Capitulino c245b6a37d qapi: Convert eject
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18 10:23:39 -02:00
Luiz Capitulino 9ad5372daa qapi: Convert expire_password
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18 10:23:38 -02:00
Luiz Capitulino fbf796fd6f qapi: Convert set_password
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-01-18 10:23:38 -02:00
Alexander Graf 971ca4d906 Expose drive_add on all architectures
All architectures can now use drive_add on the monitor. This of course
does not mean that there is hotplug support for the specific platform,
so in order to actually make use of the new drives you still need to
have a hotplug capable device.

Signed-off-by: Alexander Graf <agraf@suse.de>
2012-01-04 02:48:14 +01:00
Anthony Liguori 9423a2e8dd Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging 2011-12-14 07:59:21 -06:00
Luiz Capitulino 3dc853832d qapi: Convert migrate_set_speed
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 4f0a993bf3 qapi: Convert migrate_set_downtime
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 6cdedb075f qapi: Convert migrate_cancel
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 6106e2492f qapi: Convert blockdev_snapshot_sync
Unfortunately, this conversion required an additional change.

In the old QMP command, the 'snapshot-file' argument is specified as
optional. The idea is to take the snapshot internally if 'snapshot-file'
is not passed. However, internal snapshots are not supported yet so
the command returns a MissingParamater error if 'snapshot-file' is not
passed. Which makes the argument actually required and will cause
compatibility breakage if we change that in the future.

To fix this the QAPI converted blockdev_snapshot_sync command makes the
'snapshot-file' argument required. Again, in practice it's actually required,
so this is not incompatible.

If we do implement internal snapshots someday, we'll need a new argument
for it.

Note that this discussion doesn't affect HMP.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 5e7caacb25 qapi: Convert block_resize
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino d72f326431 qapi: Convert balloon
Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNC
API, but the new command is a regular synchronous command. There shouldn't
be visible differences though, as MONITOR_CMD_ASYNC is internal only.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino a4dea8a9f4 qapi: Convert block_passwd
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 4b37156c40 qapi: Convert set_link
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino ab49ab5c48 qapi: Convert inject-nmi
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino e42e818bf4 qapi: Convert cont
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 6d3962bf84 qapi: Convert pmemsave
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:01 -02:00
Luiz Capitulino 0cfd6a9ab4 qapi: Convert memsave
Please, note that the QMP command has a new 'cpu-index' parameter.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-12-06 11:40:00 -02:00
Zhi Yong Wu 1f3392b7b3 pcie_aer: adjust do_pcie_aer_inejct_error -> do_pcie_aer_inject_error
This function name is a bit wrong. Although it doesn't impact function, it is a bit necessary that we should fixup it.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-12-06 09:56:41 +00:00
Stefan Hajnoczi fb0490f69f block: add -drive copy-on-read=on|off
This patch adds the -drive copy-on-read=on|off command-line option:

  copy-on-read=on|off
  copy-on-read is "on" or "off" and enables whether to copy read backing
  file sectors into the image file.  Copy-on-read avoids accessing the
  same backing file sectors repeatedly and is useful when the backing
  file is over a slow network.  By default copy-on-read is off.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-05 14:51:38 +01:00
Zhi Yong Wu 727f005e6a hmp/qmp: add block_set_io_throttle
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-12-05 14:51:35 +01:00
Anthony Liguori 96b3d73f5a Merge remote-tracking branch 'qmp/queue/qmp' into staging
Conflicts:
	ui/spice-core.c
2011-10-31 11:02:29 -05:00
Luiz Capitulino 755f196898 qapi: Convert the cpu command
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-27 11:48:46 -02:00
Yonit Halperin edc5cb1a52 spice: turn client_migrate_info to async
RHBZ 737921
Spice client is required to connect to the migration target before/as migration
starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client
we trigger the connection to the target upon client_migrate_info command.
client_migrate_info completion cb will be called after spice client has been
connected to the target (or a timeout). See following patches and spice patches.

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-10-25 14:00:53 +02:00
Anthony Liguori ebffe2afce Merge remote-tracking branch 'qmp/queue/qmp' into staging 2011-10-10 08:21:46 -05:00
Blue Swirl 211685040f Merge branch 'tracing' of git://repo.or.cz/qemu/stefanha
* 'tracing' of git://repo.or.cz/qemu/stefanha:
  trace: add arguments to bdrv_co_io_em() trace event
  trace: trace monitor qmp dispatch/completion
  trace: trace bdrv_open_common()
  hmp: re-enable trace-file command
2011-10-08 15:38:14 +00:00
Scott Wood bebabbc7aa ppc: booke206: add "info tlb" support
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-10-06 09:48:04 +02:00
Luiz Capitulino 5bc465e4b1 qapi: Convert system_powerdown
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:02:57 -03:00
Luiz Capitulino 38d226535a qapi: Convert system_reset
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:02:57 -03:00
Luiz Capitulino 5f158f21f9 qapi: Convert stop
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:02:57 -03:00
Luiz Capitulino 7a7f325e05 qapi: Convert quit
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-10-04 11:02:57 -03:00
Michael Roth c45a81682d hmp: re-enable trace-file command
Commit 31965ae27b reverted a previous
renaming of CONFIG_SIMPLE_TRACE->CONFIG_TRACE_SIMPLE in a couple spots,
leading to trace-file currently being unavailable.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-03 10:55:50 +01:00
Lluís 31965ae27b trace: always compile support for controlling and querying trace event states
The current interface is generic for this small set of operations, and thus
other backends can easily modify the "trace/control.c" file to add their own
implementation.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
2011-09-01 10:34:54 +01:00
Lluís fc76410539 trace: separate trace event control and query routines from the simple backend
Generalize the 'st_print_trace_events' and 'st_change_trace_event_state' into
backend-specific 'trace_print_events' and 'trace_event_set_state' (respectively)
in the "trace/control.h" file.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
2011-09-01 10:34:54 +01:00
Lluís 6d8a764e0f trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*
Provides a more hierarchical view of the variable domain.

Also adds the CONFIG_TRACE_* variables for all backends.

[Stefan added missing 'test' in stap if statement]

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-09-01 10:34:53 +01:00
Zhi Yong Wu 0f1b583ee7 HMP: Remove the duplicated info "info kvm" in hmp-commands.hx.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-03 11:17:36 +01:00
Jes Sorensen d967b2f14f QMP: add snapshot-blkdev-sync command
Add QMP bits for snapshot_blkdev command. This is the same as
snapshot_blkdev in the human monitor. The command is synchronous.

In the future async commands and or a break down of the functionality
into multiple commands might be added.

Also change the 'snapshot_file' argument to 'snapshot-file' in
the human monitor, so that it matches QMP.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
2011-07-21 16:48:11 -03:00
Luiz Capitulino e9b4b432e7 HMP: Use QMP inject nmi implementation
This **CHANGES** the human monitor "nmi" command behavior.

Currently it accepts an CPU argument which, when provided, will send
the NMI to the specified CPU. This feature is of discussable value
though and HMP shouldn't have more features than QMP, so let's use
QMP's instead (it's also simpler).

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-06-01 11:42:25 -03:00
Jes Sorensen 2ea720dba5 hmp-commands.hx: fix badly merged client_migrate_info command
client_migrate_info was merged badly, placing it between the command
and the documentation for another command. In addition it did not
respect the general rule of hmp-commands.hx, of having command
definition before the documentation.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10 16:12:21 -06:00
Jes Sorensen 982aa95532 Change snapshot_blkdev hmp to use correct argument type for device
Pointed out by Markus

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-02-10 13:23:43 +01:00
Anthony Liguori b3a98367ee Merge remote branch 'qemu-kvm/uq/master' into staging
aliguori: fix build with !defined(KVM_CAP_ASYNC_PF)

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-01 15:32:18 -06:00
Anthony Liguori 9363ee31ab Merge remote branch 'spice/spice.v29.pull' into staging
Conflicts:
	trace-events
2011-02-01 15:22:48 -06:00
Christoph Hellwig 6d4a2b3a47 block: add block_resize monitor command
Add a monitor command that allows resizing of block devices while
qemu is running.  It uses the existing bdrv_truncate method already
used by qemu-img to do it's work.  Compared to qemu-img the size
parsing is very simplicistic, but I think having a properly numering
object is more useful for non-humand monitor users than having
the units and relative resize parsing.

For SCSI devices the new size can be updated in Linux guests by
doing the following shell command:

	echo > /sys/class/scsi_device/0:0:0:0/device/rescan

For ATA devices I don't know of a way to update the block device
size in Linux system, and for virtio-blk the next two patches
will provide an automatic update of the size when this command
is issued on the host.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-01-31 10:03:00 +01:00
Gerd Hoffmann e866e23959 spice/vnc: client migration.
Handle spice client migration, i.e. inform a spice client connected
about the new host and connection parameters, so it can move over the
connection automatically.

The monitor command has a not-yet used protocol argument simliar to
set_password and expire_password commands.  This allows to add a simliar
feature to vnc in the future.  Daniel Berrange plans to work on this.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-01-24 15:13:54 +01:00
Jin Dongming 31ce5e0c49 Add "broadcast" option for mce command
When the following test case is injected with mce command, maybe user could not
get the expected result.
    DATA
               command cpu bank status             mcg_status  addr   misc
        (qemu) mce     1   1    0xbd00000000000000 0x05        0x1234 0x8c

    Expected Result
           panic type: "Fatal Machine check"

That is because each mce command can only inject the given cpu and could not
inject mce interrupt to other cpus. So user will get the following result:
    panic type: "Fatal machine check on current CPU"

"broadcast" option is used for injecting dummy data into other cpus. Injecting
mce with this option the expected result could be gotten.

Usage:
    Broadcast[on]
           command broadcast cpu bank status             mcg_status  addr   misc
    (qemu) mce     -b        1   1    0xbd00000000000000 0x05        0x1234 0x8c

    Broadcast[off]
           command cpu bank status             mcg_status  addr   misc
    (qemu) mce     1   1    0xbd00000000000000 0x05        0x1234 0x8c

Signed-off-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-01-21 14:05:22 -02:00
Anthony Liguori a7bd621d7a Merge remote branch 'mst/for_anthony' into staging 2011-01-10 10:32:01 -06:00
Aurelien Jarno 818c2e1b97 Merge branch 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemu
* 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemu:
  vnc/spice: add set_passwd monitor command.
  vnc: support password expire
  vnc: auth reject cleanup
  spice: add qmp 'query-spice' and hmp 'info spice' commands.
  spice: connection events.
  spice: add qxl device
  spice: add qxl vgabios binary.
2010-12-27 22:59:48 +01:00