aboutsummaryrefslogtreecommitdiffstats
path: root/qmp-commands.hx
AgeCommit message (Collapse)AuthorFilesLines
2011-08-26block: latency accountingChristoph Hellwig1-0/+18
Account the total latency for read/write/flush requests. This allows management tools to average it based on a snapshot of the nr ops counters and allow checking for SLAs or provide statistics. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-08-23block: include flush requests in info blockstatsChristoph Hellwig1-0/+6
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-07-27qmp: fix efect -> effect typo in qmp-commands.hxZhi Yong Wu1-1/+1
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-07-23Introduce a 'client_add' monitor command accepting an open FDDaniel P. Berrange1-0/+27
Allow client connections for VNC and socket based character devices to be passed in over the monitor using SCM_RIGHTS. One intended usage scenario is to start QEMU with VNC on a UNIX domain socket. An unprivileged user which cannot access the UNIX domain socket, can then connect to QEMU's VNC server by passing an open FD to libvirt, which passes it onto QEMU. { "execute": "get_fd", "arguments": { "fdname": "myclient" } } { "return": {} } { "execute": "add_client", "arguments": { "protocol": "vnc", "fdname": "myclient", "skipauth": true } } { "return": {} } In this case 'protocol' can be 'vnc' or 'spice', or the name of a character device (eg from -chardev id=XXXX) The 'skipauth' parameter can be used to skip any configured VNC authentication scheme, which is useful if the mgmt layer talking to the monitor has already authenticated the client in another way. * console.h: Define 'vnc_display_add_client' method * monitor.c: Implement 'client_add' command * qemu-char.c, qemu-char.h: Add 'qemu_char_add_client' method * qerror.c, qerror.h: Add QERR_ADD_CLIENT_FAILED * qmp-commands.hx: Declare 'client_add' command * ui/vnc.c: Implement 'vnc_display_add_client' method Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-21QMP: add snapshot-blkdev-sync commandJes Sorensen1-0/+34
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-06-01HMP: Use QMP inject nmi implementationLuiz Capitulino1-1/+1
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-01QMP: add inject-nmi qmp commandLai Jiangshan1-0/+27
inject-nmi command injects an NMI on all CPUs of guest. It is only supported for x86 guest currently, it will returns "Unsupported" error for non-x86 guest. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2011-05-19block QMP: Deprecate query-block's "type", drop info block's "type="Markus Armbruster1-5/+6
query-block's specification documents response member "type" with values "hd", "cdrom", "floppy", "unknown". Its value is unreliable: a block device used as floppy has type "floppy" if created with if=floppy, but type "hd" if created with if=none. That's because with if=none, the type is at best a declaration of intent: the drive can be connected to any guest device. Its type is really the guest device's business. Reporting it here is wrong. No known user of QMP uses "type". It's unlikely that any unknown users exist, because its value is useless unless you know how the block device was created. But then you also know the true value. Fixing the broken value risks breaking (hypothetical!) clients that somehow rely on the current behavior. Not fixing the value risks breaking (hypothetical!) clients that rely on the value to be accurate. Can't entirely avoid hypothetical lossage. Change the value to be always "unknown". This makes "info block" always report "type=unknown". Pointless. Change it to not report the type. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-03-22qmp-commands.hx: Clean up mess of client_migrate_infoJes Sorensen1-34/+34
client_migrate_info was put into qmp-commands.hx in the middle of migrate_set_speed, between the command and it's description. In addition client_migrate_info put the description before the command itself, which is the wrong order. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-16Expose thread_id in info cpusJan Kiszka1-0/+3
Based on patch by Glauber Costa: To allow management applications like libvirt to apply CPU affinities to the VCPU threads, expose their ID via info cpus. This patch provides the pre-existing and used interface from qemu-kvm. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-02-01Merge remote branch 'spice/spice.v29.pull' into stagingAnthony Liguori1-0/+35
Conflicts: trace-events
2011-01-31block: add block_resize monitor commandChristoph Hellwig1-0/+28
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-24spice/vnc: client migration.Gerd Hoffmann1-0/+35
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>
2010-12-27Merge branch 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemuAurelien Jarno1-0/+127
* '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-27Fix migrate set speed doc argLuiz Capitulino1-1/+1
We used to ignore any fractional part in 0.13, but due to recent changes (started with 9f9b17a4f0865286391e4d3a0a735230122a2289) migrate_set_speed will reject the fractional part. We don't expect existing clients to be relying on this, but we need to update the documentation to reflect the change. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-12-09vnc/spice: add set_passwd monitor command.Gerd Hoffmann1-0/+57
This patch adds new set_password and expire_password monitor commands which allows to change and expire the password for spice and vnc connections. See the doc update patch chunk for details. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-09spice: add qmp 'query-spice' and hmp 'info spice' commands.Gerd Hoffmann1-0/+70
The patch adds a 'query-spice' monitor command which returns informations about the spice server configuration and also a list of channel connections. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2010-12-06correct migrate_set_speed's args_typeWen Congyang1-1/+1
The args_type of migrate_set_speed in qmp-commands.hx is wrong. When we set migrate speed by json, qemu will be core dumped. This bug was caused by 07de3e60b05 and hence affects master only. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-11-17QMP: Introduce Human Monitor passthrough commandLuiz Capitulino1-0/+45
This command allows QMP clients to execute HMP commands. Please, check the documentation added to the qmp-commands.hx file for additional details about the interface and its limitations. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-10-01Monitor: Introduce the qmp-commands.hx fileLuiz Capitulino1-0/+1541
This file contains a copy of the following information from the qemu-monitor.hx file: o QObject handlers entries o QMP documentation (all SQMP/EQMP sections) Right now it's only used to generate the QMP docs in QMP/, but next commits will turn this into QMP's command dispatch table. It's important to note that QObject handlers entries are going to get duplicated: they will exist in both QMP's and HMP's dispatch tables. This will be fixed in the near future, when we add a proper QMP call interface and HMP is converted to use it. This way we can completely drop QObject handlers entries from HMP's tables. NOTE: HMP specific constructions, like "q|quit", have been dropped. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>